Skip to content

Commit

Permalink
Merge pull request #6 from sarnold/doc-fixes
Browse files Browse the repository at this point in the history
Give docs their own icons
  • Loading branch information
sarnold authored Aug 27, 2024
2 parents d90cdd1 + a33d6b8 commit 47a9d01
Show file tree
Hide file tree
Showing 27 changed files with 657 additions and 50 deletions.
35 changes: 34 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,34 @@ Changelog
=========


0.1.1 (2024-08-19)
0.2.0 (2024-08-25)
------------------

New
~~~
- Add menu option to install extensions, beef up tests. [Stephen Arnold]

* add some pytest fixtures and more tests, improve readme
* refactor for correctness and testability, cleanup packaging

Changes
~~~~~~~
- Refactor doc extensions to use apidoc, add docs logo icon. [Stephen
Arnold]

* cleanup more docstrings and sphinx modules
- Update changelog for next version, remove sphinx git hash. [Stephen
Arnold]

* also suppress duplicate label warnings from autosectionlabel
- Respin doc symlinks using vendored copies. [Stephen Arnold]
- Update docs and packaging, post refactoring cleanup. [Stephen Arnold]

* add symlinks so icons are available for both sphinx and GH rendering
* optionally disable seat-timer by setting params to 00:00


0.1.1 (2024-08-20)
------------------

New
Expand Down Expand Up @@ -33,6 +60,8 @@ Changes
Arnold]

* revert the .keepdir bits and cleanup sphinx config and index
* update changelog and get ready for release version, cleanup
docs CI workflows
- Still more readme updates and a docstring tweak. [Stephen L Arnold]
- Try setting position and gravity options, cleanup entry window bits.
[Stephen L Arnold]
Expand All @@ -59,6 +88,10 @@ Changes

Fixes
~~~~~
- Update doc deploy workflows per current deploy action docs. [Steve
Arnold]

* use permissions instead of the older github token setting
- Even more docstring and readme/rst doc cleanup. [Stephen L Arnold]
- Cleanup some oddball link anchors flagged by sphinx check. [Stephen L
Arnold]
Expand Down
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ as "time" strings, eg, the following sets an 8-hour max:
day_max: "08:00"
The seat timer can be disabled by setting both *max* and *snooze* to
zeros, ie, set both values like so::
zeros, ie, set both values like so:

.. code-block:: yaml
Expand All @@ -372,11 +372,11 @@ tracking interval. The states and corresponding icons are shown below:
:ERROR: |err| The state when either snooze period has expired.
:APP: |app| While not a state, we use this to retrieve the app icon.

.. |app| image:: images/timew.svg
.. |inactive| image:: images/timew_inactive.svg
.. |info| image:: images/timew_info.svg
.. |warn| image:: images/timew_warning.svg
.. |err| image:: images/timew_error.svg
.. |app| image:: gh/images/timew.svg
.. |inactive| image:: gh/images/timew_inactive.svg
.. |info| image:: gh/images/timew_info.svg
.. |warn| image:: gh/images/timew_warning.svg
.. |err| image:: gh/images/timew_error.svg


PyGObject references
Expand Down
34 changes: 28 additions & 6 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
else:
from importlib.metadata import version

sys.path.insert(0, os.path.abspath('../../src/timew_status'))
sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath('../../src'))

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
Expand All @@ -36,27 +37,48 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'sphinx_git',
'rst2pdf.pdfbuilder',
'sphinx.ext.autodoc',
'sphinxcontrib.apidoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.autosectionlabel',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
]

apidoc_module_dir = '../../src/timew_status/'
apidoc_output_dir = 'api'
apidoc_excluded_paths = ['tests', 'scripts']
apidoc_separate_modules = True

templates_path = ['_templates']

exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.venv']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_logo = 'gh/images/timew.png'
#html_static_path = ['_static']
html_sidebars = {'**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']}
html_sidebars = {
'**': [
'relations.html', # needs 'show_related': True theme option to display
'searchbox.html',
]
}

html_theme_options = {
# Toc options
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 4,
}

source_suffix = {'.rst': 'restructuredtext'}
master_doc = "index"
Expand Down
1 change: 1 addition & 0 deletions docs/source/gh/images/timew.png
1 change: 1 addition & 0 deletions docs/source/gh/images/timew.svg
1 change: 1 addition & 0 deletions docs/source/gh/images/timew_error.svg
1 change: 1 addition & 0 deletions docs/source/gh/images/timew_inactive.svg
1 change: 1 addition & 0 deletions docs/source/gh/images/timew_info.svg
1 change: 1 addition & 0 deletions docs/source/gh/images/timew_warning.svg
1 change: 0 additions & 1 deletion docs/source/images/timew.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/images/timew_error.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/images/timew_inactive.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/images/timew_info.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/images/timew_warning.svg

This file was deleted.

11 changes: 2 additions & 9 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@ The primary timewarrior_ addon bits included here are written in Python_:
.. _timewarrior: https://timewarrior.net/docs/install/
.. _timew-report: https://pypi.org/project/timew-report/

.. git_commit_detail::
:branch:
:commit:
:sha_length: 10
:uncommitted:
:untracked:

.. toctree::
:maxdepth: 3
:maxdepth: 2
:caption: Contents:

README
modules
api/modules
CHANGELOG

Indices and tables
Expand Down
9 changes: 0 additions & 9 deletions docs/source/modules.rst

This file was deleted.

10 changes: 0 additions & 10 deletions docs/source/timew_status.rst

This file was deleted.

Binary file added gh/images/timew.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
123 changes: 123 additions & 0 deletions gh/images/timew.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 47a9d01

Please sign in to comment.