From cfe86cf9af1810ec653b485ee4a4f54331bb4357 Mon Sep 17 00:00:00 2001 From: Steve Arnold Date: Mon, 19 Aug 2024 18:02:51 -0700 Subject: [PATCH 1/2] fix: dev: add directory keepers to required sphinx dirs, change to _build * update .gitignore (again) after this commit Signed-off-by: Steve Arnold --- docs/Makefile | 2 +- docs/_build/.keepdir | 0 docs/make.bat | 2 +- docs/source/_static/.keepdir | 0 4 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 docs/_build/.keepdir create mode 100644 docs/source/_static/.keepdir diff --git a/docs/Makefile b/docs/Makefile index d0c3cbf..92dd33a 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -6,7 +6,7 @@ SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = source -BUILDDIR = build +BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: diff --git a/docs/_build/.keepdir b/docs/_build/.keepdir new file mode 100644 index 0000000..e69de29 diff --git a/docs/make.bat b/docs/make.bat index 747ffb7..83cf06c 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -8,7 +8,7 @@ if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set SOURCEDIR=source -set BUILDDIR=build +set BUILDDIR=_build %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( diff --git a/docs/source/_static/.keepdir b/docs/source/_static/.keepdir new file mode 100644 index 0000000..e69de29 From 62953285af7ea9687fc97fe581dbc864aab0afea Mon Sep 17 00:00:00 2001 From: Steve Arnold Date: Mon, 19 Aug 2024 19:07:04 -0700 Subject: [PATCH 2/2] chg: usr: add config option to select symbolic icons instead of default * revert the .keepdir bits and cleanup sphinx config and index * update changelog and get ready for release version, cleanup docs CI workflows Signed-off-by: Steve Arnold --- .github/workflows/release.yml | 6 +++--- .github/workflows/sphinx.yml | 6 +++--- .gitignore | 2 +- CHANGELOG.rst | 23 +++++++++++++++++++++-- docs/_build/.keepdir | 0 docs/source/CHANGELOG.rst | 1 + docs/source/_static/.keepdir | 0 docs/source/conf.py | 4 ++-- docs/source/index.rst | 6 +++--- src/timew_status/utils.py | 3 ++- 10 files changed, 36 insertions(+), 15 deletions(-) delete mode 100644 docs/_build/.keepdir create mode 120000 docs/source/CHANGELOG.rst delete mode 100644 docs/source/_static/.keepdir diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3aa3190..8d21338 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -130,14 +130,14 @@ jobs: - uses: actions/upload-artifact@v4 with: name: ApiDocsHTML - path: "docs/build/html/" + path: "docs/_build/html/" - name: set nojekyll for github run: | - sudo touch docs/build/html/.nojekyll + sudo touch docs/_build/html/.nojekyll - name: Deploy docs to gh-pages if: ${{ github.event_name == 'push' }} uses: JamesIves/github-pages-deploy-action@v4 with: - folder: docs/build/html/ + folder: docs/_build/html/ diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index b076435..d66ab30 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -41,11 +41,11 @@ jobs: - uses: actions/upload-artifact@v4 with: name: ApiDocsHTML - path: "docs/build/html/" + path: "docs/_build/html/" - name: set nojekyll for github run: | - sudo touch docs/build/html/.nojekyll + sudo touch docs/_build/html/.nojekyll - name: Deploy docs to gh-pages if: ${{ github.event_name == 'push' }} @@ -53,5 +53,5 @@ jobs: with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages - FOLDER: docs/build/html/ + FOLDER: docs/_build/html/ SINGLE_COMMIT: true diff --git a/.gitignore b/.gitignore index c1fc927..671afcf 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,7 @@ instance/ .scrapy # Sphinx documentation -docs/build/ +docs/_build/ # not-Sphinx documentation (externel) docs/sum/ diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 276ae00..3708175 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,11 +1,19 @@ Changelog ========= -0.0.1.dev25 (2024-08-16) ------------------------- + +0.1.1 (2024-08-19) +------------------ New ~~~ +- Update readme, add sphinx docs build, cleanup docstrings. [Stephen L + Arnold] + + * add example extension based on totals for use without jtag split + * update base config with extension_script key for script name +- Add a changelog plus .gitchangelog.rc and update tox env. [Stephen L + Arnold] - Reset seat counter on stop after err, plus cleanup. [Stephen L Arnold] * abstract out delta_limits, hide some prints behind DEBUG @@ -21,6 +29,11 @@ New Changes ~~~~~~~ +- Add config option to select symbolic icons instead of default. [Steve + Arnold] + + * revert the .keepdir bits and cleanup sphinx config and index +- Still more readme updates and a docstring tweak. [Stephen L Arnold] - Try setting position and gravity options, cleanup entry window bits. [Stephen L Arnold] - Try rounding a Decimal for timer status. [Stephen L Arnold] @@ -44,6 +57,12 @@ Changes * prints CSV rows of per-jobtag totals plus total total +Fixes +~~~~~ +- Even more docstring and readme/rst doc cleanup. [Stephen L Arnold] +- Cleanup some oddball link anchors flagged by sphinx check. [Stephen L + Arnold] + Other ~~~~~ - Enable pre-commit and apply some cleanup. [Stephen L Arnold] diff --git a/docs/_build/.keepdir b/docs/_build/.keepdir deleted file mode 100644 index e69de29..0000000 diff --git a/docs/source/CHANGELOG.rst b/docs/source/CHANGELOG.rst new file mode 120000 index 0000000..bfa394d --- /dev/null +++ b/docs/source/CHANGELOG.rst @@ -0,0 +1 @@ +../../CHANGELOG.rst \ No newline at end of file diff --git a/docs/source/_static/.keepdir b/docs/source/_static/.keepdir deleted file mode 100644 index e69de29..0000000 diff --git a/docs/source/conf.py b/docs/source/conf.py index 49d34d8..4a05889 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -55,7 +55,7 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_theme = 'sphinx_rtd_theme' -html_static_path = ['_static'] +#html_static_path = ['_static'] html_sidebars = {'**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']} source_suffix = {'.rst': 'restructuredtext'} @@ -81,7 +81,7 @@ pdf_documents = [ #('filename', u'output filename', 'Title', 'author(s)'), - ('index_pdf', u'timew_status', u'Timew Status Indicator and Report Extensions', u"Stephen L Arnold"), + ('index', u'timew_status', u'Timew Status Indicator and Report Extensions', u"Stephen L Arnold"), ] # A comma-separated list of custom stylesheets. Example: diff --git a/docs/source/index.rst b/docs/source/index.rst index 480a71e..c140b78 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,5 +1,5 @@ -Documentation for timew-addons -============================== +Developer/User Overview for Timew-Addons +======================================== The primary timewarrior_ addon bits included here are written in Python_: @@ -24,7 +24,7 @@ The primary timewarrior_ addon bits included here are written in Python_: README modules - + CHANGELOG Indices and tables ================== diff --git a/src/timew_status/utils.py b/src/timew_status/utils.py index 4604ece..99489d4 100644 --- a/src/timew_status/utils.py +++ b/src/timew_status/utils.py @@ -16,6 +16,7 @@ "seat_snooze": "00:40", "seat_reset_on_stop": False, "use_last_tag": False, + "use_symbolic_icons": False, "extension_script": "onelineday", "default_jtag_str": "vct-sw,implement skeleton timew indicator", "jtag_separator": ",", @@ -91,7 +92,7 @@ def get_state_icon(state): state_dict = timew_dict app_icon = Path(install_path).joinpath(icon_name) - if not app_icon.exists(): + if CFG["use_symbolic_icons"] or not app_icon.exists(): state_dict = fallback_dict return state_dict.get(state, state_dict['INACTIVE'])