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

Set up setuptools_scm #100

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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: 0 additions & 2 deletions petab_select/version.py

This file was deleted.

59 changes: 55 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,61 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "petab_select"
dynamic = ["version"]
maintainers = [
{name = "Dilan Pathirana", email = "[email protected]"},
]
authors = [
{name = "The PEtab Select developers"},
]
description = "PEtab Select: an extension to PEtab for model selection."
readme = "README.md"
requires-python = ">=3.10"
license = {text = "BSD-3-Clause"}
dependencies = [
# TODO minimum versions
"more-itertools",
"numpy",
"pandas",
"petab",
"pyyaml",
"click",
"dill",
]
[project.optional-dependencies]
test = [
"pytest >= 5.4.3",
"pytest-cov >= 2.10.0",
"amici >= 0.11.25",
"fides >= 0.7.5",
"pypesto > 0.2.13",
"tox >= 3.12.4",
"flake8 >= 4.0.1",
]
doc = [
"sphinx>=3.5.3,<7",
"sphinxcontrib-napoleon>=0.7",
"sphinx-markdown-tables>=0.0.15",
"sphinx-rtd-theme>=0.5.1",
"recommonmark>=0.7.1",
# pin until ubuntu comes with newer pandoc:
# /home/docs/checkouts/readthedocs.org/user_builds/petab-select/envs/63/lib/python3.11/site-packages/nbsphinx/__init__.py:1058: RuntimeWarning: You are using an unsupported version of pandoc (2.9.2.1).
# Your version must be at least (2.14.2) but less than (4.0.0).
"nbsphinx==0.9.1",
"nbconvert<7.5.0",
"ipython>=7.21.0",
"readthedocs-sphinx-ext>=2.2.5",
"sphinx-autodoc-typehints",
]

[project.scripts]
petab_select = "petab_select.cli:cli"

[tool.setuptools_scm]

[tool.black]
line-length = 79
target-version = ['py37', 'py38', 'py39']
Expand Down
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
git+https://github.com/ICB-DCM/pyPESTO.git@select_use_old_calibrations#egg=pypesto
dweindl marked this conversation as resolved.
Show resolved Hide resolved
tox >= 3.12.4
pre-commit >= 2.10.1
flake8 >= 4.0.1
Expand Down
68 changes: 0 additions & 68 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import re
import sys

from setuptools import find_packages, setup

Expand Down Expand Up @@ -30,79 +29,12 @@ def absolute_links(txt):
return txt


minimum_python_version = '3.10'
if sys.version_info < tuple(map(int, minimum_python_version.split('.'))):
sys.exit(f'PEtab Select requires Python >= {minimum_python_version}')

# read version from file
__version__ = ''
version_file = os.path.join('petab_select', 'version.py')
# sets __version__
exec(read(version_file)) # pylint: disable=W0122 # nosec

ENTRY_POINTS = {
'console_scripts': [
'petab_select = petab_select.cli:cli',
]
}

# project metadata
# noinspection PyUnresolvedReferences
setup(
name='petab_select',
version=__version__,
description='PEtab Select: an extension to PEtab for model selection.',
long_description=absolute_links(read('README.md')),
long_description_content_type="text/markdown",
# author='The PEtab Select developers',
# author_email='[email protected]',
url=f'https://github.com/{org}/{repo}',
packages=find_packages(exclude=['doc*', 'test*']),
install_requires=[
# TODO minimum versions
'more-itertools',
'numpy',
'pandas',
'petab',
'pyyaml',
#'python-libsbml>=5.17.0',
#'sympy',
# required for CLI
'click',
'dill',
# plotting
#'matplotlib>=2.2.3',
#'seaborn',
],
include_package_data=True,
python_requires=f'>={minimum_python_version}',
entry_points=ENTRY_POINTS,
extras_require={
'test': [
'pytest >= 5.4.3',
'pytest-cov >= 2.10.0',
'amici >= 0.11.25',
'fides >= 0.7.5',
# FIXME
# 'pypesto > 0.2.13',
'pypesto @ git+https://github.com/ICB-DCM/pyPESTO.git@select_use_old_calibrations#egg=pypesto',
'tox >= 3.12.4',
'flake8 >= 4.0.1',
],
'doc': [
'sphinx>=3.5.3,<7',
'sphinxcontrib-napoleon>=0.7',
'sphinx-markdown-tables>=0.0.15',
'sphinx-rtd-theme>=0.5.1',
'recommonmark>=0.7.1',
# pin until ubuntu comes with newer pandoc:
# /home/docs/checkouts/readthedocs.org/user_builds/petab-select/envs/63/lib/python3.11/site-packages/nbsphinx/__init__.py:1058: RuntimeWarning: You are using an unsupported version of pandoc (2.9.2.1).
# Your version must be at least (2.14.2) but less than (4.0.0).
'nbsphinx==0.9.1',
'nbconvert<7.5.0',
'ipython>=7.21.0',
'readthedocs-sphinx-ext>=2.2.5',
'sphinx-autodoc-typehints',
],
},
)
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ description =

[testenv:base]
extras = test
deps =
git+https://github.com/ICB-DCM/pyPESTO.git@select_use_old_calibrations\#egg=pypesto
dweindl marked this conversation as resolved.
Show resolved Hide resolved
commands =
pytest --cov=petab_select --cov-report=xml --cov-append test -s
coverage report
Expand Down
Loading