Skip to content

Commit

Permalink
Add dependency checker
Browse files Browse the repository at this point in the history
  • Loading branch information
amontanez24 committed Mar 1, 2024
1 parent d6ce31b commit 48b853b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 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:
schedule:
- cron: '0 0 * * 1-5'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
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
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,10 @@ release-minor: check-release bumpversion-minor release

.PHONY: release-major
release-major: check-release bumpversion-major release

# Dependency targets

.PHONY: check-deps
checkdeps:
$(eval allow_list='numpy|pandas|scikit-learn|tqdm|torch|rdt')
pip freeze | grep -v "CTGAN.git" | grep -E $(allow_list) > $(OUTPUT_FILEPATH)
6 changes: 6 additions & 0 deletions latest_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
numpy==1.26.4
pandas==2.2.1
scikit-learn==1.4.1.post1
tqdm==4.66.2
torch==2.2.1
rdt==1.9.2

0 comments on commit 48b853b

Please sign in to comment.