Skip to content

Commit

Permalink
update to src layout and cleanup dependencies. (#176)
Browse files Browse the repository at this point in the history
* update to src layout and cleanup dependencies.

* fix toml file.
  • Loading branch information
paquiteau authored and chaithyagr committed Mar 14, 2024
1 parent 4e2489e commit fd04b23
Show file tree
Hide file tree
Showing 62 changed files with 91 additions and 85 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
run: |
conda info
conda list
sudo apt install -y libnfft3-dev
python --version
- name: Install Dependencies
Expand All @@ -48,7 +47,6 @@ jobs:
python -m pip install git+https://github.com/CEA-COSMIC/pysap.git@develop
python -m pip install git+https://github.com/AGrigis/pysphinxdoc.git
python -m pip install coverage nose pytest pytest-cov pycodestyle pydocstyle twine pytest-xdist
python -m pip install pynfft2
python -m pip install --upgrade .
- name: Check PEP
Expand All @@ -63,7 +61,7 @@ jobs:
shell: bash -l {0}
run: |
which python
python setup.py test
pytest
- name: Save Test Results
if: always()
Expand Down
5 changes: 0 additions & 5 deletions AUTHOR

This file was deleted.

1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

3 changes: 0 additions & 3 deletions gpu_requirements.txt

This file was deleted.

90 changes: 90 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@

[project]
name = "pysap-mri"
version = "0.5.0"
description = "Python Sparse data Analysis Package external MRI plugin."
readme = "README.rst"
authors = [
{name = "Chaithya G R",email="[email protected]"},
{name="Pierre-Antoine Comby", email="[email protected]"},
{name="Jean-Luc Starck", email="[email protected]"},
{name="Philippe Ciuciu", email="[email protected]"},
]
dependencies = [
"finufft>=2.2.0",
"joblib>=1.0.0",
"modopt>=1.7.1",
"numpy>=1.16.0",
"mri-nufft>=0.4.0",
"progressbar2>=3.34.3",
"scikit-image>=0.17.0",
"scikit-learn>=0.19.1",
"scipy>=1.3.0",
]
license = {text = "CeCILL-B"}
requires-python = ">=3.10"

[project.optional-dependencies]
test=['pytest>=5.0.1', 'pytest-cov>=2.7.1', 'pytest-pep8', 'pytest-runner', "pytest-xdist", "pytest-sugar"]
gpu=["cupy", "cufinufft", "gpunufft"]

[project.urls]
Homepage = "https://github.com/CEA-COSMIC/pysap-mri"

[build-system]
requires = ["setuptools", "setuptools-scm[toml]", "wheel"]

[tool.setuptools_scm]
write_to = "src/mri/_version.py"
version_scheme = "python-simplified-semver"
local_scheme="no-local-version"
fallback_version="v99-dev"


[tool.pytest.ini_options]
addopts = ["-n 3",
"--verbose",
"--cov=mri",
"--cov-config=.coveragerc",
"--ignore-glob='*test_local*.py'",
"--cov-report=term",
"--cov-report=xml",
"--junitxml=pytest.xml",
"--maxfail=2",
]
testpaths = ["tests"]

[tool.pylsp-mypy]
enabled = false
live_mode = false

[tool.mypy]
ignore_missing_imports = true


[tool.coverage.run]
omit = ["*tests*", "*__init__*", "*setup.py*", "*_version.py*", "*example*"]
relative_files = true
source = ["src"]

[tool.coverage.report]
precision = 2
exclude_lines = ["pragma: no cover", "raise NotImplementedError"]

# Formatting using black.
[tool.black]

#linting using ruff
[tool.ruff]
extend-exclude = [ "example_*.py" , "*_version.py"]

[tool.ruff.lint]
select = ["E", "F", "B", "Q", "UP", "D"]

ignore = [
"B905", # zip() without an explicit strict= parameter
"B028", # No explicit stacklevel keyword argument found
"F401", # Using ``try: import ... except:`` is nice.
]
[tool.ruff.lint.pydocstyle]
convention="numpy"
18 changes: 0 additions & 18 deletions setup.cfg

This file was deleted.

55 changes: 0 additions & 55 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit fd04b23

Please sign in to comment.