From b1ac62634391e54350f3c2c81b44852c52853d1a Mon Sep 17 00:00:00 2001 From: esavary Date: Thu, 21 Mar 2024 13:13:10 +0100 Subject: [PATCH] fix: remove unused files --- .maint/update_requirements.py | 48 ----------------------------------- min-requirements.txt | 10 -------- requirements.txt | 10 -------- 3 files changed, 68 deletions(-) delete mode 100644 .maint/update_requirements.py delete mode 100644 min-requirements.txt delete mode 100644 requirements.txt diff --git a/.maint/update_requirements.py b/.maint/update_requirements.py deleted file mode 100644 index cd797ef3..00000000 --- a/.maint/update_requirements.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python3 -from copy import copy -from pathlib import Path -from packaging.requirements import Requirement, SpecifierSet - -try: - from tomllib import loads # Python +3.11 -except ImportError: - from pip._vendor.tomli import loads - -repo_root = Path(__file__).parent.parent -pyproject = repo_root / "pyproject.toml" -reqs = repo_root / "requirements.txt" -min_reqs = repo_root / "min-requirements.txt" - -requirements = [ - Requirement(req) - for req in loads(pyproject.read_text())["project"]["dependencies"] -] - -script_name = Path(__file__).relative_to(repo_root) - - -def to_min(req): - if req.specifier: - req = copy(req) - try: - min_spec = [ - spec - for spec in req.specifier - if spec.operator in (">=", "~=") - ][0] - except IndexError: - return req - min_spec._spec = ("==",) + min_spec._spec[1:] - req.specifier = SpecifierSet(str(min_spec)) - return req - - -lines = [f"# Auto-generated by {script_name}", ""] - -# Write requirements -lines[1:-1] = [str(req) for req in requirements] -reqs.write_text("\n".join(lines)) - -# Write minimum requirements -lines[1:-1] = [str(to_min(req)) for req in requirements] -min_reqs.write_text("\n".join(lines)) diff --git a/min-requirements.txt b/min-requirements.txt deleted file mode 100644 index e8efba90..00000000 --- a/min-requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Auto-generated by .maint/update_requirements.py -dipy==1.3.0 -joblib -nipype==1.5.1 -nitransforms==21.0.0 -nireports -numpy==1.17.3 -nest-asyncio==1.5.1 -scikit-image==0.14.2 -scipy==1.8.0 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 437d9d14..00000000 --- a/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Auto-generated by .maint/update_requirements.py -dipy>=1.3.0 -joblib -nipype<2.0,>=1.5.1 -nitransforms>=21.0.0 -nireports -numpy>=1.17.3 -nest-asyncio>=1.5.1 -scikit-image>=0.14.2 -scipy>=1.8.0