km3smk 0.2.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.
Files changed (38) hide show
  1. km3smk-0.2.0/.coveragerc +15 -0
  2. km3smk-0.2.0/.gitignore +38 -0
  3. km3smk-0.2.0/.gitlab-ci.yml +98 -0
  4. km3smk-0.2.0/CHANGELOG.rst +16 -0
  5. km3smk-0.2.0/CONTRIBUTING.rst +164 -0
  6. km3smk-0.2.0/LICENSE +29 -0
  7. km3smk-0.2.0/MANIFEST.in +3 -0
  8. km3smk-0.2.0/Makefile +49 -0
  9. km3smk-0.2.0/PKG-INFO +108 -0
  10. km3smk-0.2.0/README.rst +42 -0
  11. km3smk-0.2.0/doc/Makefile +20 -0
  12. km3smk-0.2.0/doc/_static/default.css +3 -0
  13. km3smk-0.2.0/doc/_static/default_gallery_thumbnail.png +0 -0
  14. km3smk-0.2.0/doc/changelog.rst +4 -0
  15. km3smk-0.2.0/doc/conf.py +84 -0
  16. km3smk-0.2.0/doc/contribute.rst +1 -0
  17. km3smk-0.2.0/doc/examples.rst +5 -0
  18. km3smk-0.2.0/doc/gen_modules/.gitkeep +0 -0
  19. km3smk-0.2.0/doc/index.rst +24 -0
  20. km3smk-0.2.0/doc/make.bat +35 -0
  21. km3smk-0.2.0/examples/README.rst +4 -0
  22. km3smk-0.2.0/pyproject.toml +5 -0
  23. km3smk-0.2.0/setup.cfg +107 -0
  24. km3smk-0.2.0/setup.py +6 -0
  25. km3smk-0.2.0/src/km3smk/__init__.py +13 -0
  26. km3smk-0.2.0/src/km3smk/bookkeeping.py +49 -0
  27. km3smk-0.2.0/src/km3smk/onerror.py +253 -0
  28. km3smk-0.2.0/src/km3smk/onstart.py +134 -0
  29. km3smk-0.2.0/src/km3smk/tools.py +76 -0
  30. km3smk-0.2.0/src/km3smk/version.py +34 -0
  31. km3smk-0.2.0/src/km3smk/workflow_settings.py +60 -0
  32. km3smk-0.2.0/src/km3smk.egg-info/PKG-INFO +108 -0
  33. km3smk-0.2.0/src/km3smk.egg-info/SOURCES.txt +37 -0
  34. km3smk-0.2.0/src/km3smk.egg-info/dependency_links.txt +1 -0
  35. km3smk-0.2.0/src/km3smk.egg-info/requires.txt +39 -0
  36. km3smk-0.2.0/src/km3smk.egg-info/top_level.txt +1 -0
  37. km3smk-0.2.0/tests/Snakefile +32 -0
  38. km3smk-0.2.0/tests/test_workflow.py +9 -0
