From 48b853be5e9b1c5514099dd95997f73787d37462 Mon Sep 17 00:00:00 2001 From: Andrew Montanez Date: Thu, 29 Feb 2024 18:39:23 -0600 Subject: [PATCH] Add dependency checker --- .github/workflows/dependency_checker.yml | 29 ++++++++++++++++++++++++ Makefile | 7 ++++++ latest_requirements.txt | 6 +++++ 3 files changed, 42 insertions(+) create mode 100644 .github/workflows/dependency_checker.yml create mode 100644 latest_requirements.txt diff --git a/.github/workflows/dependency_checker.yml b/.github/workflows/dependency_checker.yml new file mode 100644 index 00000000..0afe300e --- /dev/null +++ b/.github/workflows/dependency_checker.yml @@ -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 diff --git a/Makefile b/Makefile index ea6a8132..a3e3db94 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/latest_requirements.txt b/latest_requirements.txt new file mode 100644 index 00000000..28aa9ce9 --- /dev/null +++ b/latest_requirements.txt @@ -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 \ No newline at end of file