Skip to content

Commit 4a2dbb0

Browse files
SFJohnson24filippsatverilygerrycampion
authored
Test/filipps update deps (#1757)
* Define dependencies in pyproject.toml Moves dependency constraints to pyproject.toml. Makes requirements.txt a lockfile. * Support click 8.3.0 Fixes an incompatibility caused by click 8.3.0, which passes the default value as-is. * Support pyreadstat 1.2.9 Fixes an incompatibility caused by pyreadstat 1.2.9, which changed original_variable_type from 'NULL' to None * Support jsonpath-ng 1.8.0 Works around an behavior change in jsonpath-ng 1.8.0 where Child.str gets wrapped in parenthesis. * Suport dask 2024.8.1 Fixes tokenization errors when using dask 2024.8.1+. Starting with this version, dask enforces that tokens remain stable across pickle round-trips (dask/dask#11320). Capturing self in a lambda fails this check because instance objects can have non-deterministic pickle representations. Since calculate_variable_value_length is already a static method, replacing self with the class name is enough to remove the capture. * Support dask 2024.12.1 Fixes an import error caused by dask 2024.12.1, which removed the legacy dask.dataframe.dd submodule (dask/dask#11604). Changes the import to `import dask.dataframe as dd`, consistent with every other file in the codebase. * Support dask 2025.4.0 Dask 2025.4.0 optimizes multiple DataFrames together, which exposes division mismatches when assigning a pandas Series to a dask DataFrame column. The old reset_index/set_index workaround no longer avoids this. Replacing it with compute-assign-rewrap via dd.from_pandas, which builds a clean expression graph. This is safe because __getitem__ already computes the DataFrame to produce the Series being assigned. * Support pandas 2.2.0 Fixes a unit test to support pandas 2.2.0+. The pandas release fixes a sorting bug with pandas-dev/pandas#54611. This commit changes the expected results accordingly. Also fixes a merge type mismatch introduced by upstream #1709: the codelist metadata side was cast to StringDtype but the evaluation dataset side was not. With pandas 2.2.0, empty columns infer as float64, and merging float64 with string is rejected. Casting both sides to string before the merge resolves this. * testing * restore * parentheses strip * stringg to str * black formatting for 26.5.1 * pylock * sync changes, and remove requirements * system flag * no build * pyproject.toml, removes requirements * dep ranges * dask, path rework * full path * str * jsonschema deps and tester * path * path * type coercion fix builder * to dict refactor * dask test * line length * azure-functions as optional-dependency --------- Co-authored-by: Filipp Shpomer <filipps@verily.com> Co-authored-by: Gerry Campion <gcampion@cdisc.org>
1 parent ac91ab7 commit 4a2dbb0

28 files changed

Lines changed: 134 additions & 115 deletions

.github/workflows/build-binary.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ jobs:
2020
python-version: "3.12"
2121
- name: Install dependencies
2222
run: |
23-
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine
25-
pip install --no-deps -r requirements.txt
26-
pip install -r requirements.txt --no-cache-dir
23+
pip install --upgrade pip
24+
pip install twine
25+
pip install .
2726
2827
- name: Build Binary (Linux)
2928
if: runner.os == 'Linux'

.github/workflows/build-version.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ jobs:
1818
python-version: "3.12"
1919
- name: Install dependencies
2020
run: |
21-
python -m pip install --upgrade pip
22-
pip install setuptools wheel twine
23-
pip install --no-deps -r requirements.txt
24-
pip install -r requirements.txt --no-cache-dir
21+
pip install --upgrade pip
22+
pip install twine
23+
pip install .
2524
- name: Update CDISC standards cache
2625
env:
2726
CDISC_LIBRARY_API_KEY: ${{ secrets.CDISC_LIBRARY_API_KEY }}
@@ -70,12 +69,11 @@ jobs:
7069
# uses: actions/setup-python@v6
7170
# with:
7271
# python-version: "3.12"
73-
# - name: Install dependencies
74-
# run: |
75-
# python -m pip install --upgrade pip
76-
# pip install setuptools wheel twine
77-
# pip install --no-deps -r requirements.txt
78-
# pip install -r requirements.txt --no-cache-dir
72+
# - name: Install dependencies
73+
# run: |
74+
# pip install --upgrade pip
75+
# pip install twine
76+
# pip install .
7977
# - name: Update CDISC standards cache
8078
# env:
8179
# CDISC_LIBRARY_API_KEY: ${{ secrets.CDISC_LIBRARY_API_KEY }}
@@ -114,12 +112,11 @@ jobs:
114112
# uses: actions/setup-python@v6
115113
# with:
116114
# python-version: "3.12"
117-
# - name: Install dependencies
118-
# run: |
119-
# python -m pip install --upgrade pip
120-
# pip install setuptools wheel twine
121-
# pip install --no-deps -r requirements.txt
122-
# pip install -r requirements.txt --no-cache-dir
115+
# - name: Install dependencies
116+
# run: |
117+
# pip install --upgrade pip
118+
# pip install twine
119+
# pip install .
123120
# - name: Update CDISC standards cache
124121
# env:
125122
# CDISC_LIBRARY_API_KEY: ${{ secrets.CDISC_LIBRARY_API_KEY }}

.github/workflows/deploy-rule-tester.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ jobs:
3030
environment: ${{ github.event_name == 'pull_request' && 'DEV' || inputs.environment || 'PROD' }}
3131
steps:
3232
- uses: actions/checkout@v6
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ env.PYTHON_VERSION }}
36+
- name: Generate requirements.txt from pyproject.toml
37+
run: pip install pip-tools && pip-compile pyproject.toml --extra rule-tester -o requirements.txt --no-header
3338
- uses: azure/login@v2
3439
with:
3540
creds: ${{ env.creds }}

