Skip to content

Commit

Permalink
Replace setup.py by pyproject.toml (#195)
Browse files Browse the repository at this point in the history
* add pyproject.toml file

* move pytest config into pyproject.toml

* define package version only in pyproject.toml

* simplify test_sigpy_import() to pass CI pipeline

* delete version.py, setup.py, pytest.ini, MANIFEST.in files


---------

Co-authored-by: Patrick Schuenke <patrick.schuenke@gmail.com>
  • Loading branch information
btasdelen and schuenke committed Aug 28, 2024
1 parent 25938e8 commit c6d4eff
Show file tree
Hide file tree
Showing 10 changed files with 1,940 additions and 1,972 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/push_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
shell: bash -l {0}
run: |
pip install .
pytest -m "not matlab_seq_comp and not sigpy" pypulseq/tests
pytest -m "not matlab_seq_comp and not sigpy"
- name: Run pytest[sigpy]
shell: bash -l {0}
run: |
pip install .[sigpy]
pytest -m "not matlab_seq_comp" pypulseq/tests
continue-on-error: true
pytest -m "not matlab_seq_comp"
continue-on-error: true
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

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

[project]
name = "pypulseq"
version = "1.4.2"
authors = [{ name = "Keerthi Sravan Ravi", email = "ks3621@columbia.edu" }]
maintainers = [
{ name = "Bilal Tasdelen" },
{ name = "Frank Ziljstra" },
{ name = "Patrick Schuenke" },
]
description = "Pulseq in Python"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.6.3"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = [
"coverage>=6.2",
"matplotlib>=3.5.2",
"numpy>=1.19.5",
"scipy>=1.8.1",
]

[project.optional-dependencies]
sigpy = ["sigpy>=0.1.26"]
test = ["pytest"]

[project.urls]
Homepage = "https://github.com/imr-framework/pypulseq"
Issues = "https://github.com/imr-framework/pypulseq/issues"
Documentation = "https://pypulseq.readthedocs.io/en/latest/"

[tool.setuptools.packages.find]
where = ["pypulseq"]

[tool.setuptools.package-data]
SAR = ["QGlobal.mat"]

[tool.setuptools.dynamic]
version = { attr = "version.__version__" }

# PyTest section
[tool.pytest.ini_options]
testpaths = ["pypulseq/tests"]
filterwarnings = ["error"]
markers = [
"matlab_seq_comp: comparison with matlab generated sequence",
"sigpy: tests that require sigpy",
]
Loading

0 comments on commit c6d4eff

Please sign in to comment.