Skip to content

Commit

Permalink
Add pyproject.toml (#40)
Browse files Browse the repository at this point in the history
* pyproject
* ignore version
* add deps
* build without setup.py
* increment version

---------

Co-authored-by: tommyod <tommy.odland>
  • Loading branch information
tommyod authored Sep 1, 2024
1 parent 90437cc commit f8cdb63
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 115 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
run: |
sudo apt-get install pandoc -y
pip install pip jupyter matplotlib pytest black wheel setuptools twine flake8 --quiet --upgrade
pip install -e . # Install the package
black . --check -l 120
pip install . # Install the package
black . --check -l 120 --exclude="_version.py"
flake8 streprogen --select=F811,F841,F401,E711,E712,E731
pytest streprogen --doctest-modules --color=yes # Run tests
pytest docs/examples --verbose --doctest-modules --color=yes # Run test_notebooks.py
Expand All @@ -45,7 +45,8 @@ jobs:

- name: Build package ${{ matrix.python-version }}
run: |
python setup.py sdist bdist_wheel;
python -m pip install build;
python -m build;
- name: Publish Python distribution to PyPI
if: github.ref == 'refs/heads/master'
Expand Down
5 changes: 0 additions & 5 deletions deploy.sh

This file was deleted.

47 changes: 47 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "streprogen"
dynamic = ["version", "readme"]
description = "The Python strength program generator."
authors = [
{name = "Tommy Odland", email = "[email protected]"},
]
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Healthcare Industry",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords = ["strength", "training", "health", "fitness", "generator", "weightlifting", "powerlifting", "exercise"]
requires-python = ">=3.8"
dependencies = [
"jinja2>=2.11.2",
"ortools>=7.7.7810",
]

[project.urls]
Homepage = "https://github.com/tommyod/streprogen"
Repository = "https://github.com/tommyod/streprogen.git"

[tool.setuptools_scm]
write_to = "streprogen/_version.py"

[tool.setuptools.dynamic]
readme = {file = ["README.rst"], content-type = "text/x-rst"}

[tool.setuptools.packages.find]
where = ["."]
include = ["streprogen*"]
exclude = ["contrib", "docs", "tests"]

[tool.setuptools.package-data]
"streprogen" = ["templates/*", "*.tex", "*.html"]
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

104 changes: 0 additions & 104 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion streprogen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from streprogen.program import Program
from streprogen.sampling import sample_markov_ladder, sample_markov_loop

__version__ = "4.0.0"
__version__ = "4.0.1"

__all__ = [
"StaticExercise",
Expand Down

0 comments on commit f8cdb63

Please sign in to comment.