Skip to content

Commit

Permalink
move dependencies to pyproject.toml file
Browse files Browse the repository at this point in the history
Major changes
- move dependencies to pyproject.toml file
- remove files `requirements.txt` and `requirements.dev.txt`
  • Loading branch information
CunliangGeng authored Mar 25, 2024
1 parent 9299ba8 commit a653781
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 55 deletions.
74 changes: 55 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# We use setup.cfg to set project metadata and setuptools configs.
# All the other configs (e.g. pytest, coverage) are set in this file.
# see https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html

[build-system]
requires = ["setuptools", "wheel"]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -26,42 +24,80 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"beautifulsoup4",
"biopython",
"deprecated",
"dynaconf",
"httpx",
"jsonschema",
"numpy",
"pandas",
"pyteomics",
"scipy",
"sortedcontainers",
"tqdm",
]
dynamic = ["dependencies", "optional-dependencies"]

[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }
optional-dependencies.dev = { file = ["requirements.dev.txt"] }
[project.optional-dependencies]
dev = [
# packaging
"build",
"bump2version",
"wheel",
# formatting and linting
"ruff",
# testing
"pytest",
"pytest-cov",
"pytest-xdist",
"coverage[toml]",
# static typing
"mypy",
"types-toml",
"types-Deprecated",
"typing_extensions",
# docs
"mkdocs",
"mkdocs-material",
"mkdocs-exclude",
"mkdocs-redirects",
"mkdocstrings-python",
"mike",
]

[project.urls]
"Homepage" = "https://github.com/NPLinker/nplinker"
"Bug Tracker" = "https://github.com/NPLinker/nplinker/issues"
"Documentation" = "https://nplinker.github.io/nplinker"
"Repository" = "https://github.com/NPLinker/nplinker"
"Issues" = "https://github.com/NPLinker/nplinker/issues"

[tool.setuptools.packages.find]
where = ["src"]
namespaces = true # enable data directory to be identified
where = ["src"]
namespaces = true # enable data directory to be identified

[tool.setuptools.package-data]
"nplinker.data" = ["*"]
"nplinker.data" = ["*"]
"nplinker.schemas" = ["*"]
"nplinker" = ["nplinker_default.toml"]

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -n auto" # -ra: show summary info for all test outcomes; -n auto: run tests in parallel
testpaths = ["tests/unit"]
addopts = "-ra -n auto" # -ra: show summary info for all test outcomes; -n auto: run tests in parallel
testpaths = ["tests/unit"]

[tool.coverage.run]
branch = true
source = ["src"]
branch = true
source = ["src"]
command_line = "-m pytest"

# Mypy: to check static type
# see https://mypy.readthedocs.io/en/stable/config_file.html#example-pyproject-toml
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true

[tool.ruff]
Expand Down
23 changes: 0 additions & 23 deletions requirements.dev.txt

This file was deleted.

12 changes: 0 additions & 12 deletions requirements.txt

This file was deleted.

1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
if sys.version_info[:2] < (3, 9):
raise RuntimeError("Python version >= 3.9 required.")

# see setup.cfg
setup(scripts=["bin/install-nplinker-deps"])

0 comments on commit a653781

Please sign in to comment.