opensemantic.characteristics.quantitative 0.2.2.dev1__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. opensemantic_characteristics_quantitative-0.2.2.dev1/.coveragerc +28 -0
  2. opensemantic_characteristics_quantitative-0.2.2.dev1/.github/workflows/ci.yml +127 -0
  3. opensemantic_characteristics_quantitative-0.2.2.dev1/.gitignore +54 -0
  4. opensemantic_characteristics_quantitative-0.2.2.dev1/.isort.cfg +3 -0
  5. opensemantic_characteristics_quantitative-0.2.2.dev1/.pre-commit-config.yaml +67 -0
  6. opensemantic_characteristics_quantitative-0.2.2.dev1/.readthedocs.yml +27 -0
  7. opensemantic_characteristics_quantitative-0.2.2.dev1/AUTHORS.md +4 -0
  8. opensemantic_characteristics_quantitative-0.2.2.dev1/CHANGELOG.md +7 -0
  9. opensemantic_characteristics_quantitative-0.2.2.dev1/CONTRIBUTING.md +371 -0
  10. opensemantic_characteristics_quantitative-0.2.2.dev1/LICENSE.txt +201 -0
  11. opensemantic_characteristics_quantitative-0.2.2.dev1/PKG-INFO +654 -0
  12. opensemantic_characteristics_quantitative-0.2.2.dev1/README.md +627 -0
  13. opensemantic_characteristics_quantitative-0.2.2.dev1/docs/Makefile +29 -0
  14. opensemantic_characteristics_quantitative-0.2.2.dev1/docs/_static/.gitignore +1 -0
  15. opensemantic_characteristics_quantitative-0.2.2.dev1/docs/authors.md +4 -0
  16. opensemantic_characteristics_quantitative-0.2.2.dev1/docs/changelog.md +4 -0
  17. opensemantic_characteristics_quantitative-0.2.2.dev1/docs/conf.py +304 -0
  18. opensemantic_characteristics_quantitative-0.2.2.dev1/docs/contributing.md +4 -0
  19. opensemantic_characteristics_quantitative-0.2.2.dev1/docs/index.md +39 -0
  20. opensemantic_characteristics_quantitative-0.2.2.dev1/docs/license.md +5 -0
  21. opensemantic_characteristics_quantitative-0.2.2.dev1/docs/readme.md +4 -0
  22. opensemantic_characteristics_quantitative-0.2.2.dev1/docs/requirements.txt +6 -0
  23. opensemantic_characteristics_quantitative-0.2.2.dev1/pyproject.toml +9 -0
  24. opensemantic_characteristics_quantitative-0.2.2.dev1/setup.cfg +85 -0
  25. opensemantic_characteristics_quantitative-0.2.2.dev1/setup.py +22 -0
  26. opensemantic_characteristics_quantitative-0.2.2.dev1/src/opensemantic/characteristics/quantitative/__init__.py +12 -0
  27. opensemantic_characteristics_quantitative-0.2.2.dev1/src/opensemantic/characteristics/quantitative/_model.py +28001 -0
  28. opensemantic_characteristics_quantitative-0.2.2.dev1/src/opensemantic/characteristics/quantitative/_static.py +227 -0
  29. opensemantic_characteristics_quantitative-0.2.2.dev1/src/opensemantic/characteristics/quantitative/conversion_test.py +175 -0
  30. opensemantic_characteristics_quantitative-0.2.2.dev1/src/opensemantic.characteristics.quantitative.egg-info/PKG-INFO +654 -0
  31. opensemantic_characteristics_quantitative-0.2.2.dev1/src/opensemantic.characteristics.quantitative.egg-info/SOURCES.txt +37 -0
  32. opensemantic_characteristics_quantitative-0.2.2.dev1/src/opensemantic.characteristics.quantitative.egg-info/dependency_links.txt +1 -0
  33. opensemantic_characteristics_quantitative-0.2.2.dev1/src/opensemantic.characteristics.quantitative.egg-info/not-zip-safe +1 -0
  34. opensemantic_characteristics_quantitative-0.2.2.dev1/src/opensemantic.characteristics.quantitative.egg-info/requires.txt +9 -0
  35. opensemantic_characteristics_quantitative-0.2.2.dev1/src/opensemantic.characteristics.quantitative.egg-info/top_level.txt +1 -0
  36. opensemantic_characteristics_quantitative-0.2.2.dev1/tests/conftest.py +10 -0
  37. opensemantic_characteristics_quantitative-0.2.2.dev1/tests/integration_test.py +106 -0
  38. opensemantic_characteristics_quantitative-0.2.2.dev1/tox.ini +93 -0
