Skip to content

Commit

Permalink
Move setup.py configs to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
tdg5 committed Apr 5, 2024
1 parent 800be99 commit 9a81190
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 114 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/main-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ jobs:
pip install .[all]
pip uninstall -y service-oriented
pip freeze > requirements.txt
git diff --quiet
if [ ! $? -eq 0 ]; then
if ! `git diff --quiet`; then
echo "pip freeze caused file changes, failing!"
git diff
exit 1
fi
Expand All @@ -42,12 +43,19 @@ jobs:
source venv/bin/activate
make style
if ! `git diff --quiet`; then
echo "make style caused file changes, failing!"
git diff
exit 1
fi
- name: Run tests and build package
run: |
source venv/bin/activate
coverage run -m pytest
coverage report | tee .meta/coverage/report.txt
coverage-badge -f -o .meta/coverage/badge.svg
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_SERVICE_ORIENTED="$(cat VERSION)"
python -m build
- name: Checkout tdg5/github-action-pack
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,6 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Auto-generated
service_oriented/__version__.py
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

81 changes: 80 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,68 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=69"]
requires = [
"setuptools>=69",
"setuptools-scm>=8.0.4"
]

[project]
authors = [
{name = "Danny Guinther"},
]
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.9",
]
dependencies = [
"pydantic-settings~=2.1.0",
"pydantic~=2.5.3",
"python-json-logger==2.0.7",
"pyyaml~=6.0.1",
]
description = "Toolkit for building service oriented applications in python"
dynamic = [
"version",
]
license = {text = "MIT"}
name = "service_oriented"
readme = "README.md"
requires-python = ">3.9.0"

[project.optional-dependencies]
dev = [
"black~=24.2.0",
"build~=1.0.3",
"coverage-badge~=1.1.0",
"coverage~=7.4.4",
"dlint~=0.14.1",
"flake8-comprehensions~=3.14.0",
"flake8-eradicate~=1.5.0",
"flake8-pyproject~=1.2.3",
"flake8-spellcheck~=0.28.0",
"flake8-typing-imports~=1.15.0",
"flake8~=7.0.0",
"isort~=5.13.2",
"mypy~=1.8.0",
"pep8-naming~=0.13.3",
"pre-commit~=3.6.0",
"pytest-mock~=3.12.0",
"pytest-watcher~=0.4.2",
"pytest~=7.4.0",
"safety~=2.3.4",
"twine~=4.0.2",
"wheel>=0.42.0",
]

[project.urls]
Homepage = "https://github.com/tdg5/service-oriented-py"
Source = "https://github.com/tdg5/service-oriented-py"
Tracker = "https://github.com/tdg5/service-oriented-py/issues"

[tool.black]
include = "service_oriented(_test)?/.*\\.py$"
Expand Down Expand Up @@ -38,3 +100,20 @@ init_forbid_extra = true

[tool.pytest.ini_options]
markers = ["integration_test: marks tests as integration tests (deselect with '-m \"not integration_test\"')"]

[tool.setuptools.package-data]
"service_oriented" = ["py.typed"]

[tool.setuptools.packages.find]
exclude = ["*.__pycache__.*"]
include = [
"service_oriented",
"service_oriented.application",
"service_oriented.application.config",
"service_oriented.initializers",
"service_oriented.logging",
]
where = ["."]

[tool.setuptools_scm]
version_file = "service_oriented/__version__.py"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ ruamel.yaml==0.18.5
ruamel.yaml.clib==0.2.8
safety==2.3.4
SecretStorage==3.3.3
setuptools-scm==8.0.4
toml==0.10.2
tomli==2.0.1
twine==4.0.2
Expand Down
109 changes: 0 additions & 109 deletions setup.py

This file was deleted.

1 change: 1 addition & 0 deletions whitelist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ nonlocal
param
pydantic
pythonjsonlogger
scm
unparameterized
untyped
usefixtures
Expand Down

0 comments on commit 9a81190

Please sign in to comment.