Skip to content

Commit e5e99a0

Browse files
authored
Add pyyaml dependency and add install tests workflow (#2007)
1 parent 32b373a commit e5e99a0

File tree

6 files changed

+58
-1
lines changed

6 files changed

+58
-1
lines changed

.github/workflows/install.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Install Tests
2+
on:
3+
pull_request:
4+
types: [opened, synchronize]
5+
push:
6+
branches:
7+
- main
8+
jobs:
9+
install:
10+
name: ${{ matrix.python_version }} install
11+
strategy:
12+
fail-fast: true
13+
matrix:
14+
python_version: ["3.8", "3.12"]
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Set up python ${{ matrix.python_version }}
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python_version }}
21+
- uses: actions/checkout@v4
22+
- name: Build package
23+
run: |
24+
make package
25+
- name: Install package
26+
run: |
27+
python -m pip install "unpacked_sdist/."
28+
- name: Test by importing packages
29+
run: |
30+
python -c "import sdv"
31+
python -c "import sdv;print(sdv.version.public)"
32+
- name: Check package conflicts
33+
run: |
34+
python -m pip check

.github/workflows/integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
integration:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
12+
fail-fast: true
1213
matrix:
1314
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12']
1415
os: [ubuntu-latest, windows-latest]

.github/workflows/minimum.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
minimum:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
12+
fail-fast: true
1213
matrix:
1314
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12']
1415
os: [ubuntu-latest, windows-latest]

.github/workflows/unit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
unit:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
12+
fail-fast: true
1213
matrix:
1314
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12']
1415
os: [ubuntu-latest, windows-latest]

Makefile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,5 +265,24 @@ release-major: check-release bumpversion-major release
265265

266266
.PHONY: check-deps
267267
check-deps:
268-
$(eval allow_list='cloudpickle=|graphviz=|numpy=|pandas=|tqdm=|copulas=|ctgan=|deepecho=|rdt=|sdmetrics=|platformdirs=')
268+
$(eval allow_list='cloudpickle=|graphviz=|numpy=|pandas=|tqdm=|copulas=|ctgan=|deepecho=|rdt=|sdmetrics=|platformdirs=|pyyaml=')
269269
pip freeze | grep -v "SDV.git" | grep -E $(allow_list) | sort > $(OUTPUT_FILEPATH)
270+
271+
.PHONY: upgradepip
272+
upgradepip:
273+
python -m pip install --upgrade pip
274+
275+
.PHONY: upgradebuild
276+
upgradebuild:
277+
python -m pip install --upgrade build
278+
279+
.PHONY: upgradesetuptools
280+
upgradesetuptools:
281+
python -m pip install --upgrade setuptools
282+
283+
.PHONY: package
284+
package: upgradepip upgradebuild upgradesetuptools
285+
python -m build ; \
286+
$(eval VERSION=$(shell python -c 'import setuptools; setuptools.setup()' --version))
287+
tar -zxvf "dist/sdv-${VERSION}.tar.gz"
288+
mv "sdv-${VERSION}" unpacked_sdist

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ dependencies = [
3838
'rdt>=1.12.0',
3939
'sdmetrics>=0.14.0',
4040
'platformdirs>=4.0',
41+
'pyyaml>=6.0.1',
4142
]
4243

4344
[project.urls]

0 commit comments

Comments
 (0)