Skip to content

Commit

Permalink
Add dependency checker (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
lajohn4747 authored Apr 4, 2024
1 parent 1c088f3 commit a1e7ae9
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/dependency_checker.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,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=|scipy=|plotly=')
pip freeze | grep -v "Copulas.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"
Expand Down
4 changes: 4 additions & 0 deletions latest_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
numpy==1.26.4
pandas==2.2.1
plotly==5.20.0
scipy==1.13.0
14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ 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'",
'plotly>=5.10.0,<6',
"scipy>=1.5.4,<2;python_version<'3.10'",
"scipy>=1.9.2,<2;python_version>='3.10' and python_version<'3.12'",
"scipy>=1.12.0,<2;python_version>='3.12'",
'plotly>=5.10.0',
"scipy>=1.5.4;python_version<'3.10'",
"scipy>=1.9.2;python_version>='3.10' and python_version<'3.12'",
"scipy>=1.12.0;python_version>='3.12'",
]

[project.urls]
Expand Down

0 comments on commit a1e7ae9

Please sign in to comment.