.github/workflows/lint-format.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
python-version: "3.12"
5252
- name: Install linters
5353
run: |
54-
pip install black flake8 -c requirements-dev.txt
54+
pip install black flake8
5555
- name: Run flake8
5656
run: |
5757
flake8 ${{needs.get_changed_files.outputs.py}} --count --select=E9,F63,F7,F82 --show-source --statistics
@@ -88,7 +88,7 @@ jobs:
8888
python-version: "3.12"
8989
- name: Install yamllint
9090
run: |
91-
pip install yamllint -c requirements-dev.txt
91+
pip install ".[dev]"
9292
- name: Run yamllint
9393
run: |
9494
yamllint ${{needs.get_changed_files.outputs.yaml}}

.github/workflows/prerelease-update-cache.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ jobs:
2323
with:
2424
python-version: "3.12"
2525

26-
- name: Install requirements
27-
run: pip install -r requirements.txt
26+
- name: Install dependencies
27+
run: |
28+
pip install --upgrade pip
29+
pip install .
2830
2931
- name: Run Update Cache Script
3032
run: python core.py update-cache

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ jobs:
101101
python-version: "3.12"
102102
- name: Install dependencies
103103
run: |
104-
python -m pip install --upgrade pip
105-
pip install build setuptools wheel twine
106-
pip install -r requirements.txt
104+
pip install --upgrade pip
105+
pip install twine
106+
pip install .
107107
- name: Build package
108108
run: |
109109
python -m build

.github/workflows/test-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ jobs:
8080

8181
- name: Install dependencies
8282
run: |
83-
python -m pip install --upgrade pip
84-
pip install build setuptools wheel twine
85-
pip install -r requirements.txt
83+
pip install --upgrade pip
84+
pip install twine
85+
pip install .
8686
8787
- name: Build package
8888
run: |

.github/workflows/test-suite.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ jobs:
2828
python-version: "3.12"
2929
- name: Install dependencies
3030
run: |
31-
pip install -r requirements.txt
31+
pip install --upgrade pip
32+
pip install . --group dev
3233
- name: Update rules cache
3334
env:
3435
CDISC_LIBRARY_API_KEY: ${{ secrets.CDISC_LIBRARY_API_KEY }}
@@ -117,7 +118,7 @@ jobs:
117118
echo "## Dask Validation" >> $GITHUB_STEP_SUMMARY
118119
echo "✅ **Success**: Validation completed successfully" >> $GITHUB_STEP_SUMMARY
119120
python CORE_Test_Suite/scripts/validation_summary.py \
120-
dask-results.json >> $GITHUB_STEP_SUMMARY
121+
CORE_Test_Suite/dask-results.json >> $GITHUB_STEP_SUMMARY
121122
else
122123
echo "Failed to generate dask-results.json"
123124
echo "dask_success=false" >> $GITHUB_OUTPUT

.github/workflows/test-unit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
uses: actions/setup-python@v6
1515
with:
1616
python-version: "3.12"
17-
- name: Install requirements
17+
- name: Install dependencies
1818
run: |
19-
pip install -r requirements-dev.txt
20-
pip install -e .
19+
pip install --upgrade pip
20+
pip install . --group dev
2121
- name: Running Tests
2222
env:
2323
CDISC_LIBRARY_API_KEY: fakekey12341234

.github/workflows/validate-published-rules.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ on:
2121
required: false
2222
default: "main"
2323
core_ids:
24-
description: "Space-separated list of rule IDs to validate (e.g. CORE-000001 CORE-000002). Leave blank to validate all."
24+
description: >-
25+
Space-separated list of rule IDs to validate
26+
(e.g. CORE-000001 CORE-000002). Leave blank to validate all.
2527
required: false
2628
default: ""
2729

@@ -80,9 +82,8 @@ jobs:
8082
- name: Install engine dependencies
8183
run: |
8284
python -m venv venv
83-
./venv/bin/pip install --upgrade pip
84-
./venv/bin/pip install -r engine/requirements.txt
85-
85+
venv/bin/pip install --upgrade pip
86+
venv/bin/pip install . --group dev
8687
# -----------------------------------------------------------------------
8788
# 5. Run validation for every Published rule
8889
# -----------------------------------------------------------------------

0 commit comments

Comments
 (0)