Skip to content

Move optional dependencies from dev_requirements to pyproject.toml #897

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ updates:
interval: "daily"

- package-ecosystem: "pip" # See documentation for possible values
directory: "/dev_requirements/" # Location of package manifests
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
# Maintain dependencies for GitHub Actions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-publish-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev_requirements/requirements-packaging.txt
pip install .[packaging]
- name: Build wheel and source distributions
run: python -m build
- name: Publish distribution 📦 to PyPI
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ jobs:
tox -e tests
check_version_tag:
name: Check if the version tag is correct
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.12" ]
os: [ ubuntu-latest ]
Comment on lines -33 to +37
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ist es möglich, die Matrix eine Ebene höher zu definieren, damit wir's nur einmal da stehen haben? Fänd ich besser.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Aber an der Pipeline zu arbeiten ist eher etwas was ich mir für einen folge PR aufhebn würde, um die komplexität des PRs nur auf das wesentliche zu beschränken

steps:
- name: Check out Git repository
uses: actions/checkout@v4
Expand All @@ -55,7 +59,11 @@ jobs:
--gh-token ${{ secrets.GITHUB_TOKEN }} --major-bump-disallowed
json_schemas:
name: Generate JSON-Schemas
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.12" ]
os: [ ubuntu-latest ]
needs: [tests, check_version_tag]
concurrency: build-n-publish-json-schemas
steps:
Expand Down Expand Up @@ -185,7 +193,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev_requirements/requirements-packaging.txt
pip install .[packaging]
- name: Build wheel and source distributions
run: python -m build
- name: Publish distribution 📦 to PyPI
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.

1 change: 0 additions & 1 deletion dev_requirements/requirements-json_schemas.in

This file was deleted.

11 changes: 0 additions & 11 deletions dev_requirements/requirements-json_schemas.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.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

41 changes: 39 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,47 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
# This list must be in synq with the ./requirements.in file!
dependencies = ["iso3166", "pydantic>=2.0.0", "pyhumps"]
dependencies = [
"iso3166",
"pydantic>=2.0.0",
"pyhumps"
]# This list must be in synq with the ./requirements. in file!
# any dependency added here should also be added in docs/requirements.in and docs/requirements.txt respectively
dynamic = ["readme", "version"]

[project.optional-dependencies]
coverage = [
"coverage==7.6.4"
]
formatting = [
"black==24.10.0",
"isort==5.13.2"
]
json_schema = [
"click==8.1.7"
]
linting = [
"pylint==3.2.7"
]
spell_check = [
"codespell==2.3.0"
]
packaging = [
"build==1.2.2",
"twine==5.1.1"
]
tests = [
"dictdiffer==0.9.0",
"pytest==8.3.3",
"pytest-datafiles==3.0.0"
]
type_check = [
"mypy==1.13.0",
"networkx-stubs==0.0.1",
"pytest==8.3.3",
"types-requests==2.32.0.20241016"
]

[project.urls]
Changelog = "https://github.com/bo4e/bo4e-python/releases"
Homepage = "https://github.com/bo4e/bo4e-python"
Expand Down
3 changes: 0 additions & 3 deletions requirements.in

This file was deleted.

8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile requirements.in
# pip-compile pyproject.toml
#
annotated-types==0.5.0
# via pydantic
iso3166==2.1.1
# via -r requirements.in
# via -r pyproject.toml
pydantic==2.8.2
# via -r requirements.in
# via -r pyproject.toml
pydantic-core==2.20.1
# via pydantic
pyhumps==3.8.0
# via -r requirements.in
# via -r pyproject.toml
typing-extensions==4.11.0
# via
# pydantic
Expand Down
Loading
Loading