Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lite-Functions Ep. 1 | Jump to Hyperspace #1145

Merged
merged 122 commits into from
Jan 11, 2022
Merged
Changes from 1 commit
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
81404df
create autodoc directory and move automodapi in
rocco8773 May 13, 2021
8fc110d
rename automodsumm.py -> core.py
rocco8773 May 13, 2021
685273d
create directory automodsumm and move core.py into it
rocco8773 May 13, 2021
cac62a9
move generate.py into plasmapy_sphinx.automodsumm
rocco8773 May 13, 2021
84d2f03
remove accidental refactoring that placed 'docs.plasmapy_sphinx'
rocco8773 May 13, 2021
50b34f7
rename template directory templates/automodapi/ -> templates/automods…
rocco8773 May 13, 2021
a29efc3
follow-up corrections from the major pkg refactoring thus far
rocco8773 May 14, 2021
c0671a5
rewrite plasmapy_sphinx module level docstring
rocco8773 May 14, 2021
333601d
add plasmapy_sphinx to extensions confval instead of the setup() func
rocco8773 May 14, 2021
b6210b8
create directives sub-pkg
rocco8773 May 14, 2021
767881b
CSS zero out bottom margin for paragraphs in table headings
rocco8773 May 15, 2021
4a74376
move the confval functionality extras -> directives.confval
rocco8773 May 15, 2021
26894e3
create stub files for plasmapy_sphinx.directives and plasmapy_sphinx.…
rocco8773 May 15, 2021
b3c3f3e
update module.rst template file with an API section to simulate the P…
rocco8773 May 15, 2021
a1a6261
CSS allow text wrapping for last column of a table
rocco8773 May 15, 2021
7f241f7
clean up docstring and expand table
rocco8773 May 15, 2021
e4556ed
minor cleanup/fixes to confval docstring
rocco8773 May 15, 2021
feec550
move the event directive code from plasmapy_sphinx.extras to plasmapy…
rocco8773 May 15, 2021
011684a
add clarifying note
rocco8773 May 15, 2021
3b9a8b8
fix typo
rocco8773 May 16, 2021
f041f4e
fix wording
rocco8773 May 16, 2021
64690d2
make note about linking with sphinx.ext.intersphinx
rocco8773 May 16, 2021
18cb076
add docstring for event.py
rocco8773 May 16, 2021
5e9e666
allow event names to use underscores
rocco8773 May 16, 2021
14f5dbd
docstring wording fixes
rocco8773 May 16, 2021
8435067
add docstring to setup()
rocco8773 May 17, 2021
a12bbdf
add module level docstring for plasmapy_sphinx.automodsumm
rocco8773 May 18, 2021
208e228
repair a few links from the automodsumm refactor/move
rocco8773 May 18, 2021
bda8d54
add link to sphinx-autogen
rocco8773 May 18, 2021
42a44d8
consistent styling
rocco8773 May 18, 2021
906e17d
add brief descriptions for the sections
rocco8773 May 18, 2021
ae3d7c0
undo accidental notebook commit
rocco8773 May 18, 2021
dac26fb
add docstrings to plasmapy_sphinx.autodoc
rocco8773 May 18, 2021
ed02fda
delete __init__ file in docs/
rocco8773 May 18, 2021
b496f72
Merge branch 'master_from_plasmapy' into refactor_plasmapy_sphinx
rocco8773 May 18, 2021
fd6d9cc
initial commit for the mark_has_lite_func decorator
rocco8773 May 19, 2021
47902bd
add lite-function group for automodapi
rocco8773 May 19, 2021
15f12ae
add numba to intersphinx_mappings
rocco8773 May 19, 2021
e30a035
setup auto population of __lite_funcs__
rocco8773 May 19, 2021
e6bf576
initial commit for thermal_speed_lite and supporting functionality
rocco8773 May 19, 2021
be2739a
add html-nitpicky command
rocco8773 May 20, 2021
92c2017
Revert "add html-nitpicky command"
rocco8773 May 20, 2021
58683aa
reduce MathJax margin when in tables
rocco8773 May 21, 2021
2341c6f
update thermal_speed docstring to better explain the various methods …
rocco8773 May 21, 2021
cb3e074
fully define thermal_speed_coefficients()
rocco8773 May 21, 2021
eb54dd8
fully define thermal_speed_coefficients()
rocco8773 May 21, 2021
6e69676
add example for thermal_speed.lite
rocco8773 May 21, 2021
7c45387
docstring spelling/phrasing fixes for thermal_speed_coefficients
rocco8773 May 21, 2021
0a34a98
add docstring for thermal_speed_lite
rocco8773 May 21, 2021
32c0c68
add a returns field for thermal_speed_lite
rocco8773 May 21, 2021
33d872f
a few spelling/phrasing docstring fixes
rocco8773 May 21, 2021
69f40d9
initial commit for TestThermalSpeed
rocco8773 May 21, 2021
c76cd3a
test raises cases for thermal_speed_coefficients
rocco8773 May 21, 2021
60969e0
move decorator to handling marking and creation of lite-functionality…
rocco8773 May 21, 2021
54dfd9c
mark_has_lite_func(): drop scope argument, remove use of named tuple,…
rocco8773 May 21, 2021
32ed7ed
add docstring to test_thermal_speed_coefficients_raises
rocco8773 May 21, 2021
523cd60
add test for proper binding of lite functionality to thermal_speed
rocco8773 May 21, 2021
54c4b1a
reorganize test methods
rocco8773 May 24, 2021
0ccc0b3
Merge branch 'master_from_plasmapy' into lite_func_part1
rocco8773 Oct 8, 2021
5974b65
rename decorator mark_has_lite_func -> bind_lite_func
rocco8773 Oct 12, 2021
10341b2
rename arg flite - lite_func
rocco8773 Oct 12, 2021
bf444f8
fill out docstring
rocco8773 Oct 12, 2021
38adced
clean up module docstrings
rocco8773 Oct 12, 2021
1a2db15
clean up code
rocco8773 Oct 12, 2021
6a2f132
initial commit for lite function decorator tests
rocco8773 Oct 12, 2021
1dd8f05
rename dunder __has_lite_func__ -> __bound_lite_func__
rocco8773 Oct 13, 2021
42db94a
remove if statement that is never True
rocco8773 Oct 13, 2021
606caf5
drop LiteFuncList; make __bound_lite_func__ a dict
rocco8773 Oct 13, 2021
114d753
expand bind_lite_func examples in docstring
rocco8773 Oct 13, 2021
91a7ed5
introduce _LiteFuncDict only so __bind_lite_func__ can have a PlasmaP…
rocco8773 Oct 13, 2021
5a11eaf
add a notes section to bind_lite_func docstring
rocco8773 Oct 13, 2021
aab251b
remove the lite function registry (_litefunc_registry)
rocco8773 Oct 13, 2021
c25d3e7
migrate argument attrs from a list of tuples to a dictionary
rocco8773 Oct 13, 2021
777936d
remove unused imports
rocco8773 Oct 13, 2021
e6c4111
whoops, use dict instead of list for attrs
rocco8773 Oct 13, 2021
2b0e3d7
add tests for raised Exceptions by bind_lite_func
rocco8773 Oct 13, 2021
95f4984
PEP8 fix
rocco8773 Oct 13, 2021
fd86299
write test function for issued warnings; decompose the Test function …
rocco8773 Oct 13, 2021
dbf78a1
update warning test to ensure member was not bound
rocco8773 Oct 13, 2021
78bf035
wrote tests for proper binding and definition of the __bound_lite_fun…
rocco8773 Oct 13, 2021
e1abbe9
add a coverage ignore
rocco8773 Oct 13, 2021
5e60d07
add assertion to ensure the decorated function and lite function are …
rocco8773 Oct 13, 2021
8893cc4
parametrize alias tests
rocco8773 Oct 14, 2021
19a7fe7
move thermal tests into their own test file test_thermal_speed.py
rocco8773 Oct 14, 2021
91e62d2
streamline preserve_signature so it does manipulation to the wrapped …
rocco8773 Oct 14, 2021
9e91a2e
update bind_lite_func to allow numba jitted functions
rocco8773 Oct 14, 2021
2882998
add test cases of binding numba jitted (jit and njit) functions
rocco8773 Oct 14, 2021
a852895
write tests for thermal_speed_coefficients
rocco8773 Oct 14, 2021
c59122c
split thermal_speed_lite tests into a separate test class; update tes…
rocco8773 Oct 14, 2021
f88fa6d
move thermal_speed valid value tests into test method test_values
rocco8773 Oct 14, 2021
6ca1451
move thermal_speed raises tests into test method test_raises
rocco8773 Oct 14, 2021
0847791
create test test_can_handle_numpy_arrays
rocco8773 Oct 14, 2021
4ce934c
add skipping of doctests
rocco8773 Oct 14, 2021
936b098
appease angry linters
rocco8773 Oct 14, 2021
e1e53dd
remove trailing whitespace
rocco8773 Oct 14, 2021
bd1e010
remove f-string
rocco8773 Oct 14, 2021
3912f21
remove white space
rocco8773 Oct 14, 2021
d20088c
add test case for warnings by thermal_speed
rocco8773 Oct 14, 2021
912e2c7
add a test that compares electron vs proton thermal speeds
rocco8773 Oct 14, 2021
22f7db5
finish thermal speed test...adding test for assuming Z=1
rocco8773 Oct 14, 2021
6efa364
remove unused imports
rocco8773 Oct 14, 2021
d8fe850
clean up tests
rocco8773 Oct 14, 2021
c2e8f08
appease grumpy black
rocco8773 Oct 14, 2021
8d71e1b
add a coverage ignore
rocco8773 Oct 14, 2021
535b01b
remove unused variables
rocco8773 Oct 14, 2021
8257c43
add change logs
rocco8773 Oct 14, 2021
d6473db
remove redundant comments
rocco8773 Oct 14, 2021
2a23c5f
Apply suggestions from code review
rocco8773 Jan 10, 2022
49f1e81
clean up thermal_speed_coefficients docstring, line length and wording
rocco8773 Jan 10, 2022
76ab31f
Merge branch 'main_from_pp' into lite_func_part1
rocco8773 Jan 10, 2022
52211f6
specify lite functions are jitted when possible
rocco8773 Jan 10, 2022
897e9d6
expand on the NRL method and what the variance is
rocco8773 Jan 11, 2022
365f9ed
remove the variance symbol
rocco8773 Jan 11, 2022
46eef57
rename errStr -> errstr
rocco8773 Jan 11, 2022
da6bf9e
make comment more readable
rocco8773 Jan 11, 2022
93f6c9a
replace PlasmaPyWarning with ValueError
rocco8773 Jan 11, 2022
d7b85a4
add an is jitted test
rocco8773 Jan 11, 2022
050577f
update thermal_speed_lite test such that the python func and c-compil…
rocco8773 Jan 11, 2022
37c410d
add lite-function to the glossary and update the "Lite-Functions" aut…
rocco8773 Jan 11, 2022
35f6160
add plural lite-functions to glossary
rocco8773 Jan 11, 2022
083f48e
add custom CSS styling for Glossary definition list (dl)
rocco8773 Jan 11, 2022
d8f8326
Update docs/glossary.rst
rocco8773 Jan 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add module level docstring for plasmapy_sphinx.automodsumm
  • Loading branch information