@@ -0,0 +1,28 @@
1
+ # .coveragerc to control coverage.py
2
+ [run]
3
+ branch = True
4
+ source = opensemantic.characteristics.quantitative
5
+ # omit = bad_file.py
6
+
7
+ [paths]
8
+ source =
9
+ src/
10
+ */site-packages/
11
+
12
+ [report]
13
+ # Regexes for lines to exclude from consideration
14
+ exclude_lines =
15
+ # Have to re-enable the standard pragma
16
+ pragma: no cover
17
+
18
+ # Don't complain about missing debug-only code:
19
+ def __repr__
20
+ if self\.debug
21
+
22
+ # Don't complain if tests don't hit defensive assertion code:
23
+ raise AssertionError
24
+ raise NotImplementedError
25
+
26
+ # Don't complain if non-runnable code isn't run:
27
+ if 0:
28
+ if __name__ == .__main__.:
@@ -0,0 +1,127 @@
1
+ # GitHub Actions configuration **EXAMPLE**,
2
+ # MODIFY IT ACCORDING TO YOUR NEEDS!
3
+ # Reference: https://docs.github.com/en/actions
4
+
5
+ name: tests
6
+
7
+ on:
8
+ push:
9
+ # Avoid using all the resources/limits available by checking only
10
+ # relevant branches and tags. Other branches can be checked via PRs.
11
+ branches: [main]
12
+ tags: ['v[0-9]*', '[0-9]+.[0-9]+*'] # Match tags that resemble a version
13
+ pull_request: # Run in every PR
14
+ workflow_dispatch: # Allow manually triggering the workflow
15
+ schedule:
16
+ # Run roughly every 15 days at 00:00 UTC
17
+ # (useful to check if updates on dependencies break the package)
18
+ - cron: '0 0 1,16 * *'
19
+
20
+ permissions:
21
+ contents: read
22
+
23
+ concurrency:
24
+ group: >-
25
+ ${{ github.workflow }}-${{ github.ref_type }}-
26
+ ${{ github.event.pull_request.number || github.sha }}
27
+ cancel-in-progress: true
28
+
29
+ jobs:
30
+ prepare:
31
+ runs-on: ubuntu-latest
32
+ outputs:
33
+ wheel-distribution: ${{ steps.wheel-distribution.outputs.path }}
34
+ steps:
35
+ - uses: actions/checkout@v3
36
+ with: {fetch-depth: 0} # deep clone for setuptools-scm
37
+ - uses: actions/setup-python@v4
38
+ id: setup-python
39
+ with: {python-version: "3.11"}
40
+ - name: Run static analysis and format checkers
41
+ run: pipx run pre-commit run --all-files --show-diff-on-failure
42
+ - name: Build package distribution files
43
+ run: >-
44
+ pipx run --python '${{ steps.setup-python.outputs.python-path }}'
45
+ tox -e clean,build
46
+ - name: Record the path of wheel distribution
47
+ id: wheel-distribution
48
+ run: echo "path=$(ls dist/*.whl)" >> $GITHUB_OUTPUT
49
+ - name: Store the distribution files for use in other stages
50
+ # `tests` and `publish` will use the same pre-built distributions,
51
+ # so we make sure to release the exact same package that was tested
52
+ uses: actions/upload-artifact@v4
53
+ with:
54
+ name: python-distribution-files
55
+ path: dist/
56
+ retention-days: 1
57
+
58
+ test:
59
+ needs: prepare
60
+ strategy:
61
+ matrix:
62
+ python:
63
+ - "3.11" # oldest Python supported by PSF
64
+ - "3.12" # newest Python that is stable
65
+ platform:
66
+ - ubuntu-latest
67
+ - macos-latest
68
+ - windows-latest
69
+ permissions:
70
+ contents: read
71
+ runs-on: ${{ matrix.platform }}
72
+ steps:
73
+ - uses: actions/checkout@v3
74
+ - uses: actions/setup-python@v4
75
+ id: setup-python
76
+ with:
77
+ python-version: ${{ matrix.python }}
78
+ - name: Retrieve pre-built distribution files
79
+ uses: actions/download-artifact@v4
80
+ with: {name: python-distribution-files, path: dist/}
81
+ - name: Run tests
82
+ run: >-
83
+ pipx run --python '${{ steps.setup-python.outputs.python-path }}'
84
+ tox -e test --installpkg '${{ needs.prepare.outputs.wheel-distribution }}'
85
+ -- -rFEx --durations 10 --color yes # pytest args
86
+ - name: Generate coverage report
87
+ run: pipx run coverage lcov -o coverage.lcov
88
+ - name: Upload partial coverage report
89
+ uses: coverallsapp/github-action@master
90
+ with:
91
+ path-to-lcov: coverage.lcov
92
+ github-token: ${{ secrets.GITHUB_TOKEN }}
93
+ flag-name: ${{ matrix.platform }} - py${{ matrix.python }}
94
+ parallel: true
95
+
96
+ finalize:
97
+ needs: test
98
+ runs-on: ubuntu-latest
99
+ steps:
100
+ - name: Finalize coverage report
101
+ uses: coverallsapp/github-action@master
102
+ with:
103
+ github-token: ${{ secrets.GITHUB_TOKEN }}
104
+ parallel-finished: true
105
+
106
+ publish:
107
+ needs: finalize
108
+ if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
109
+ runs-on: ubuntu-latest
110
+ permissions:
111
+ contents: write
112
+ steps:
113
+ - uses: actions/checkout@v3
114
+ - uses: actions/setup-python@v4
115
+ with: {python-version: "3.11"}
116
+ - name: Retrieve pre-built distribution files
117
+ uses: actions/download-artifact@v4
118
+ with: {name: python-distribution-files, path: dist/}
119
+ - name: Publish Package
120
+ env:
121
+ # TODO: Set your PYPI_TOKEN as a secret using GitHub UI
122
+ # - https://pypi.org/help/#apitoken
123
+ # - https://docs.github.com/en/actions/security-guides/encrypted-secrets
124
+ TWINE_REPOSITORY: pypi
125
+ TWINE_USERNAME: __token__
126
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
127
+ run: pipx run tox -e publish
@@ -0,0 +1,54 @@
1
+ # Temporary and binary files
2
+ *~
3
+ *.py[cod]
4
+ *.so
5
+ *.cfg
6
+ !.isort.cfg
7
+ !setup.cfg
8
+ *.orig
9
+ *.log
10
+ *.pot
11
+ __pycache__/*
12
+ .cache/*
13
+ .*.swp
14
+ */.ipynb_checkpoints/*
15
+ .DS_Store
16
+
17
+ # Project files
18
+ .ropeproject
19
+ .project
20
+ .pydevproject
21
+ .settings
22
+ .idea
23
+ .vscode
24
+ tags
25
+
26
+ # Package files
27
+ *.egg
28
+ *.eggs/
29
+ .installed.cfg
30
+ *.egg-info
31
+
32
+ # Unittest and coverage
33
+ htmlcov/*
34
+ .coverage
35
+ .coverage.*
36
+ .tox
37
+ junit*.xml
38
+ coverage.xml
39
+ .pytest_cache/
40
+
41
+ # Build and docs folder/files
42
+ build/*
43
+ dist/*
44
+ sdist/*
45
+ docs/api/*
46
+ docs/_rst/*
47
+ docs/_build/*
48
+ cover/*
49
+ MANIFEST
50
+
51
+ # Per-project virtualenvs
52
+ .venv*/
53
+ .conda*/
54
+ .python-version
@@ -0,0 +1,3 @@
1
+ [settings]
2
+ profile = black
3
+ known_first_party = opensemantic
@@ -0,0 +1,67 @@
1
+ exclude: '^docs/conf.py'
2
+
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: check-added-large-files
9
+ - id: check-ast
10
+ - id: check-json
11
+ - id: check-merge-conflict
12
+ - id: check-xml
13
+ - id: check-yaml
14
+ - id: debug-statements
15
+ - id: end-of-file-fixer
16
+ - id: requirements-txt-fixer
17
+ - id: mixed-line-ending
18
+ args: ['--fix=auto'] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
19
+
20
+ ## If you want to automatically "modernize" your Python code:
21
+ # - repo: https://github.com/asottile/pyupgrade
22
+ # rev: v3.17.0
23
+ # hooks:
24
+ # - id: pyupgrade
25
+ # args: ['--py38-plus']
26
+
27
+ ## If you want to avoid flake8 errors due to unused vars or imports:
28
+ # - repo: https://github.com/PyCQA/autoflake
29
+ # rev: v2.3.1
30
+ # hooks:
31
+ # - id: autoflake
32
+ # args: [
33
+ # --in-place,
34
+ # --remove-all-unused-imports,
35
+ # --remove-unused-variables,
36
+ # ]
37
+
38
+ - repo: https://github.com/PyCQA/isort
39
+ rev: 6.0.0
40
+ hooks:
41
+ - id: isort
42
+
43
+ - repo: https://github.com/psf/black
44
+ rev: 25.1.0
45
+ hooks:
46
+ - id: black
47
+ language_version: python3
48
+
49
+ ## If like to embrace black styles even in the docs:
50
+ # - repo: https://github.com/asottile/blacken-docs
51
+ # rev: 1.18.0
52
+ # hooks:
53
+ # - id: blacken-docs
54
+ # additional_dependencies: [black]
55
+
56
+ - repo: https://github.com/PyCQA/flake8
57
+ rev: 7.1.1
58
+ hooks:
59
+ - id: flake8
60
+ ## You can add flake8 plugins via `additional_dependencies`:
61
+ # additional_dependencies: [flake8-bugbear]
62
+
63
+ ## Check for misspells in documentation files:
64
+ # - repo: https://github.com/codespell-project/codespell
65
+ # rev: v2.3.0
66
+ # hooks:
67
+ # - id: codespell
@@ -0,0 +1,27 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Build documentation in the docs/ directory with Sphinx
8
+ sphinx:
9
+ configuration: docs/conf.py
10
+
11
+ # Build documentation with MkDocs
12
+ #mkdocs:
13
+ # configuration: mkdocs.yml
14
+
15
+ # Optionally build your docs in additional formats such as PDF
16
+ formats:
17
+ - pdf
18
+
19
+ build:
20
+ os: ubuntu-22.04
21
+ tools:
22
+ python: "3.11"
23
+
24
+ python:
25
+ install:
26
+ - requirements: docs/requirements.txt
27
+ - {path: ., method: pip}
@@ -0,0 +1,4 @@
1
+ # Contributors
2
+
3
+ * Lukas Gold [lukas.gold@isc.fraunhofer.de](mailto:lukas.gold@isc.fraunhofer.de)
4
+ * Simon Stier
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ## Version 0.1 (development)
4
+
5
+ - Feature A added
6
+ - FIX: nasty bug #1729 fixed
7
+ - add your changes here!
@@ -0,0 +1,371 @@
1
+ ```{todo} THIS IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!
2
+
3
+ The document assumes you are using a source repository service that promotes a
4
+ contribution model similar to [GitHub's fork and pull request workflow].
5
+ While this is true for the majority of services (like GitHub, GitLab,
6
+ BitBucket), it might not be the case for private repositories (e.g., when
7
+ using Gerrit).
8
+
9
+ Also notice that the code examples might refer to GitHub URLs or the text
10
+ might use GitHub specific terminology (e.g., *Pull Request* instead of *Merge
11
+ Request*).
12
+
13
+ Please make sure to check the document having these assumptions in mind
14
+ and update things accordingly.
15
+ ```
16
+
17
+ ```{todo} Provide the correct links/replacements at the bottom of the document.
18
+ ```
19
+
20
+ ```{todo} You might want to have a look on [PyScaffold's contributor's guide],
21
+
22
+ especially if your project is open source. The text should be very similar to
23
+ this template, but there are a few extra contents that you might decide to
24
+ also include, like mentioning labels of your issue tracker or automated
25
+ releases.
26
+ ```
27
+
28
+ # Contributing
29
+
30
+ Welcome to `opensemantic.characteristics.quantitative` contributor's guide.
31
+
32
+ This document focuses on getting any potential contributor familiarized with
33
+ the development processes, but [other kinds of contributions] are also appreciated.
34
+
35
+ If you are new to using [git] or have never collaborated in a project previously,
36
+ please have a look at [contribution-guide.org]. Other resources are also
37
+ listed in the excellent [guide created by FreeCodeCamp] [^contrib1].
38
+
39
+ Please notice, all users and contributors are expected to be **open,
40
+ considerate, reasonable, and respectful**. When in doubt,
41
+ [Python Software Foundation's Code of Conduct] is a good reference in terms of
42
+ behavior guidelines.
43
+
44
+ ## Issue Reports
45
+
46
+ If you experience bugs or general issues with `opensemantic.characteristics.quantitative`, please have a look
47
+ on the [issue tracker].
48
+ If you don't see anything useful there, please feel free to fire an issue report.
49
+
50
+ :::{tip}
51
+ Please don't forget to include the closed issues in your search.
52
+ Sometimes a solution was already reported, and the problem is considered
53
+ **solved**.
54
+ :::
55
+
56
+ New issue reports should include information about your programming environment
57
+ (e.g., operating system, Python version) and steps to reproduce the problem.
58
+ Please try also to simplify the reproduction steps to a very minimal example
59
+ that still illustrates the problem you are facing. By removing other factors,
60
+ you help us to identify the root cause of the issue.
61
+
62
+ ## Documentation Improvements
63
+
64
+ You can help improve `opensemantic.characteristics.quantitative` docs by making them more readable and coherent, or
65
+ by adding missing information and correcting mistakes.
66
+
67
+ `opensemantic.characteristics.quantitative` documentation uses [Sphinx] as its main documentation compiler.
68
+ This means that the docs are kept in the same repository as the project code, and
69
+ that any documentation update is done in the same way was a code contribution.
70
+
71
+ ```{todo} Don't forget to mention which markup language you are using.
72
+
73
+ e.g., [reStructuredText] or [CommonMark] with [MyST] extensions.
74
+ ```
75
+
76
+ ```{todo} If your project is hosted on GitHub, you can also mention the following tip:
77
+
78
+ :::{tip}
79
+ Please notice that the [GitHub web interface] provides a quick way of
80
+ propose changes in `opensemantic.characteristics.quantitative`'s files. While this mechanism can
81
+ be tricky for normal code contributions, it works perfectly fine for
82
+ contributing to the docs, and can be quite handy.
83
+
84
+ If you are interested in trying this method out, please navigate to
85
+ the `docs` folder in the source [repository], find which file you
86
+ would like to propose changes and click in the little pencil icon at the
87
+ top, to open [GitHub's code editor]. Once you finish editing the file,
88
+ please write a message in the form at the bottom of the page describing
89
+ which changes have you made and what are the motivations behind them and
90
+ submit your proposal.
91
+ :::
92
+ ```
93
+
94
+ When working on documentation changes in your local machine, you can
95
+ compile them using [tox] :
96
+
97
+ ```
98
+ tox -e docs
99
+ ```
100
+
101
+ and use Python's built-in web server for a preview in your web browser
102
+ (`http://localhost:8000`):
103
+
104
+ ```
105
+ python3 -m http.server --directory 'docs/_build/html'
106
+ ```
107
+
108
+ ## Code Contributions
109
+
110
+ ```{todo} Please include a reference or explanation about the internals of the project.
111
+
112
+ An architecture description, design principles or at least a summary of the
113
+ main concepts will make it easy for potential contributors to get started
114
+ quickly.
115
+ ```
116
+
117
+ ### Submit an issue
118
+
119
+ Before you work on any non-trivial code contribution it's best to first create
120
+ a report in the [issue tracker] to start a discussion on the subject.
121
+ This often provides additional considerations and avoids unnecessary work.
122
+
123
+ ### Create an environment
124
+
125
+ Before you start coding, we recommend creating an isolated [virtual environment]
126
+ to avoid any problems with your installed Python packages.
127
+ This can easily be done via either [virtualenv]:
128
+
129
+ ```
130
+ virtualenv <PATH TO VENV>
131
+ source <PATH TO VENV>/bin/activate
132
+ ```
133
+
134
+ or [Miniconda]:
135
+
136
+ ```
137
+ conda create -n opensemantic.characteristics.quantitative python=3 six virtualenv pytest pytest-cov
138
+ conda activate opensemantic.characteristics.quantitative
139
+ ```
140
+
141
+ ### Clone the repository
142
+
143
+ 1. Create an user account on GitHub if you do not already have one.
144
+
145
+ 2. Fork the project [repository]: click on the *Fork* button near the top of the
146
+ page. This creates a copy of the code under your account on GitHub.
147
+
148
+ 3. Clone this copy to your local disk:
149
+
150
+ ```
151
+ git clone git@github.com:YourLogin/opensemantic.characteristics.quantitative.git
152
+ cd opensemantic.characteristics.quantitative
153
+ ```
154
+
155
+ 4. You should run:
156
+
157
+ ```
158
+ pip install -U pip setuptools -e .
159
+ ```
160
+
161
+ to be able to import the package under development in the Python REPL.
162
+
163
+ ```{todo} if you are not using pre-commit, please remove the following item:
164
+ ```
165
+
166
+ 5. Install [pre-commit]:
167
+
168
+ ```
169
+ pip install pre-commit
170
+ pre-commit install
171
+ ```
172
+
173
+ `opensemantic.characteristics.quantitative` comes with a lot of hooks configured to automatically help the
174
+ developer to check the code being written.
175
+
176
+ ### Implement your changes
177
+
178
+ 1. Create a branch to hold your changes:
179
+
180
+ ```
181
+ git checkout -b my-feature
182
+ ```
183
+
184
+ and start making changes. Never work on the main branch!
185
+
186
+ 2. Start your work on this branch. Don't forget to add [docstrings] to new
187
+ functions, modules and classes, especially if they are part of public APIs.
188
+
189
+ 3. Add yourself to the list of contributors in `AUTHORS.rst`.
190
+
191
+ 4. When you’re done editing, do:
192
+
193
+ ```
194
+ git add <MODIFIED FILES>
195
+ git commit
196
+ ```
197
+
198
+ to record your changes in [git].
199
+
200
+ ```{todo} if you are not using pre-commit, please remove the following item:
201
+ ```
202
+
203
+ Please make sure to see the validation messages from [pre-commit] and fix
204
+ any eventual issues.
205
+ This should automatically use [flake8]/[black] to check/fix the code style
206
+ in a way that is compatible with the project.
207
+
208
+ :::{important}
209
+ Don't forget to add unit tests and documentation in case your
210
+ contribution adds an additional feature and is not just a bugfix.
211
+
212
+ Moreover, writing a [descriptive commit message] is highly recommended.
213
+ In case of doubt, you can check the commit history with:
214
+
215
+ ```
216
+ git log --graph --decorate --pretty=oneline --abbrev-commit --all
217
+ ```
218
+
219
+ to look for recurring communication patterns.
220
+ :::
221
+
222
+ 5. Please check that your changes don't break any unit tests with:
223
+
224
+ ```
225
+ tox
226
+ ```
227
+
228
+ (after having installed [tox] with `pip install tox` or `pipx`).
229
+
230
+ You can also use [tox] to run several other pre-configured tasks in the
231
+ repository. Try `tox -av` to see a list of the available checks.
232
+
233
+ ### Submit your contribution
234
+
235
+ 1. If everything works fine, push your local branch to the remote server with:
236
+
237
+ ```
238
+ git push -u origin my-feature
239
+ ```
240
+
241
+ 2. Go to the web page of your fork and click "Create pull request"
242
+ to send your changes for review.
243
+
244
+ ```{todo} if you are using GitHub, you can uncomment the following paragraph
245
+
246
+ Find more detailed information in [creating a PR]. You might also want to open
247
+ the PR as a draft first and mark it as ready for review after the feedbacks
248
+ from the continuous integration (CI) system or any required fixes.
249
+
250
+ ```
251
+
252
+ ### Troubleshooting
253
+
254
+ The following tips can be used when facing problems to build or test the
255
+ package:
256
+
257
+ 1. Make sure to fetch all the tags from the upstream [repository].
258
+ The command `git describe --abbrev=0 --tags` should return the version you
259
+ are expecting. If you are trying to run CI scripts in a fork repository,
260
+ make sure to push all the tags.
261
+ You can also try to remove all the egg files or the complete egg folder, i.e.,
262
+ `.eggs`, as well as the `*.egg-info` folders in the `src` folder or
263
+ potentially in the root of your project.
264
+
265
+ 2. Sometimes [tox] misses out when new dependencies are added, especially to
266
+ `setup.cfg` and `docs/requirements.txt`. If you find any problems with
267
+ missing dependencies when running a command with [tox], try to recreate the
268
+ `tox` environment using the `-r` flag. For example, instead of:
269
+
270
+ ```
271
+ tox -e docs
272
+ ```
273
+
274
+ Try running:
275
+
276
+ ```
277
+ tox -r -e docs
278
+ ```
279
+
280
+ 3. Make sure to have a reliable [tox] installation that uses the correct
281
+ Python version (e.g., 3.7+). When in doubt you can run:
282
+
283
+ ```
284
+ tox --version
285
+ # OR
286
+ which tox
287
+ ```
288
+
289
+ If you have trouble and are seeing weird errors upon running [tox], you can
290
+ also try to create a dedicated [virtual environment] with a [tox] binary
291
+ freshly installed. For example:
292
+
293
+ ```
294
+ virtualenv .venv
295
+ source .venv/bin/activate
296
+ .venv/bin/pip install tox
297
+ .venv/bin/tox -e all
298
+ ```
299
+
300
+ 4. [Pytest can drop you] in an interactive session in the case an error occurs.
301
+ In order to do that you need to pass a `--pdb` option (for example by
302
+ running `tox -- -k <NAME OF THE FALLING TEST> --pdb`).
303
+ You can also setup breakpoints manually instead of using the `--pdb` option.
304
+
305
+ ## Maintainer tasks
306
+
307
+ ### Releases
308
+
309
+ ```{todo} This section assumes you are using PyPI to publicly release your package.
310
+
311
+ If instead you are using a different/private package index, please update
312
+ the instructions accordingly.
313
+ ```
314
+
315
+ If you are part of the group of maintainers and have correct user permissions
316
+ on [PyPI], the following steps can be used to release a new version for
317
+ `opensemantic.characteristics.quantitative`:
318
+
319
+ 1. Make sure all unit tests are successful.
320
+ 2. Tag the current commit on the main branch with a release tag, e.g., `v1.2.3`.
321
+ 3. Push the new tag to the upstream [repository],
322
+ e.g., `git push upstream v1.2.3`
323
+ 4. Clean up the `dist` and `build` folders with `tox -e clean`
324
+ (or `rm -rf dist build`)
325
+ to avoid confusion with old builds and Sphinx docs.
326
+ 5. Run `tox -e build` and check that the files in `dist` have
327
+ the correct version (no `.dirty` or [git] hash) according to the [git] tag.
328
+ Also check the sizes of the distributions, if they are too big (e.g., >
329
+ 500KB), unwanted clutter may have been accidentally included.
330
+ 6. Run `tox -e publish -- --repository pypi` and check that everything was
331
+ uploaded to [PyPI] correctly.
332
+
333
+ [^contrib1]: Even though, these resources focus on open source projects and
334
+ communities, the general ideas behind collaborating with other developers
335
+ to collectively create software are general and can be applied to all sorts
336
+ of environments, including private companies and proprietary code bases.
337
+
338
+
339
+ [black]: https://pypi.org/project/black/
340
+ [commonmark]: https://commonmark.org/
341
+ [contribution-guide.org]: http://www.contribution-guide.org/
342
+ [creating a pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
343
+ [descriptive commit message]: https://chris.beams.io/posts/git-commit
344
+ [docstrings]: https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html
345
+ [first-contributions tutorial]: https://github.com/firstcontributions/first-contributions
346
+ [flake8]: https://flake8.pycqa.org/en/stable/
347
+ [git]: https://git-scm.com
348
+ [github web interface]: https://docs.github.com/en/github/managing-files-in-a-repository/managing-files-on-github/editing-files-in-your-repository
349
+ [github's code editor]: https://docs.github.com/en/github/managing-files-in-a-repository/managing-files-on-github/editing-files-in-your-repository
350
+ [github's fork and pull request workflow]: https://guides.github.com/activities/forking/
351
+ [guide created by freecodecamp]: https://github.com/freecodecamp/how-to-contribute-to-open-source
352
+ [miniconda]: https://docs.conda.io/en/latest/miniconda.html
353
+ [myst]: https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html
354
+ [other kinds of contributions]: https://opensource.guide/how-to-contribute
355
+ [pre-commit]: https://pre-commit.com/
356
+ [pypi]: https://pypi.org/
357
+ [pyscaffold's contributor's guide]: https://pyscaffold.org/en/stable/contributing.html
358
+ [pytest can drop you]: https://docs.pytest.org/en/stable/usage.html#dropping-to-pdb-python-debugger-at-the-start-of-a-test
359
+ [python software foundation's code of conduct]: https://www.python.org/psf/conduct/
360
+ [restructuredtext]: https://www.sphinx-doc.org/en/master/usage/restructuredtext/
361
+ [sphinx]: https://www.sphinx-doc.org/en/master/
362
+ [tox]: https://tox.readthedocs.io/en/stable/
363
+ [virtual environment]: https://realpython.com/python-virtual-environments-a-primer/
364
+ [virtualenv]: https://virtualenv.pypa.io/en/stable/
365
+
366
+
367
+ ```{todo} Please review and change the following definitions:
368
+ ```
369
+
370
+ [repository]: https://github.com/<USERNAME>/opensemantic.characteristics.quantitative
371
+ [issue tracker]: https://github.com/<USERNAME>/opensemantic.characteristics.quantitative/issues