Skip to content

Commit ad5ae8d

Browse files
committed
2.15.0 - Improved extras.git + documentation/comments overhaul
- `privex.helpers.extras.git` - Added PyDoc comment block for module - Renamed `AsyncGit` to `_AsyncGit` and removed the `awaitable_class` decorator. The decorator causes problems with IDEs being able to provide code insight when using it, and also prevents Sphinx being able to document it. To resolve this, while keeping `awaitable_class` functionality, `AsyncGit` is now a variable which wraps the bare class `_AsyncGit` using `AsyncGit = awaitable_class(_AsyncGit)`, allowing Sphinx and IDEs to be able to access the bare undecorated class when needed to provide insight, while retaining `awaitable_class` for both async and non-async compatibility. - Renamed `_AsyncGit._git` to `_AsyncGit.git` so that projects can cleanly access the lower level direct `git` CLI call if they need to. - Made several improvements to `_AsyncGit.commit` - Added `_AsyncGit.__getattr__` magic method, which allows unimplemented sub-command calls such as `.count_objects()` to be automagically translated into `.git('count-objects')` - Added/improved PyDoc blocks for most methods - Added some missing requirements to `requirements.txt` - Bumped dependency versions in `extras/docs.txt` - Changed the relative module imports in `privex.helpers.cache.asyncx.__init__` to be absolute imports, as the relative imports were causing problems with Sphinx being able to read the module. - Comments have been cleaned up to comply with Sphinx properly, along with adding and improving PyDoc across several modules in privex-helpers - too many changes to list (and they don't affect functionality so...) **Documentation** - Overhauled the documentation to be compatible with modern Sphinx - Changes to the docs config file - Stopped autodoc/autosummary overwriting existing RST files without warning - Attempted to silence some of the annoying warnings which I can't fix without breaking references, though silencing hasn't been very effective. - Adjusted the Makefile to use `-b` instead of `-M`, and added a `clean` segment, since `make clean` no longer works via sphinx-build - Re-generated and hand corrected a lot of API documentation, since many parts of the API docs were no longer rendering correctly due to changes in Sphinx. - Replaced bare module path titles like `privex.helpers.cache`, with more friendly and descriptive titles such as `Framework-independent Cache System` and `Common/General Helpers`. - Re-organised the documentation for many existing modules - Added documentation for the `thread` and `geoip` modules - Re-added the documentation for `types` and `settings` (they were previously obliterated by autodoc) - Many other improvements to the docs (a good 100+ docs files have been created/deleted/updated)
1 parent 8418c96 commit ad5ae8d

194 files changed

Lines changed: 1540 additions & 596 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ live:
2222
rst:
2323
sphinx-apidoc -o "$(SOURCEDIR)/helpers/" ../ ../setup.py ../dist ../build ../privex_helpers.egg-info '**__pycache__**'
2424

25+
26+
clean:
27+
rm -r $(BUILDDIR)
28+
29+
2530
# Catch-all target: route all unknown targets to Sphinx using the new
2631
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
2732
%: Makefile
28-
@$(SPHINXBUILD) -j 8 -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
33+
@$(SPHINXBUILD) -j 8 -b $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/source/_templates/autosummary/class.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.. currentmodule:: {{ module }}
44

55
.. autoclass:: {{ objname }}
6+
:members:
67

78
{% block methods %}
89
.. automethod:: __init__

docs/source/_templates/autosummary/module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.. rubric:: Attributes
99

1010
.. autosummary::
11-
:toctree: {{ name | lower }}
11+
:toctree: {{ name }}
1212
{% for item in attributes %}
1313
~{{ name }}.{{ item }}
1414
{%- endfor %}

docs/source/conf.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,17 @@
5353
]
5454

5555
autosummary_generate = True
56+
autosummary_generate_overwrite = False
5657

5758
autodoc_default_flags = ['members']
5859

60+
61+
# Silence stupid "duplicate description" and similar warnings. Adding :noindex: like it demands just causes reference links to break...
62+
suppress_warnings = [
63+
'app.add_node', # Silence stupid "duplicate description" and similar warnings. Adding :noindex: causes reference links to break...
64+
'ref.python' # Silence "more than one target found for cross-reference" warnings
65+
]
66+
5967
# Add any paths that contain templates here, relative to this directory.
6068
templates_path = ['_templates']
6169

docs/source/helpers/cache/asyncmemcachedcache/privex.helpers.cache.asyncx.AsyncMemcachedCache.AsyncMemcachedCache.__init__.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/source/helpers/cache/asyncmemcachedcache/privex.helpers.cache.asyncx.AsyncMemcachedCache.AsyncMemcachedCache.get.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/source/helpers/cache/asyncmemcachedcache/privex.helpers.cache.asyncx.AsyncMemcachedCache.AsyncMemcachedCache.mcache.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/source/helpers/cache/asyncmemcachedcache/privex.helpers.cache.asyncx.AsyncMemcachedCache.AsyncMemcachedCache.pickle_default.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/source/helpers/cache/asyncmemcachedcache/privex.helpers.cache.asyncx.AsyncMemcachedCache.AsyncMemcachedCache.remove.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/source/helpers/cache/asyncmemcachedcache/privex.helpers.cache.asyncx.AsyncMemcachedCache.AsyncMemcachedCache.set.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)