Skip to content

Commit

Permalink
bump version to 0.3.3-alpha.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gambhiro committed Apr 25, 2023
1 parent d6f52d2 commit 98724c4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "simsapa"
version = "0.3.2-alpha.1"
version = "0.3.3-alpha.1"
description = "Simsapa Dhamma Reader - Buddhist suttas and Pali dictionary"
# pypi identification
authors = ["Gambhiro <profound.labs@gmail.com>"]
Expand All @@ -11,6 +11,7 @@ license = "GPLv3"
# - simsapa.db_version (below)
# - tool.briefcase.version (below)
# - simsapa/__init__.py SIMSAPA_APP_VERSION
# - simsapa/assets/releases_fallback.json

[simsapa]
db_version = "0.3.0-alpha.1"
Expand Down Expand Up @@ -109,7 +110,7 @@ to = {format = "setuppy", path = "setup.py"}
project_name = "Simsapa Dhamma Reader"
bundle = "io.github"
# briefcase requires PEP440 version strings
version = "0.3.2a1"
version = "0.3.3a1"
url = "https://github.com/simsapa/simsapa"
license = "MIT license"
# Package will display this info
Expand Down
9 changes: 8 additions & 1 deletion simsapa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# When running the prod app, the value below is used.
#
# In the PyInstaller build for Windows, importlib.metadata.version('simsapa') errors out with missing module.
SIMSAPA_APP_VERSION = "0.3.2-alpha.1"
SIMSAPA_APP_VERSION = "0.3.3-alpha.1"

SIMSAPA_PACKAGE_DIR = importlib.resources.files('simsapa')

Expand Down Expand Up @@ -83,6 +83,13 @@
else:
IS_SWAY = False

b = pkgutil.get_data(__name__, str(PACKAGE_ASSETS_RSC_DIR.joinpath("releases_fallback.json")))
if b is None:
RELEASES_FALLBACK_JSON = ""
else:
# Value to use in case the network request fails.
RELEASES_FALLBACK_JSON = b.decode("utf-8")

READING_TEXT_COLOR = "#1a1a1a" # 90% black
READING_BACKGROUND_COLOR = "#FAE6B2"
DARK_READING_BACKGROUND_COLOR = "#F0B211"
Expand Down
9 changes: 7 additions & 2 deletions simsapa/app/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from simsapa.app.lookup import DHP_CHAPTERS_TO_RANGE, SNP_UID_TO_RANGE, THAG_UID_TO_RANGE, THIG_UID_TO_RANGE
from simsapa.app.db import appdata_models as Am

from simsapa import APP_DB_PATH, ASSETS_DIR, COURSES_DIR, EBOOK_UNZIP_DIR, GRAPHS_DIR, HTML_RESOURCES_APPDATA_DIR, HTML_RESOURCES_USERDATA_DIR, INDEX_DIR, SIMSAPA_APP_VERSION, SIMSAPA_DIR, SIMSAPA_PACKAGE_DIR, SIMSAPA_RELEASES_BASE_URL, USER_DB_PATH, logger
from simsapa import APP_DB_PATH, ASSETS_DIR, COURSES_DIR, EBOOK_UNZIP_DIR, RELEASES_FALLBACK_JSON, GRAPHS_DIR, HTML_RESOURCES_APPDATA_DIR, HTML_RESOURCES_USERDATA_DIR, INDEX_DIR, SIMSAPA_APP_VERSION, SIMSAPA_DIR, SIMSAPA_PACKAGE_DIR, SIMSAPA_RELEASES_BASE_URL, USER_DB_PATH, logger


class SuttaRange(TypedDict):
Expand Down Expand Up @@ -276,7 +276,12 @@ def get_releases_info() -> ReleasesInfo:
if r.ok:
data: ReleasesInfo = r.json()
else:
raise Exception(f"Response: {r.status_code}")
# Don't raise an exception, use a sane default value instead.
# Network timeouts can cause the request to fail, and the user gets
# confused, especially when they encounter it in the first asset
# download window.
data: ReleasesInfo = json.loads(RELEASES_FALLBACK_JSON)

