-
Notifications
You must be signed in to change notification settings - Fork 15
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
Replacing Setup.py with Pyproject.py #279
Changes from 7 commits
f81c5f4
9ffa8e4
7cd1b04
ff9cd28
6b7bcea
83e711c
db65a8b
63d10d3
dd4feb0
29d43f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
isort==4.3.21 | ||
isort==5.13.2 | ||
tox | ||
wheel | ||
bumpversion | ||
twine | ||
black | ||
flake8 | ||
pylint | ||
tomli==2.0.1 | ||
cython | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. needed for tox validation of pyproject.toml |
||
sphinx | ||
sphinx-rtd-theme | ||
mypy==0.770 | ||
-r requirements.txt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. needed to updated because latest version of Py3.11 did not support this version |
||
mypy==1.8.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
|
||
ignore_missing_imports = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you explain this one to me? Don't we need all our imports? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for this catch, its suppose to be under |
||
[build-system] | ||
requires = ["setuptools>=61.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
@@ -7,8 +9,53 @@ name = "cromshell" | |
# Version number is automatically set via bumpversion. DO NOT MODIFY: | ||
version = "2.1.1" | ||
readme = "README.md" | ||
|
||
description="Command Line Interface (CLI) for Cromwell servers" | ||
authors=[ | ||
{name = "Jonn Smith", email = "[email protected]"}, | ||
{name = "Louis Bergelson", email = "[email protected]"}, | ||
{name = "Beri Shifaw", email = "[email protected]"}, | ||
] | ||
license={text = "BSD 3-Clause"} | ||
requires-python=">=3.7" | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: BSD License", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
] | ||
keywords = [ | ||
"cromwell", "cromshell", "cromwell-cli", "cromwell-client", "cromwell-api", | ||
"cromwell-rest", "cromwell-utilities", "cromwell-tools", | ||
] | ||
dynamic = ["dependencies", "optional-dependencies"] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/broadinstitute/cromshell" | ||
Homepage = "https://github.com/broadinstitute/cromshell" | ||
"Bug Tracker" = "https://github.com/broadinstitute/cromshell/issues" | ||
|
||
[project.scripts] | ||
cromshell = "cromshell.__main__:main_entry" | ||
|
||
# Configuration for the `setuptools` package | ||
[tool.setuptools.dynamic] | ||
dependencies = {file = ["requirements.txt"]} | ||
optional-dependencies = {dev = { file = ["dev-requirements.txt"]}, tests = { file = ["test-requirements.txt"]}} | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
include = ["cromshell*"] | ||
|
||
# former dump_setup.cfg configuration for mypy | ||
[tool.mypy."numpy.*"] | ||
ignore_missing_imports = true | ||
|
||
[tool.mypy."pysam.*"] | ||
ignore_missing_imports = true | ||
|
||
[tool.mypy."pytest.*"] |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,3 @@ pytest | |
pytest-cov | ||
pytest-dependency | ||
coverage>=4.5 | ||
-r requirements.txt |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ ignore = E203, E501, W503 | |
|
||
[testenv] | ||
deps = -rtest-requirements.txt | ||
-rrequirements.txt | ||
commands = | ||
pytest tests/unit tests/integration tests/acceptance \ | ||
--cov cromshell \ | ||
|
@@ -28,16 +29,19 @@ setenv = | |
|
||
[testenv:unit] | ||
deps = -rtest-requirements.txt | ||
-rrequirements.txt | ||
commands = | ||
pytest tests/unit {posargs} | ||
|
||
[testenv:integration] | ||
deps = -rtest-requirements.txt | ||
-rrequirements.txt | ||
commands = | ||
pytest tests/integration {posargs} | ||
|
||
[testenv:acceptance] | ||
deps = -rtest-requirements.txt | ||
-rrequirements.txt | ||
commands = | ||
pytest tests/acceptance {posargs} | ||
|
||
|
@@ -49,9 +53,9 @@ deps = | |
flake8 | ||
|
||
commands = | ||
black --check --diff --target-version py38 src tests setup.py | ||
isort --check-only --profile black --diff -rc tests src setup.py | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
flake8 src tests setup.py | ||
black --check --diff --target-version py38 src tests | ||
isort --check-only --profile black --diff tests src | ||
flake8 src tests | ||
pylint --exit-zero src | ||
|
||
[testenv:lint-edit] | ||
|
@@ -61,9 +65,9 @@ deps = | |
flake8 | ||
|
||
commands = | ||
black --target-version py38 src tests setup.py | ||
isort --profile black -rc tests src setup.py | ||
flake8 src tests setup.py | ||
black --target-version py38 src tests | ||
isort --profile black tests src | ||
flake8 src tests | ||
pylint --exit-zero src | ||
|
||
[gh-actions] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The original thought was to have this be used during github testing, but the github actions list the python version to test so its is not needed here |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no integrated solution for validating the pyproject.toml file. There are some third-party application but they are unstable.
I've noticed though that tox run excutting its test automatically does a basic level check of the toml file using not a cli command but via package called "tomli". This has been added to the dev-requirments.txt file