Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add latest dependency checker workflow #549

Merged
merged 9 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/dependency_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Dependency Checker
on:
pull_request:
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note, this will output the file in the root directory. We could put this in tests or somewhere else

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it is fine to be in root but I have no preference on where it should go (kept it consistent with the other dependency checker)
cc: @amontanez24 for input

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm fine with it

- name: Create pull request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
lajohn4747 marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -204,6 +204,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=|scikit-learn=|scipy=|tqdm=|plotly=|copulas=')
pip freeze | grep -v "SDMetrics.git" | grep -E $(allow_list) | sort > $(OUTPUT_FILEPATH)

.PHONY: check-release
check-release: check-clean check-main check-history ## Check if the release can be made
@echo "A new release can be made"
Expand Down
7 changes: 7 additions & 0 deletions latest_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
copulas==0.10.1
numpy==1.23.3
pandas==1.3.4
plotly==5.10.0
scikit-learn==1.4.1.post1
scipy==1.9.2
tqdm==4.15.0
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ license = { text = 'MIT license' }
requires-python = ">=3.8,<3.12"
readme = 'README.md'
dependencies = [
"numpy>=1.20.0,<2;python_version<'3.10'",
"numpy>=1.23.3,<2;python_version>='3.10'",
"numpy>=1.20.0;python_version<'3.10'",
"numpy>=1.23.3;python_version>='3.10'",
"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'",
"scikit-learn>=0.24,<2;python_version<'3.10'",
"scikit-learn>=1.1.3,<2;python_version>='3.10'",
"scipy>=1.5.4,<2;python_version<'3.10'",
"scipy>=1.9.2,<2;python_version>='3.10'",
'copulas>=0.10.0,<0.11',
'tqdm>=4.15,<5',
'plotly>=5.10.0,<6',
"scikit-learn>=0.24;python_version<'3.10'",
"scikit-learn>=1.1.3;python_version>='3.10'",
"scipy>=1.5.4;python_version<'3.10'",
"scipy>=1.9.2;python_version>='3.10'",
'copulas>=0.10.0',
'tqdm>=4.15',
'plotly>=5.10.0',
]

[project.urls]
Expand Down
Loading