snowblind 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,42 @@
1
+ name: ci
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+
8
+ runs-on: ubuntu-latest
9
+ env:
10
+ OBSERVATORY: jwst
11
+ CRDS_PATH: /tmp/crds_cache
12
+ CRDS_SERVER_URL: https://jwst-crds.stsci.edu
13
+ strategy:
14
+ matrix:
15
+ python-version: ["3.9", "3.10", "3.11"]
16
+
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v3
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ uses: actions/setup-python@v4
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+
28
+ - name: Install dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install ".[test]"
32
+
33
+ - name: Lint with flake8
34
+ run: |
35
+ # stop the build if there are Python syntax errors or undefined names
36
+ flake8 . --count --statistics
37
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39
+
40
+ - name: Test with pytest
41
+ run: |
42
+ pytest tests
@@ -0,0 +1,108 @@
1
+ name: Publish distribution to PyPI
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ build:
7
+ name: Build distribution
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - name: Set up Python
13
+ uses: actions/setup-python@v4
14
+ with:
15
+ python-version: "3.x"
16
+ - name: Install pypa/build
17
+ run: >-
18
+ python3 -m
19
+ pip install
20
+ build
21
+ --user
22
+ - name: Build a binary wheel and a source tarball
23
+ run: python3 -m build
24
+ - name: Store the distribution packages
25
+ uses: actions/upload-artifact@v3
26
+ with:
27
+ name: python-package-distributions
28
+ path: dist/
29
+
30
+ publish-to-pypi:
31
+ name: Publish distribution to PyPI
32
+ if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
33
+ needs:
34
+ - build
35
+ runs-on: ubuntu-latest
36
+ environment:
37
+ name: pypi
38
+ url: https://pypi.org/p/snowblind
39
+ permissions:
40
+ id-token: write # IMPORTANT: mandatory for trusted publishing
41
+
42
+ steps:
43
+ - name: Download all the dists
44
+ uses: actions/download-artifact@v3
45
+ with:
46
+ name: python-package-distributions
47
+ path: dist/
48
+ - name: Publish distribution to PyPI
49
+ uses: pypa/gh-action-pypi-publish@release/v1
50
+
51
+ github-release:
52
+ name: >-
53
+ Sign the Python 🐍 distribution 📦 with Sigstore
54
+ and upload them to GitHub Release
55
+ needs:
56
+ - publish-to-pypi
57
+ runs-on: ubuntu-latest
58
+
59
+ permissions:
60
+ contents: write # IMPORTANT: mandatory for making GitHub Releases
61
+ id-token: write # IMPORTANT: mandatory for sigstore
62
+
63
+ steps:
64
+ - name: Download all the dists
65
+ uses: actions/download-artifact@v3
66
+ with:
67
+ name: python-package-distributions
68
+ path: dist/
69
+ - name: Sign the dists with Sigstore
70
+ uses: sigstore/gh-action-sigstore-python@v1.2.3
71
+ with:
72
+ inputs: >-
73
+ ./dist/*.tar.gz
74
+ ./dist/*.whl
75
+ - name: Upload artifact signatures to GitHub Release
76
+ env:
77
+ GITHUB_TOKEN: ${{ github.token }}
78
+ # Upload to GitHub Release using the `gh` CLI.
79
+ # `dist/` contains the built packages, and the
80
+ # sigstore-produced signatures and certificates.
81
+ run: >-
82
+ gh release upload
83
+ '${{ github.ref_name }}' dist/**
84
+ --repo '${{ github.repository }}'
85
+
86
+ # publish-to-testpypi:
87
+ # name: Publish Python 🐍 distribution 📦 to TestPyPI
88
+ # needs:
89
+ # - build
90
+ # runs-on: ubuntu-latest
91
+
92
+ # environment:
93
+ # name: testpypi
94
+ # url: https://test.pypi.org/p/snowblind
95
+
96
+ # permissions:
97
+ # id-token: write # IMPORTANT: mandatory for trusted publishing
98
+
99
+ # steps:
100
+ # - name: Download all the dists
101
+ # uses: actions/download-artifact@v3
102
+ # with:
103
+ # name: python-package-distributions
104
+ # path: dist/
105
+ # - name: Publish distribution 📦 to TestPyPI
106
+ # uses: pypa/gh-action-pypi-publish@release/v1
107
+ # with:
108
+ # repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,132 @@
1
+ .DS_Store
2
+ # Byte-compiled / optimized / DLL files
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ pip-wheel-metadata/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+ *_version.py
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py,cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+ docs/api/
76
+
77
+ # PyBuilder
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
98
+ __pypackages__/
99
+
100
+ # Celery stuff
101
+ celerybeat-schedule
102
+ celerybeat.pid
103
+
104
+ # SageMath parsed files
105
+ *.sage.py
106
+
107
+ # Environments
108
+ .env
109
+ .venv
110
+ env/
111
+ venv/
112
+ ENV/
113
+ env.bak/
114
+ venv.bak/
115
+
116
+ # Spyder project settings
117
+ .spyderproject
118
+ .spyproject
119
+
120
+ # Rope project settings
121
+ .ropeproject
122
+
123
+ # mkdocs documentation
124
+ /site
125
+
126
+ # mypy
127
+ .mypy_cache/
128
+ .dmypy.json
129
+ dmypy.json
130
+
131
+ # Pyre type checker
132
+ .pyre/
@@ -0,0 +1,26 @@
1
+ cff-version: 1.2.0
2
+ title: my_package
3
+ message: If you use this software, please cite as below.
4
+ date-released: 2022-03-29
5
+ url: 'https://github.com/mpi-astronomy/mpia-python-template'
6
+ version: 0.0.1
7
+ type: software
8
+ authors:
9
+ - family-names: Name
10
+ given-names: Author
11
+ email: author.name@email.com
12
+ affiliation: MPIA
13
+ orcid: 'https://orcid.org/0000-0003-1665-2073'
14
+
15
+ # For citing software, see:
16
+
17
+ # http://journals.aas.org/authors/references.html
18
+
19
+ # GitHub has Zenodo DOI integration:
20
+ # https://guides.github.com/activities/citable-code/
21
+
22
+ # What is a CITATION.cff file:
23
+ # https://citation-file-format.github.io/
24
+
25
+ # This CITATION.cff file was generated with cffinit.
26
+ # Visit https://bit.ly/cffinit to generate yours today!
@@ -0,0 +1,37 @@
1
+ We are committed to providing a strong and
2
+ enforced code of conduct and expect everyone in our community to follow these
3
+ guidelines when interacting with others in all forums. Our goal is to keep ours
4
+ a positive, inclusive, successful, and growing community.
5
+
6
+ [ All Max Planck Institute for Astronomy (MPIA) researchers are bound to adhere to the
7
+ [Max Plack Society Code of Conduct](https://www.mpg.de/14172230/code-of-conduct.pdf) and the [MPIA Work Agreement](https://intranet.mpia.de/4404342/03-Works-agreement-code-of-conduct.pdf) (intranet link). All MPIA employees should attach importance to creating a respectful and healthy atmosphere
8
+ and a level playing field for research and work. Their goal is to ensure good working conditions
9
+ for everyone and to provide the basis for individual job satisfaction, personal development,
10
+ motivation, collegiality and positive interpersonal relations. ]
11
+
12
+ [ Interactions on GitHub are not limited to those between MPIA employees.] The community of
13
+ participants in open source astronomy projects is made up of members from
14
+ around the globe with a diverse set of skills, personalities, and experiences.
15
+ It is through these differences that our community experiences success and
16
+ continued growth. As members of this global community:
17
+
18
+ 1. We pledge to treat all people with respect and provide a harassment- and bullying-free environment, regardless of sex, sexual orientation and/or gender identity, disability, physical appearance, body size, race, nationality, ethnicity, and religion. In particular, sexual language and imagery, sexist, racist, or otherwise exclusionary jokes are not appropriate.
19
+ 2. We pledge to respect the work of others by recognizing acknowledgment/citation requests of original authors. As authors, we pledge to be explicit about how we want our own work to be cited or acknowledged.
20
+ 3. We pledge to welcome those interested in joining the community, and realize that including people with a variety of opinions and backgrounds will only serve to enrich our community. In particular, discussions relating to pros/cons of various technologies, programming languages, and so on are welcome, but these should be done with respect, taking proactive measure to ensure that all participants are heard and feel confident that they can freely express their opinions.
21
+ 4. We pledge to welcome questions and answer them respectfully, paying particular attention to those new to the community. We pledge to provide respectful criticisms and feedback in forums, especially in discussion threads resulting from code contributions.
22
+ 5. We pledge to be conscientious of the perceptions of the wider community and to respond to criticism respectfully. We will strive to model behaviors that encourage productive debate and disagreement, both within our community and where we are criticized. We will treat those outside our community with the same respect as people within our community.
23
+ 6. We pledge to help the entire community follow the code of conduct, and to not remain silent when we see violations of the code of conduct.
24
+
25
+ **This code of conduct applies to all community situations online and offline, including mailing lists, forums, social media, conferences, meetings, associated social events, and one-to-one interactions.**
26
+
27
+ **Reporting**: Please report any violations of the Code of Conduct to the owners of the [`mpi-astronomy` [GitHub organization](https://github.com/orgs/mpi-astronomy/people)]. As community leaders we are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. All community leaders are obligated to respect the privacy and security of the reporter of any incident.
28
+
29
+ **Enforcement**: We follow the enforcement guidelines of the [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). [For MPIA employees, the matter will be referred to the contacts listed in Section 7 of the [MPIA Work Agreement](https://intranet.mpia.de/4404342/03-Works-agreement-code-of-conduct.pdf) (intranet link).
30
+ For external people, the owners of the GitHub organization will decide in consultation with the MPIA directorate.]
31
+
32
+ Parts of this code of conduct have been adapted from the Astropy and NumFOCUS codes of conduct:
33
+
34
+ https://www.astropy.org/code_of_conduct.html
35
+
36
+ https://www.numfocus.org/about/code-of-conduct/
37
+
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2022, Max Planck Institute for Astronomy
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,101 @@
1
+ Metadata-Version: 2.1
2
+ Name: snowblind
3
+ Version: 0.1.0
4
+ Summary: Mask cosmic ray showers (snowballs) in JWST data
5
+ Author-email: James Davies <jdavies@mpia.de>
6
+ License: BSD 3-Clause License
7
+
8
+ Copyright (c) 2022, Max Planck Institute for Astronomy
9
+ All rights reserved.
10
+
11
+ Redistribution and use in source and binary forms, with or without
12
+ modification, are permitted provided that the following conditions are met:
13
+
14
+ 1. Redistributions of source code must retain the above copyright notice, this
15
+ list of conditions and the following disclaimer.
16
+
17
+ 2. Redistributions in binary form must reproduce the above copyright notice,
18
+ this list of conditions and the following disclaimer in the documentation
19
+ and/or other materials provided with the distribution.
20
+
21
+ 3. Neither the name of the copyright holder nor the names of its
22
+ contributors may be used to endorse or promote products derived from
23
+ this software without specific prior written permission.
24
+
25
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
29
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
+
36
+ Project-URL: Bug Tracker, https://github.com/mpi-astronomy/snowblind/issues
37
+ Project-URL: Source Code, https://github.com/mpi-astronomy/snowblind
38
+ Classifier: Programming Language :: Python :: 3
39
+ Classifier: License :: OSI Approved :: BSD License
40
+ Classifier: Operating System :: OS Independent
41
+ Requires-Python: >=3.9
42
+ Description-Content-Type: text/markdown
43
+ License-File: LICENSE
44
+ Requires-Dist: jwst
45
+ Requires-Dist: numpy
46
+ Requires-Dist: scikit-image
47
+ Requires-Dist: stpipe
48
+ Provides-Extra: docs
49
+ Requires-Dist: sphinx; extra == "docs"
50
+ Requires-Dist: sphinx-automodapi; extra == "docs"
51
+ Requires-Dist: numpydoc; extra == "docs"
52
+ Provides-Extra: test
53
+ Requires-Dist: pytest; extra == "test"
54
+ Requires-Dist: flake8; extra == "test"
55
+ Requires-Dist: flake8-pyproject; extra == "test"
56
+ Requires-Dist: codecov; extra == "test"
57
+ Requires-Dist: pytest-cov; extra == "test"
58
+
59
+ Algorithms for cleaning JWST data.
60
+
61
+ - `SnowBlindStep`: mask cosmic ray showers and snowballs
62
+ - `JumpPlusStep`: flag jumps and saturated pixels caused by cosmic rays properly
63
+ when there are frame-averaged groups
64
+ - `PersistenceFlagStep`: flag pixels due to persistence between exposures
65
+ - `RcSelfCalStep`: flag new hot pixels
66
+
67
+
68
+ ## Installation
69
+
70
+
71
+ pip install snowblind
72
+
73
+
74
+ ## Usage
75
+
76
+ The steps in snowblind run like any other pipeline steps. From the command line:
77
+
78
+ strun snowblind jw001234_010203_00001_nrcalong_jump.fits --suffix=snowblind
79
+
80
+ In Python:
81
+
82
+ from snowblind import SnowblindStep
83
+ from jwst.pipeline import Detector1Pipeline
84
+ from jwst.ramp_fitting import RampFitStep
85
+
86
+
87
+ steps = {
88
+ "jump": {
89
+ "save_results": True,
90
+ }
91
+ "ramp_fit": {
92
+ "skip": True
93
+ }
94
+ }
95
+
96
+ Detector1Pipeline.call("jw001234_010203_00001_nrcalong_uncal.fits", steps=steps)
97
+ SnowblindStep.call("jw001234_010203_00001_nrcalong_jump.fits", save_results=True, suffix="snowblind")
98
+ rate, rateints = RampFitStep.call("jw001234_010203_00001_nrcalong_snowblind.fits")
99
+ rate.save(cal.meta.filename.replace("snowblind", "rate"))
100
+
101
+ More to come on the other steps available.
@@ -0,0 +1,43 @@
1
+ Algorithms for cleaning JWST data.
2
+
3
+ - `SnowBlindStep`: mask cosmic ray showers and snowballs
4
+ - `JumpPlusStep`: flag jumps and saturated pixels caused by cosmic rays properly
5
+ when there are frame-averaged groups
6
+ - `PersistenceFlagStep`: flag pixels due to persistence between exposures
7
+ - `RcSelfCalStep`: flag new hot pixels
8
+
9
+
10
+ ## Installation
11
+
12
+
13
+ pip install snowblind
14
+
15
+
16
+ ## Usage
17
+
18
+ The steps in snowblind run like any other pipeline steps. From the command line:
19
+
20
+ strun snowblind jw001234_010203_00001_nrcalong_jump.fits --suffix=snowblind
21
+
22
+ In Python:
23
+
24
+ from snowblind import SnowblindStep
25
+ from jwst.pipeline import Detector1Pipeline
26
+ from jwst.ramp_fitting import RampFitStep
27
+
28
+
29
+ steps = {
30
+ "jump": {
31
+ "save_results": True,
32
+ }
33
+ "ramp_fit": {
34
+ "skip": True
35
+ }
36
+ }
37
+
38
+ Detector1Pipeline.call("jw001234_010203_00001_nrcalong_uncal.fits", steps=steps)
39
+ SnowblindStep.call("jw001234_010203_00001_nrcalong_jump.fits", save_results=True, suffix="snowblind")
40
+ rate, rateints = RampFitStep.call("jw001234_010203_00001_nrcalong_snowblind.fits")
41
+ rate.save(cal.meta.filename.replace("snowblind", "rate"))
42
+
43
+ More to come on the other steps available.
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,53 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # This file only contains a selection of the most common options. For a full
4
+ # list see the documentation:
5
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
6
+
7
+ # -- Path setup --------------------------------------------------------------
8
+
9
+ # If extensions (or modules to document with autodoc) are in another directory,
10
+ # add these directories to sys.path here. If the directory is relative to the
11
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
12
+ #
13
+ # import os
14
+ # import sys
15
+ # sys.path.insert(0, os.path.abspath('.'))
16
+
17
+
18
+ # -- Project information -----------------------------------------------------
19
+
20
+ project = 'my_package'
21
+ copyright = '2022, Author Name'
22
+ author = 'Author Name'
23
+
24
+
25
+ # -- General configuration ---------------------------------------------------
26
+
27
+ # Add any Sphinx extension module names here, as strings. They can be
28
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
29
+ # ones.
30
+ extensions = ['sphinx_automodapi.automodapi'
31
+ ]
32
+ numpydoc_show_class_members = False
33
+
34
+ # Add any paths that contain templates here, relative to this directory.
35
+ templates_path = ['_templates']
36
+
37
+ # List of patterns, relative to source directory, that match files and
38
+ # directories to ignore when looking for source files.
39
+ # This pattern also affects html_static_path and html_extra_path.
40
+ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
41
+
42
+
43
+ # -- Options for HTML output -------------------------------------------------
44
+
45
+ # The theme to use for HTML and HTML Help pages. See the documentation for
46
+ # a list of builtin themes.
47
+ #
48
+ html_theme = 'alabaster'
49
+
50
+ # Add any paths that contain custom static files (such as style sheets) here,
51
+ # relative to this directory. They are copied after the builtin static files,
52
+ # so a file named "default.css" will overwrite the builtin "default.css".
53
+ html_static_path = ['_static']
@@ -0,0 +1,67 @@
1
+ .. my_package documentation master file, created by
2
+ sphinx-quickstart on Tue Mar 22 13:13:41 2022.
3
+ You can adapt this file completely to your liking, but it should at least
4
+ contain the root `toctree` directive.
5
+
6
+ Welcome to my_package's documentation!
7
+ ======================================
8
+
9
+ .. toctree::
10
+ :maxdepth: 2
11
+ :caption: Contents:
12
+
13
+
14
+ Here is where you can write the documentation for your package.
15
+
16
+
17
+ Usage
18
+ =====
19
+
20
+ .. _installation:
21
+
22
+ Installation
23
+ ------------
24
+
25
+ To use `my_package` you need to install X, Y and Z.
26
+
27
+
28
+ .. _code:
29
+
30
+ Code
31
+ ----
32
+
33
+ Here is an example of describing the use of your function.
34
+
35
+ To add one to a number you can use the ``my_package.add_one()`` function:
36
+
37
+ .. py:function:: my_package.add_one(number)
38
+
39
+
40
+ :param number: Should be integer, floating point number or a string.
41
+
42
+ If ``number`` is not one of these types, an exception will be raised:
43
+
44
+ .. py:exception:: TypeError
45
+
46
+ Raised if the input is invalid.
47
+
48
+ More about how to describe code can be hound
49
+ `here <https://www.sphinx-doc.org/en/master/tutorial/describing-code.html>`_
50
+
51
+
52
+ ..
53
+ The following section creates an index, a list of modules and a
54
+ search page.
55
+
56
+ Indices and tables
57
+ ==================
58
+
59
+ * :ref:`genindex`
60
+ * :ref:`modindex`
61
+ * :ref:`search`
62
+
63
+ ..
64
+ The following will add the signature of the individual functions and pull
65
+ their docstrings.
66
+
67
+ .. automodapi:: my_package.example