Skip to content
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

chore: from setup to pyproject #407

Merged
merged 6 commits into from
Mar 25, 2024
Merged
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/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: pip install wheel
- name: Build
run:
python setup.py sdist bdist_wheel
python -m build
- name: Publish
uses: pypa/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions changes/407.changed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Depreciate `setup.py` in favour of `pyproject.toml` ([#407](https://github.com/Substra/substra/pull/407))
59 changes: 59 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
exclude = ["tests*"]

[tool.hatch.version]
path = "substra/__version__.py"

[project]
name = "substra"
description = "Low-level Python library for interacting with a Substra network"
dynamic = ["version"]
requires-python = ">= 3.9"
dependencies = [
"requests",
"urllib3<2",
Copy link
Contributor

Choose a reason for hiding this comment

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

That's interesting 🙃
I guess this was pinned to avoid a bug at some point, might be worth investigating if it's still necessary

Copy link
Member Author

Choose a reason for hiding this comment

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

worth create a card you think ?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, probably, else we'll forget about it again :)

Copy link
Member Author

Choose a reason for hiding this comment

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

done

"docker",
"pyyaml",
"pydantic>=2.3.0,<3.0.0",
"tqdm",
"python-slugify",
]
keywords = ["substra"]
classifiers = [
"Intended Audience :: Developers",
"Topic :: Utilities",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
license = { file = "LICENSE" }
authors = [{ name = "Owkin, Inc." }]


[project.optional-dependencies]
dev = [
"pandas",
"pytest",
"pytest-cov",
"pytest-mock",
"substratools>=0.21.2",
"black",
"flake8",
"isort",
"docstring_parser",
"towncrier",
]

[project.urls]
Documentation = "https://docs.substra.org/en/stable/"
Repository = "https://github.com/Substra/substra"
Changelog = "https://github.com/Substra/substra/blob/main/CHANGELOG.md"

[tool.pytest.ini_options]
addopts = "-v --cov=substra --ignore=tests/unit --ignore=tests/e2e"

[tool.black]
line-length = 120
Expand Down
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

67 changes: 0 additions & 67 deletions setup.py

This file was deleted.

Loading