From 96fe6dda7a758819a33b75fa5fa101947baf404f Mon Sep 17 00:00:00 2001 From: lajohn4747 Date: Wed, 3 Apr 2024 10:06:03 -0500 Subject: [PATCH 1/9] Add latest dependency checker workflow --- Makefile | 5 +++++ pyproject.toml | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b634a918..8ce186dc 100644 --- a/Makefile +++ b/Makefile @@ -204,6 +204,11 @@ ifeq ($(CHANGELOG_LINES),0) $(error Please insert the release notes in HISTORY.md before releasing) endif +.PHONY: check-deps +checkdeps: # Dependency targets + $(eval allow_list='numpy|pandas|scikit-learn|scipy|tqdm|plotly|copulas') + pip freeze | grep -v "SDMetrics.git" | grep -E $(allow_list) > $(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" diff --git a/pyproject.toml b/pyproject.toml index a4be42f4..20a71629 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] From 4a83f23405f9b2e30cd3ca7ba89c85de00df66c4 Mon Sep 17 00:00:00 2001 From: lajohn4747 Date: Wed, 3 Apr 2024 10:08:29 -0500 Subject: [PATCH 2/9] Added latest requirements and github action --- .github/workflows/dependency_checker.yml | 29 ++++++++++++++++++++++++ latest-requirements.txt | 7 ++++++ 2 files changed, 36 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/latest-requirements.txt b/latest-requirements.txt new file mode 100644 index 00000000..efc55cfe --- /dev/null +++ b/latest-requirements.txt @@ -0,0 +1,7 @@ +numpy==1.26.4 +scikit-learn==1.4.1.post1 +scipy==1.13.0 +copulas==0.10.1 +tqdm==4.66.2 +plotly==5.20.0 +pandas==2.2.1 From e21817f399fe2152c768527377f27a8cbf1173b0 Mon Sep 17 00:00:00 2001 From: lajohn4747 Date: Wed, 3 Apr 2024 10:28:00 -0500 Subject: [PATCH 3/9] Add workflow dispatch --- .github/workflows/dependency_checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependency_checker.yml b/.github/workflows/dependency_checker.yml index 0afe300e..50d577fe 100644 --- a/.github/workflows/dependency_checker.yml +++ b/.github/workflows/dependency_checker.yml @@ -1,8 +1,8 @@ name: Dependency Checker on: + workflow_dispatch: schedule: - cron: '0 0 * * 1-5' - workflow_dispatch: jobs: build: runs-on: ubuntu-latest From fd585bed04551cf2aab924e880e94ad2ab58d2ad Mon Sep 17 00:00:00 2001 From: lajohn4747 Date: Wed, 3 Apr 2024 11:05:43 -0500 Subject: [PATCH 4/9] Add on push to see workflow --- .github/workflows/dependency_checker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dependency_checker.yml b/.github/workflows/dependency_checker.yml index 50d577fe..07cc0094 100644 --- a/.github/workflows/dependency_checker.yml +++ b/.github/workflows/dependency_checker.yml @@ -1,5 +1,6 @@ name: Dependency Checker on: + pull_request: workflow_dispatch: schedule: - cron: '0 0 * * 1-5' From 9f1a29356f9b13fc4cc56cad260212029e83099b Mon Sep 17 00:00:00 2001 From: lajohn4747 Date: Wed, 3 Apr 2024 12:03:26 -0500 Subject: [PATCH 5/9] Address feedback --- .github/workflows/dependency_checker.yml | 4 ++-- Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependency_checker.yml b/.github/workflows/dependency_checker.yml index 07cc0094..0fecfa96 100644 --- a/.github/workflows/dependency_checker.yml +++ b/.github/workflows/dependency_checker.yml @@ -8,9 +8,9 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 - name: Install dependencies diff --git a/Makefile b/Makefile index 8ce186dc..77029109 100644 --- a/Makefile +++ b/Makefile @@ -206,8 +206,8 @@ endif .PHONY: check-deps checkdeps: # Dependency targets - $(eval allow_list='numpy|pandas|scikit-learn|scipy|tqdm|plotly|copulas') - pip freeze | grep -v "SDMetrics.git" | grep -E $(allow_list) > $(OUTPUT_FILEPATH) + $(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 From d621bdebb552c5e5482984ad95c3a6b1fe3a9ae6 Mon Sep 17 00:00:00 2001 From: lajohn4747 Date: Wed, 3 Apr 2024 12:44:34 -0500 Subject: [PATCH 6/9] Run with the newest requirements --- Makefile | 2 +- latest-requirements.txt | 7 ------- latest_requirements.txt | 7 +++++++ 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 latest-requirements.txt create mode 100644 latest_requirements.txt diff --git a/Makefile b/Makefile index 77029109..6fa04057 100644 --- a/Makefile +++ b/Makefile @@ -205,7 +205,7 @@ ifeq ($(CHANGELOG_LINES),0) endif .PHONY: check-deps -checkdeps: # Dependency targets +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) diff --git a/latest-requirements.txt b/latest-requirements.txt deleted file mode 100644 index efc55cfe..00000000 --- a/latest-requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -numpy==1.26.4 -scikit-learn==1.4.1.post1 -scipy==1.13.0 -copulas==0.10.1 -tqdm==4.66.2 -plotly==5.20.0 -pandas==2.2.1 diff --git a/latest_requirements.txt b/latest_requirements.txt new file mode 100644 index 00000000..ce27b336 --- /dev/null +++ b/latest_requirements.txt @@ -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 From 7d34d011d8943be7e2a3855f8de05b85581cf660 Mon Sep 17 00:00:00 2001 From: lajohn4747 Date: Wed, 3 Apr 2024 15:49:11 -0500 Subject: [PATCH 7/9] Use correct secret token name --- .github/workflows/dependency_checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependency_checker.yml b/.github/workflows/dependency_checker.yml index 0fecfa96..ac262de3 100644 --- a/.github/workflows/dependency_checker.yml +++ b/.github/workflows/dependency_checker.yml @@ -21,7 +21,7 @@ jobs: id: cpr uses: peter-evans/create-pull-request@v4 with: - token: ${{ secrets.GH_ACCESS_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} commit-message: Update latest dependencies title: Automated Latest Dependency Updates body: "This is an auto-generated PR with **latest** dependency updates." From 73eb9ce0ba293173d9d25a42c583ecfad466c735 Mon Sep 17 00:00:00 2001 From: lajohn4747 Date: Wed, 3 Apr 2024 16:58:49 -0500 Subject: [PATCH 8/9] Use GH_ACCESS_TOKEN so PR can be triggered --- .github/workflows/dependency_checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependency_checker.yml b/.github/workflows/dependency_checker.yml index ac262de3..0fecfa96 100644 --- a/.github/workflows/dependency_checker.yml +++ b/.github/workflows/dependency_checker.yml @@ -21,7 +21,7 @@ jobs: id: cpr uses: peter-evans/create-pull-request@v4 with: - token: ${{ secrets.GITHUB_TOKEN }} + 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." From 084d23889bb751a2197036a0414082b66f357639 Mon Sep 17 00:00:00 2001 From: lajohn4747 Date: Wed, 3 Apr 2024 17:43:02 -0500 Subject: [PATCH 9/9] Remove on pull_request trigger --- .github/workflows/dependency_checker.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dependency_checker.yml b/.github/workflows/dependency_checker.yml index 0fecfa96..7dbe8703 100644 --- a/.github/workflows/dependency_checker.yml +++ b/.github/workflows/dependency_checker.yml @@ -1,6 +1,5 @@ name: Dependency Checker on: - pull_request: workflow_dispatch: schedule: - cron: '0 0 * * 1-5'