diff --git a/.github/workflows/dependency_checker.yml b/.github/workflows/dependency_checker.yml new file mode 100644 index 0000000..7dbe870 --- /dev/null +++ b/.github/workflows/dependency_checker.yml @@ -0,0 +1,29 @@ +name: Dependency Checker +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * 1-5' +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install .[dev] + make check-deps OUTPUT_FILEPATH=latest_requirements.txt + - name: Create pull request + id: cpr + uses: peter-evans/create-pull-request@v4 + with: + token: ${{ secrets.GH_ACCESS_TOKEN }} + commit-message: Update latest dependencies + title: Automated Latest Dependency Updates + body: "This is an auto-generated PR with **latest** dependency updates." + branch: latest-dependency-update + branch-suffix: short-commit-hash + base: main diff --git a/Makefile b/Makefile index 508726f..4bfef15 100644 --- a/Makefile +++ b/Makefile @@ -217,6 +217,11 @@ ifeq ($(CHANGELOG_LINES),0) $(error Please insert the release notes in HISTORY.md before releasing) endif +.PHONY: check-deps +check-deps: # Dependency targets + $(eval allow_list='numpy=|pandas=|torch=|tqdm=') + pip freeze | grep -v "SDMetrics.git" | grep -E $(allow_list) | sort > $(OUTPUT_FILEPATH) + .PHONY: check-release check-release: check-clean check-candidate check-main check-history ## Check if the release can be made @echo "A new release can be made" diff --git a/latest_requirements.txt b/latest_requirements.txt new file mode 100644 index 0000000..5e4ab8d --- /dev/null +++ b/latest_requirements.txt @@ -0,0 +1,4 @@ +numpy==1.26.4 +pandas==2.2.1 +torch==2.2.2 +tqdm==4.66.2 diff --git a/pyproject.toml b/pyproject.toml index 06a645f..8af417d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,9 +21,9 @@ license = { text = 'BSL-1.1' } requires-python = '>=3.8,<3.13' readme = 'README.md' dependencies = [ - "numpy>=1.20.0,<2;python_version<'3.10'", - "numpy>=1.23.3,<2;python_version>='3.10' and python_version<'3.12'", - "numpy>=1.26.0,<2;python_version>='3.12'", + "numpy>=1.20.0;python_version<'3.10'", + "numpy>=1.23.3;python_version>='3.10' and python_version<'3.12'", + "numpy>=1.26.0;python_version>='3.12'", "pandas>=1.1.3;python_version<'3.10'", "pandas>=1.3.4;python_version>='3.10' and python_version<'3.11'", "pandas>=1.5.0;python_version>='3.11'", @@ -31,7 +31,7 @@ dependencies = [ "torch>=1.11.0;python_version>='3.10' and python_version<'3.11'", "torch>=2.0.0;python_version>='3.11' and python_version<'3.12'", "torch>=2.2.0;python_version>='3.12'", - 'tqdm>=4.29,<5', + 'tqdm>=4.29', ] [project.urls] @@ -200,4 +200,4 @@ indent-style = "space" preview = true [tool.ruff.lint.pydocstyle] -convention = "google" \ No newline at end of file +convention = "google"