except Exception as e:
logger.error(e)
raise e
Expand Down
1 change: 1 addition & 0 deletions simsapa/assets/releases_fallback.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"application":{"releases":[{"date":"2023-04-25T13:30:00","version_tag":"v0.3.3-alpha.1","github_repo":"simsapa\/simsapa","title":"Fixes","description":"- Fixed: network connection timeout breaks asset download window\n- Fixed: (Mac) Ebook Reader window resizes itself on TOC click\n- Fixed: Right-click > Copy uid copies only the first tab\n"},{"date":"2023-04-18T21:17:00","version_tag":"v0.3.2-alpha.1","github_repo":"simsapa\/simsapa","title":"Fixes","description":"- Fixed: Dictionary Window doesn't render words\n- Fixed: closing Sutta Languages window quits the app\n"},{"date":"2023-04-18T08:43:00","version_tag":"v0.3.1-alpha.1","github_repo":"simsapa\/simsapa","title":"Improvements and fixes","description":"Improvements:\n\n- Links Graph: hover preview\n- Word Lookup: use Ctrl+L to focus search input\n\nFixes:\n\n- Ebook Reader: file encoding error\n- Sutta Study: smaller minimum width\n- Sutta Study: text should respond to View > Increase \/ Decrease Text Size\n- GPT Prompts: fix `Tokenizer error: Unknown encoding cl100k_base`\n- (Mac) Increase hover preview windows distance from links\n- Send to Kindle: fix MOBI path\n- Send to Kindle: Kindle Library rejects the exported sutta EPUB\n"},{"date":"2023-04-13T13:57:21","version_tag":"v0.3.0-alpha.1","github_repo":"simsapa\/simsapa","title":"New features and database update","description":"New features:\n\n- Sutta translation languages\n- Sutta Index window (offline copy of [index.readingfaithfully.org](https:\/\/index.readingfaithfully.org\/))\n- GPT Prompts window\n- Send to Kindle, Send to reMarkable\n- Export a sutta as EPUB or MOBI\n- Export a list of bookmarked suttas\n- Ebook Reader, with auto-linked sutta references to open in Simsapa\n- Double-click a word to lookup in the dictionary\n- Regex search option\n- Sutta Nip\u0101ta translations from Ven. \u00d1\u0101\u1e47ad\u012bpa ([The Silent Sages of Old (2020)](https:\/\/pathpress.org\/new-the-silent-sages-of-old-pdf\/))\n"},{"date":"2023-01-16T07:16:58","version_tag":"v0.2.0-alpha.1","github_repo":"simsapa\/simsapa","title":"New features and database update","description":"New features:\n\n- Link Preview window\n- Cross-reference links from dictionary words to suttas\n- Word example sutta links in DPD dictionary\n- Bookmarks with comments\n- Pali Courses, vocabulary and sentence translation exercises\n- Sutta reading: Line by Line view, Pali and translation\n- Search modes: Exact Match, Title- and Headword Match\n"}]},"assets":{"releases":[{"date":"2023-04-13T13:57:21","version_tag":"v0.3.0-alpha.1","github_repo":"simsapa\/simsapa-assets","suttas_lang":["af","ar","au","bn","ca","cs","de","es","ev","fa","fi","fr","haw","he","hi","hr","hu","id","it","jpn","kan","kln","ko","la","lt","lzh","mr","my","nl","no","pgd","pl","pra","pt","ro","ru","si","sk","sld","sl","sr","sv","ta","th","vi","vu","xct","zh"],"title":"Updates","description":"New database assets."},{"date":"2023-01-16T07:16:58","version_tag":"v0.2.0-alpha.1","github_repo":"simsapa\/simsapa-assets","suttas_lang":[],"title":"Updates","description":""}]},"dpd":{"releases_feed_url":"https:\/\/github.com\/digitalpalidictionary\/digitalpalidictionary\/releases.atom"}}

0 comments on commit 98724c4

Please sign in to comment.