Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev_requirements/requirements-formatting.txt
pip install .[formatting]
- name: ${{ matrix.tool }} Code Formatter
run: |
${{ matrix.tool }} . --check
8 changes: 6 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ jobs:

build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.12" ]
os: [ ubuntu-latest ]
# Specifying a GitHub environment, # Specifying a GitHub environment, which is strongly recommended by PyPI: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
# you have to create an environment in your repository settings and add the environment name here
environment: release
Expand All @@ -45,7 +49,7 @@ jobs:
needs: tests
steps:
- uses: actions/checkout@v4
- name: Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 0 additions & 2 deletions dev_requirements/requirements-coverage.in

This file was deleted.

9 changes: 0 additions & 9 deletions dev_requirements/requirements-coverage.txt

This file was deleted.

3 changes: 0 additions & 3 deletions dev_requirements/requirements-formatting.in

This file was deleted.

21 changes: 0 additions & 21 deletions dev_requirements/requirements-formatting.txt

This file was deleted.

2 changes: 0 additions & 2 deletions dev_requirements/requirements-linting.in

This file was deleted.

21 changes: 0 additions & 21 deletions dev_requirements/requirements-linting.txt

This file was deleted.

3 changes: 0 additions & 3 deletions dev_requirements/requirements-packaging.in

This file was deleted.

79 changes: 0 additions & 79 deletions dev_requirements/requirements-packaging.txt

This file was deleted.

4 changes: 0 additions & 4 deletions dev_requirements/requirements-tests.in

This file was deleted.

24 changes: 0 additions & 24 deletions dev_requirements/requirements-tests.txt

This file was deleted.

2 changes: 0 additions & 2 deletions dev_requirements/requirements-type_check.in

This file was deleted.

13 changes: 0 additions & 13 deletions dev_requirements/requirements-type_check.txt

This file was deleted.

1 change: 1 addition & 0 deletions domain-specific-terms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# contains 1 lower case word per line which are ignored in the spell_check
33 changes: 33 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,33 @@ dependencies = [
]
dynamic = ["readme", "version"]

[project.optional-dependencies]
coverage = [
"coverage==7.6.1"
]
formatting = [
"black==24.8.0",
"isort==5.13.2"
]
linting = [
"pylint==3.3.0"
]
spellcheck = [
"codespell==2.3.0"
]
test_packaging = [
"build==1.2.2",
"twine==5.1.1"
]
tests = [
"pytest==8.3.3",
"pytest-datafiles==3.0.0",
"pytest-subtests==0.13.1"
]
type_check = [
"mypy==1.11.2"
]

[project.urls]
Changelog = "https://github.com/Hochfrequenz/ebdamame/releases"
Homepage = "https://github.com/Hochfrequenz/ebdamame"
Expand All @@ -46,6 +73,9 @@ truethy-bool = true
[tool.mypy]
disable_error_code = []

[tool.pylint."MASTER"]
ignore = ["src/ebdamame/version.py"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was ist denn das? du hast die datei doch selbst angelegt in diesem PR? wenn sie nicht da wäre, müsstest du sie auch nicht ignorieren ;)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edit: so leicht ist es nicht. #240 selbst wenn man die datei wieder entfernt, wird sie beim installarierne der optionalen dependencies trotzdem angelegt und führt dann hinten raus zu problemen.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


[build-system]
requires = ["hatchling>=1.8.0", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
Expand All @@ -59,6 +89,9 @@ source = "vcs"

[tool.hatch.build.hooks.vcs]
version-file = "src/ebdamame/version.py"
template = '''
version = "{version}"
'''
Comment on lines +89 to +91
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hf-kklein ich glaube dass ding sorgt dafür dass dir die formatierung gerettet wird

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Erkenntnisse aus den Vergleichenden Ci-Wissenschaft, da war das selbe linter problem im catover tool aber ohne formatting problems^^


[tool.hatch.build.targets.sdist]
exclude = ["/unittests"]
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ charset-normalizer==3.3.2
# via requests
click==8.1.7
# via -r requirements.in
colorama==0.4.6
# via click
idna==3.7
# via requests
lxml==5.2.1
Expand Down
21 changes: 21 additions & 0 deletions src/ebdamame/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""
My Module Docstring for version module.
"""

# file generated by setuptools_scm
# don't change, don't track in version control
TYPE_CHECKING = False
if TYPE_CHECKING:
from typing import Tuple, Union

VERSION_TUPLE = Tuple[Union[int, str], ...] # pylint: disable=invalid-name
else:
VERSION_TUPLE = object # pylint: disable=invalid-name

version: str
__version__: str
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE

__version__ = version = "0.1.6.dev28+gd2fbd24" # pylint: disable=invalid-name
__version_tuple__ = version_tuple = (0, 1, 6, "dev28", "gd2fbd24")
22 changes: 16 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ commands = python -m pip install --upgrade pip
# the tests environment is called by the Github action that runs the unit tests
deps =
-r requirements.txt
-r dev_requirements/requirements-tests.txt
.[tests]
setenv = PYTHONPATH = {toxinidir}/src
commands = python -m pytest --basetemp={envtmpdir} {posargs}

[testenv:linting]
# the linting environment is called by the Github Action that runs the linter
deps =
-r requirements.txt
-r dev_requirements/requirements-linting.txt
.[linting]
# add your fixtures like e.g. pytest_datafiles here
setenv = PYTHONPATH = {toxinidir}/src
commands =
Expand All @@ -35,18 +35,28 @@ commands =
setenv = PYTHONPATH = {toxinidir}/src
deps =
-r requirements.txt
-r dev_requirements/requirements-type_check.txt
.[type_check]
commands =
mypy --show-error-codes --strict src/ebdamame
mypy --show-error-codes unittests
mypy --show-error-codes main.py
# add single files (ending with .py) or packages here

[testenv:spell_check]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wenn wirihn hier einführen, können wir ihn im nächsten PR auch verwenden in der ci?

# the spellcheck environment checks the code for typos
setenv = PYTHONPATH = {toxinidir}/src
deps =
-r requirements.txt
.[spellcheck]
commands =
codespell --ignore-words=domain-specific-terms.txt src
codespell --ignore-words=domain-specific-terms.txt README.md

[testenv:coverage]
# the coverage environment is called by the Github Action that runs the coverage measurement
deps =
{[testenv:tests]deps}
-r dev_requirements/requirements-coverage.txt
.[coverage]
setenv = PYTHONPATH = {toxinidir}/src
commands =
coverage run -m pytest --basetemp={envtmpdir} {posargs}
Expand All @@ -56,7 +66,7 @@ commands =
[testenv:test_packaging]
skip_install = true
deps =
-r dev_requirements/requirements-packaging.txt
.[test_packaging]
commands =
python -m build
twine check dist/*
Expand All @@ -68,7 +78,7 @@ deps =
{[testenv:linting]deps}
{[testenv:type_check]deps}
{[testenv:coverage]deps}
-r dev_requirements/requirements-formatting.txt
.[formatting]
pip-tools
pre-commit
commands =
Expand Down