@@ -0,0 +1,15 @@
1
+ [run]
2
+ source = km3smk
3
+
4
+ [report]
5
+ omit =
6
+ src/km3smk/version.py
7
+ exclude_lines =
8
+ pragma: no cover
9
+ raise AssertionError
10
+ raise NotImplementedError
11
+ if 0:
12
+ if __name__ == .__main__.:
13
+ if self.debug:
14
+ if settings.DEBUG
15
+ def __repr__
@@ -0,0 +1,38 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyxbldc
5
+
6
+ # Version info
7
+ src/km3smk/version.py
8
+
9
+ # Build stuff
10
+ build/
11
+ develop-eggs/
12
+ dist/
13
+ eggs/
14
+ sdist/
15
+ *.egg-info/
16
+ *.egg
17
+ .eggs
18
+ pip-wheel-metadata
19
+
20
+ # Unit test / coverage reports
21
+ htmlcov/
22
+ .tox/
23
+ .coverage
24
+ .cache
25
+ nosetests.xml
26
+ coverage.xml
27
+ .coverage.*
28
+ junit*.xml
29
+ reports
30
+
31
+ # Sphinx documentation
32
+ doc/_build/
33
+ doc/auto_examples/
34
+ doc/gen_modules/*.examples
35
+ doc/api
36
+
37
+ # Virtual env
38
+ venv
@@ -0,0 +1,98 @@
1
+ image: docker.km3net.de/base/python:3
2
+
3
+ # Change pip's cache directory to be inside the project directory since we can
4
+ # only cache local items.
5
+ variables:
6
+ PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
7
+
8
+ cache:
9
+ paths:
10
+ - .cache/pip
11
+
12
+ stages:
13
+ - test
14
+ - coverage
15
+ - doc
16
+ - release
17
+
18
+ .virtualenv_template: &virtualenv_definition |
19
+ python -V
20
+ python3 -m venv venv
21
+ source venv/bin/activate
22
+ pip install -U pip setuptools wheel setuptools_scm snakemake
23
+ hash -r
24
+ pip freeze
25
+ make install-dev
26
+ pip freeze
27
+
28
+ .junit_template: &junit_definition
29
+ artifacts:
30
+ reports:
31
+ junit: "reports/junit*.xml"
32
+
33
+ test-py3.11:
34
+ image: docker.km3net.de/base/python:3.11
35
+ stage: test
36
+ script:
37
+ - *virtualenv_definition
38
+ - make test
39
+ <<: *junit_definition
40
+
41
+ code-style:
42
+ image: docker.km3net.de/base/python:3.11
43
+ stage: test
44
+ script:
45
+ - *virtualenv_definition
46
+ - make black-check
47
+ allow_failure: true
48
+
49
+ coverage:
50
+ image: docker.km3net.de/base/python:3.11
51
+ stage: coverage
52
+ script:
53
+ - *virtualenv_definition
54
+ - make install-dev
55
+ - "make test-cov|grep TOTAL| awk '{printf \"COVERAGE: %.2f%%\", (1-$3/$2)*100 }'"
56
+ coverage: '/COVERAGE:\s*([0-9]*\.[0-9]*%)/'
57
+ artifacts:
58
+ paths:
59
+ - reports/coverage
60
+
61
+
62
+ build-docs:
63
+ image: docker.km3net.de/base/python:3.11
64
+ stage: doc
65
+ script:
66
+ - *virtualenv_definition
67
+ - cd doc && make clean && make html
68
+ cache: {}
69
+
70
+ pages:
71
+ image: docker.km3net.de/base/python:3.11
72
+ stage: doc
73
+ script:
74
+ - *virtualenv_definition
75
+ - cd doc && make clean && make html
76
+ - mv _build/html ../public/
77
+ - cd .. && mv reports/coverage public/coverage
78
+ artifacts:
79
+ paths:
80
+ - public
81
+ cache: {}
82
+ only:
83
+ - tags
84
+ - master
85
+
86
+
87
+ pypi:
88
+ image: docker.km3net.de/base/python:3.11
89
+ stage: release
90
+ cache: {}
91
+ script:
92
+ - pip install -U twine wheel setuptools_scm
93
+ - python setup.py sdist
94
+ - python setup.py bdist_wheel
95
+ - twine upload dist/*
96
+ only:
97
+ - tags
98
+ allow_failure: true
@@ -0,0 +1,16 @@
1
+ Unreleased changes
2
+ ------------------
3
+
4
+
5
+ Version 0
6
+ ---------
7
+
8
+ 0.2.0 / 2026-02-03
9
+ ~~~~~~~~~~~~~~~~~~
10
+
11
+ * First effective version
12
+
13
+ 0.1.0 / 2024-06-03
14
+ ~~~~~~~~~~~~~~~~~~
15
+ * Project generated using the cookiecutter template from
16
+ https://git.km3net.de/templates/python-project
@@ -0,0 +1,164 @@
1
+ Filing Bugs or Feature Requests
2
+ -------------------------------
3
+
4
+ Please **always** create an issue when you encounter any bugs, problems or
5
+ need a new feature. Emails and private messages are not meant to communicate
6
+ such things!
7
+
8
+ Use the appropriate template and file a new issue here:
9
+ https://git.km3net.de/vpestel/km3smk/issues
10
+
11
+ You can browse all the issues here: https://git.km3net.de/vpestel/km3smk/issues
12
+
13
+ Please follow the instructions in the templates to provide all the
14
+ necessary information which will help other people to understand the
15
+ situation.
16
+
17
+ Improve
18
+ -------
19
+
20
+ Check out our KanBan board https://git.km3net.de/vpestel/km3smk/boards,
21
+ which shows all the open issues in three columns:
22
+
23
+ - *discussion*: The issues which are yet to be discussed (e.g. not clear how to proceed)
24
+ - *todo*: Issues tagged with this label are ready to be tackled
25
+ - *doing*: These issues are currently "work in progress". They can however be
26
+ put tossed back to *todo* column at any time if the development is suspended.
27
+
28
+ Here is the recommended workflow if you want to improve this project. This is a
29
+ standard procedure for collaborative software development, nothing exotic!
30
+
31
+ Feel free to contribute ;)
32
+
33
+ Make a Fork
34
+ ~~~~~~~~~~~
35
+
36
+ You create a fork (your full own copy of the
37
+ repository), change the code and when you are happy with the changes, you create
38
+ a merge request, so we can review, discuss and add your contribution.
39
+ Merge requests are automatically tested on our GitLab CI server and you
40
+ don't have to do anything special.
41
+
42
+ Go to https://git.km3net.de/vpestel/km3smk and click on "Fork".
43
+
44
+ After that, you will have a full copy of the code with write access under an URL
45
+ like this: ``https://git.km3net.de/YOUR_USERNAME/km3smk``
46
+
47
+ Clone your Fork to your PC
48
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
49
+
50
+ Get a local copy to work on (use the SSH address `git@git...`, not the HTTP one)::
51
+
52
+ git clone git@git.km3net.de:YOUR_USERNAME/km3smk
53
+
54
+ Now you need to add a reference to the original repository, so you can sync your
55
+ own fork with the original repository::
56
+
57
+ cd km3smk
58
+ git remote add upstream https://git.km3net.de/vpestel/km3smk
59
+
60
+
61
+ Keep your Fork Up to Date
62
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
63
+
64
+ To get the most recent commits (including all branches), run::
65
+
66
+ git fetch upstream
67
+
68
+ This will download all the missing commits and branches which are now accessible
69
+ using the ``upstream/...`` prefix::
70
+
71
+ $ git fetch upstream
72
+ From km3smk
73
+ * [new branch] gitlab_jenkins_ci_test -> upstream/gitlab_jenkins_ci_test
74
+ * [new branch] legacy -> upstream/legacy
75
+ * [new branch] master -> upstream/master
76
+
77
+
78
+ If you want to update for example your **own** ``master`` branch
79
+ to contain all the changes on the official ``master`` branch of the original repository,
80
+ switch to it first with::
81
+
82
+ git checkout master
83
+
84
+ and then merge the ``upstream/master`` into it::
85
+
86
+ git merge upstream/master
87
+
88
+ Make sure to regularly ``git fetch upstream`` and merge changes to your own branches.
89
+
90
+ Push your changes to Gitlab regularly
91
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92
+
93
+ Make sure to keep your fork up to date on the GitLab server by pushing
94
+ all your commits regularly using::
95
+
96
+ git push
97
+
98
+
99
+ Install in Developer Mode
100
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
101
+
102
+ This project can be installed in ``dev-mode``, which means, it links itself to
103
+ your site-packages and you can edit the sources and test them without the need
104
+ to reinstall it all the time. Although you will need to restart any
105
+ ``python``, ``ipython`` or ``jupyter``-notebook (only the kernel!) if you
106
+ imported this python package before you made the changes.
107
+
108
+ Go to your own fork folder (as described above) and check out the branch you
109
+ want to work on::
110
+
111
+ git checkout master # the main development branch (should always be stable)
112
+ make install-dev
113
+
114
+
115
+ Running the Test Suite
116
+ ~~~~~~~~~~~~~~~~~~~~~~
117
+
118
+ Make sure to run the test suite first to see if everything is working
119
+ correctly::
120
+
121
+ $ make test
122
+
123
+ This should give you a green bar!
124
+
125
+ Run the tests every time you make changes to see if you broke anything! It usually
126
+ takes just a few seconds and ensures that you don't break existing code. It's
127
+ also an easy way to spot syntax errors ;)
128
+
129
+ You can also start a script which will watch for file changes and retrigger
130
+ a test suite run every time for you. It's a nice practice to have a terminal
131
+ open running this script to check your test results continuously::
132
+
133
+ make test-loop
134
+
135
+ Time to Code
136
+ ~~~~~~~~~~~~
137
+
138
+ We develop new features and fix bugs on separate branches and merge them
139
+ back to ``master`` when they are stable. Merge requests (see below) are also
140
+ pointing towards this branch.
141
+
142
+ If you are working on your own fork, you can stay on your own ``master`` branch
143
+ and create merge requests from that.
144
+
145
+ Code Style
146
+ ~~~~~~~~~~
147
+
148
+ Make sure to run ``black`` over the code, which ensures that the code style
149
+ matches the one we love and respect. We have a tool which makes it easy::
150
+
151
+ make black
152
+
153
+ Create a Merge Request (aka Pull Request)
154
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
155
+
156
+ Go to https://git.km3net.de/vpestel/km3smk/merge_requests/new and select your
157
+ source branch, which contains the changes you want to be added to this project
158
+ and select the ``master`` branch as target branch.
159
+
160
+ That's it, the merge will be accepted if everything is OK ;)
161
+
162
+ If you want to join the dev-team, let us know! Once you are a member of the
163
+ project, you can work on branches in this repository, without the need to
164
+ use your own fork :)
km3smk-0.2.0/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) YEAR, The KM3NeT collaboration
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
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * 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
+ * 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,3 @@
1
+ include README.rst
2
+ include LICENSE
3
+ include requirements/*.txt
km3smk-0.2.0/Makefile ADDED
@@ -0,0 +1,49 @@
1
+ install:
2
+ pip install .
3
+
4
+ install-dev:
5
+ pip install -e ".[dev]"
6
+ python -m ipykernel install --user --name=km3smk
7
+
8
+ clean:
9
+ python setup.py clean --all
10
+
11
+ test:
12
+ py.test --junitxml=./reports/junit.xml -o junit_suite_name=km3smk tests
13
+
14
+ test-cov:
15
+ py.test --cov src/km3smk --cov-report term-missing --cov-report xml:reports/coverage.xml --cov-report html:reports/coverage tests
16
+
17
+ test-loop:
18
+ py.test tests
19
+ ptw --ext=.py,.pyx --ignore=doc tests
20
+
21
+ flake8:
22
+ py.test --flake8
23
+
24
+ pep8: flake8
25
+
26
+ docstyle:
27
+ py.test --docstyle
28
+
29
+ lint:
30
+ py.test --pylint
31
+
32
+ .PHONY: black
33
+ black:
34
+ black --exclude 'version.py' src/km3smk
35
+ black examples
36
+ black tests
37
+ black doc/conf.py
38
+ black setup.py
39
+
40
+ .PHONY: black-check
41
+ black-check:
42
+ black --check --exclude 'version.py' src/km3smk
43
+ black --check examples
44
+ black --check tests
45
+ black --check doc/conf.py
46
+ black --check setup.py
47
+
48
+
49
+ .PHONY: all clean install install-dev test test-nocov flake8 pep8 docstyle black black-check
km3smk-0.2.0/PKG-INFO ADDED
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.1
2
+ Name: km3smk
3
+ Version: 0.2.0
4
+ Summary: The km3smk project
5
+ Home-page: https://git.km3net.de/vpestel/km3smk
6
+ Author: Valentin Pestel
7
+ Author-email: vpestel@km3net.de
8
+ Maintainer: Valentin Pestel
9
+ Maintainer-email: vpestel@km3net.de
10
+ License: MIT
11
+ Keywords: neutrino,astroparticle,physics,HEP
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: BSD License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Programming Language :: Python :: 3.6
21
+ Classifier: Programming Language :: Python :: 3.7
22
+ Classifier: Programming Language :: Python :: 3.8
23
+ Classifier: Programming Language :: Python :: 3.9
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Topic :: Scientific/Engineering
26
+ Requires-Python: >=3.6
27
+ Description-Content-Type: text/x-rst
28
+ License-File: LICENSE
29
+ Requires-Dist: setuptools_scm
30
+ Requires-Dist: km3db>=0.14.1
31
+ Requires-Dist: pandas
32
+ Provides-Extra: all
33
+ Requires-Dist: black; extra == "all"
34
+ Requires-Dist: matplotlib; extra == "all"
35
+ Requires-Dist: numpydoc; extra == "all"
36
+ Requires-Dist: ipykernel; extra == "all"
37
+ Requires-Dist: pillow; extra == "all"
38
+ Requires-Dist: pytest; extra == "all"
39
+ Requires-Dist: pytest-cov; extra == "all"
40
+ Requires-Dist: pytest-flake8; extra == "all"
41
+ Requires-Dist: pylint; extra == "all"
42
+ Requires-Dist: pytest-watch; extra == "all"
43
+ Requires-Dist: sphinx; extra == "all"
44
+ Requires-Dist: sphinx-autoapi; extra == "all"
45
+ Requires-Dist: sphinx-gallery>=0.12.1; extra == "all"
46
+ Requires-Dist: sphinx_rtd_theme; extra == "all"
47
+ Requires-Dist: sphinxcontrib-versioning; extra == "all"
48
+ Requires-Dist: wheel; extra == "all"
49
+ Provides-Extra: dev
50
+ Requires-Dist: black; extra == "dev"
51
+ Requires-Dist: matplotlib; extra == "dev"
52
+ Requires-Dist: numpydoc; extra == "dev"
53
+ Requires-Dist: ipykernel; extra == "dev"
54
+ Requires-Dist: pillow; extra == "dev"
55
+ Requires-Dist: pytest; extra == "dev"
56
+ Requires-Dist: pytest-cov; extra == "dev"
57
+ Requires-Dist: pytest-flake8; extra == "dev"
58
+ Requires-Dist: pylint; extra == "dev"
59
+ Requires-Dist: pytest-watch; extra == "dev"
60
+ Requires-Dist: sphinx; extra == "dev"
61
+ Requires-Dist: sphinx-autoapi; extra == "dev"
62
+ Requires-Dist: sphinx-gallery>=0.1.12; extra == "dev"
63
+ Requires-Dist: sphinx_rtd_theme; extra == "dev"
64
+ Requires-Dist: sphinxcontrib-versioning; extra == "dev"
65
+ Requires-Dist: wheel; extra == "dev"
66
+
67
+ The km3smk project
68
+ ==================
69
+
70
+ .. image:: https://git.km3net.de/vpestel/km3smk/badges/master/pipeline.svg
71
+ :target: https://git.km3net.de/vpestel/km3smk/pipelines
72
+
73
+ .. image:: https://git.km3net.de/vpestel/km3smk/badges/master/coverage.svg
74
+ :target: https://vpestel.pages.km3net.de/km3smk/coverage
75
+
76
+ .. image:: https://git.km3net.de/examples/km3badges/-/raw/master/docs-latest-brightgreen.svg
77
+ :target: https://vpestel.pages.km3net.de/km3smk
78
+
79
+
80
+ Installation
81
+ ~~~~~~~~~~~~
82
+
83
+ It is recommended to first create an isolated virtualenvironment to not interfere
84
+ with other Python projects::
85
+
86
+ git clone https://git.km3net.de/vpestel/km3smk
87
+ cd km3smk
88
+ python3 -m venv venv
89
+ . venv/bin/activate
90
+
91
+ Install directly from the Git server via ``pip`` (no cloneing needed)::
92
+
93
+ pip install git+https://git.km3net.de/vpestel/km3smk
94
+
95
+ Or clone the repository and run::
96
+
97
+ make install
98
+
99
+ To install all the development dependencies, in case you want to contribute or
100
+ run the test suite::
101
+
102
+ make install-dev
103
+ make test
104
+
105
+
106
+ ---
107
+
108
+ *Created with ``cookiecutter https://git.km3net.de/templates/python-project``*
@@ -0,0 +1,42 @@
1
+ The km3smk project
2
+ ==================
3
+
4
+ .. image:: https://git.km3net.de/vpestel/km3smk/badges/master/pipeline.svg
5
+ :target: https://git.km3net.de/vpestel/km3smk/pipelines
6
+
7
+ .. image:: https://git.km3net.de/vpestel/km3smk/badges/master/coverage.svg
8
+ :target: https://vpestel.pages.km3net.de/km3smk/coverage
9
+
10
+ .. image:: https://git.km3net.de/examples/km3badges/-/raw/master/docs-latest-brightgreen.svg
11
+ :target: https://vpestel.pages.km3net.de/km3smk
12
+
13
+
14
+ Installation
15
+ ~~~~~~~~~~~~
16
+
17
+ It is recommended to first create an isolated virtualenvironment to not interfere
18
+ with other Python projects::
19
+
20
+ git clone https://git.km3net.de/vpestel/km3smk
21
+ cd km3smk
22
+ python3 -m venv venv
23
+ . venv/bin/activate
24
+
25
+ Install directly from the Git server via ``pip`` (no cloneing needed)::
26
+
27
+ pip install git+https://git.km3net.de/vpestel/km3smk
28
+
29
+ Or clone the repository and run::
30
+
31
+ make install
32
+
33
+ To install all the development dependencies, in case you want to contribute or
34
+ run the test suite::
35
+
36
+ make install-dev
37
+ make test
38
+
39
+
40
+ ---
41
+
42
+ *Created with ``cookiecutter https://git.km3net.de/templates/python-project``*
@@ -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,3 @@
1
+ .rst-content .highlight>pre {
2
+ line-height: 18px;
3
+ }
@@ -0,0 +1,4 @@
1
+ Changelog
2
+ =========
3
+
4
+ .. include:: ../CHANGELOG.rst
@@ -0,0 +1,84 @@
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
+ import sys
17
+ import os
18
+ from datetime import date
19
+ import sphinx_rtd_theme
20
+
21
+ try:
22
+ from importlib.metadata import version as get_version
23
+
24
+ version = get_version("km3smk")
25
+ except ImportError:
26
+ from pkg_resources import get_distribution
27
+
28
+ version = get_distribution("km3smk").version
29
+
30
+ # -- Project information -----------------------------------------------------
31
+ short_version = ".".join(version.split(".")[:2])
32
+ project = "km3smk {}".format(short_version)
33
+ copyright = "{0}, Valentin Pestel".format(date.today().year)
34
+ author = "Valentin Pestel"
35
+
36
+ # -- General configuration ---------------------------------------------------
37
+
38
+ # Add any Sphinx extension module names here, as strings. They can be
39
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
40
+ # ones.
41
+ extensions = [
42
+ "sphinx.ext.autodoc",
43
+ "sphinx.ext.autosummary",
44
+ "sphinx.ext.viewcode",
45
+ "autoapi.extension",
46
+ "numpydoc",
47
+ "sphinx_gallery.gen_gallery",
48
+ ]
49
+
50
+ # Add any paths that contain templates here, relative to this directory.
51
+ templates_path = ["_templates"]
52
+
53
+ # List of patterns, relative to source directory, that match files and
54
+ # directories to ignore when looking for source files.
55
+ # This pattern also affects html_static_path and html_extra_path.
56
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "version.py"]
57
+
58
+ # AutoAPI
59
+ autoapi_type = "python"
60
+ autoapi_dirs = ["../src/km3smk"]
61
+ autoapi_options = ["members", "undoc-members", "show-module-summary"]
62
+ autoapi_include_summaries = True
63
+
64
+ # Gallery
65
+ sphinx_gallery_conf = {
66
+ "backreferences_dir": "gen_modules",
67
+ "default_thumb_file": "_static/default_gallery_thumbnail.png",
68
+ "examples_dirs": "../examples", # path to your example scripts
69
+ "gallery_dirs": "auto_examples", # path to where to save gallery generated output
70
+ }
71
+
72
+ # -- Options for HTML output -------------------------------------------------
73
+
74
+ # The theme to use for HTML and HTML Help pages. See the documentation for
75
+ # a list of builtin themes.
76
+ #
77
+ html_theme = "sphinx_rtd_theme"
78
+ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
79
+
80
+ # Add any paths that contain custom static files (such as style sheets) here,
81
+ # relative to this directory. They are copied after the builtin static files,
82
+ # so a file named "default.css" will overwrite the builtin "default.css".
83
+ html_static_path = ["_static"]
84
+ html_title = "km3smk {}".format(version)
@@ -0,0 +1 @@
1
+ .. include:: ../CONTRIBUTING.rst