rocco8773 committed May 18, 2021
commit a12bbdfefeefa9acdb92100d8d6df064aaf27eb5
59 changes: 59 additions & 0 deletions docs/plasmapy_sphinx/automodsumm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
"""
This sub-package contains functionality that defines the :rst:dir:`automodsumm`
directive and the
`stub file generation
<https://www.sphinx-doc.org/en/master/usage/extensions/autosummary.html
#sphinx-autogen-generate-autodoc-stub-pages>`_
for items listed in :rst:dir:`automodsumm` tables.

*This functionality was highly influenced by and adapted from*
`sphinx.ext.autosummary` *and* `sphinx_automodapi.automodsumm`.

.. contents:: Content
:local:

Defined Directives
------------------

+--------------------------------+-----------------------------------------------------+
| Directive | Description |
+================================+=====================================================+
| | :rst:dir:`automodsumm` | A directive that generates and auto-populates |
| | ``.. automodsumm:: modname`` | `~sphinx.ext.autosummary` tables for a given module |
| | ``modname`` (i.e. sub-package or ``.py`` file). |
+--------------------------------+-----------------------------------------------------+

Defined Configuration Values
----------------------------

+--------------------------------------------------+-----------------------------------+
| Configuration Value | Description |
+==================================================+===================================+
| :confval:`automodapi_custom_groups` | Used to define custom groups to |
| | be displayed by the |
| | :rst:dir:`automodsumm` and |
| | :rst:dir:`automodapi` directives |
+--------------------------------------------------+-----------------------------------+
| :confval:`automodapi_generate_module_stub_files` | Used to control is stub files are |
| | by default generated to modules |
| | (i.e. sub-packages and ``.py`` |
| | files). |
+--------------------------------------------------+-----------------------------------+

Connected Sphinx Events
-----------------------

+------------------------------+-----------------------------------------------+
| Event | Connected |
+==============================+===============================================+
| :event:`builder-inited` | |gendoc| |
+------------------------------+-----------------------------------------------+
| :event:`autodoc-skip-member` | |skip_mem| |
+------------------------------+-----------------------------------------------+

.. |gendoc| replace:: `~plasmapy_sphinx.automodsumm.generate.GenDocsFromAutomodsumm`
.. |skip_mem| replace::
`~plasmapy_sphinx.automodsumm.generate.GenDocsFromAutomodsumm.event_handler__autodoc_skip_member`

"""

from sphinx.application import Sphinx

from . import core, generate
Expand Down