Skip to content

Commit ad2ebb7

Browse files
authored
Make openpyxl a standard requirement (#480)
1 parent d786575 commit ad2ebb7

File tree

3 files changed

+60
-3
lines changed

3 files changed

+60
-3
lines changed

.github/workflows/install.yml

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

Makefile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ endif
212212

213213
.PHONY: check-deps
214214
check-deps: # Dependency targets
215-
$(eval allow_list='appdirs=|compress-pickle=|humanfriendly=|numpy=|pandas=|\
215+
$(eval allow_list='appdirs=|compress-pickle=|humanfriendly=|numpy=|openpyxl=|pandas=|\
216216
psutil=|scikit-learn=|scipy=|tabulate=|torch=|tqdm=|XlsxWriter=|rdt=|sdmetrics=|sdv=')
217217
pip freeze | grep -v "SDMetrics.git" | grep -E $(allow_list) | sort > $(OUTPUT_FILEPATH)
218218

@@ -238,3 +238,22 @@ release-minor: check-release bumpversion-minor release
238238

239239
.PHONY: release-major
240240
release-major: check-release bumpversion-major release
241+
242+
.PHONY: upgradepip
243+
upgradepip:
244+
python -m pip install --upgrade pip
245+
246+
.PHONY: upgradebuild
247+
upgradebuild:
248+
python -m pip install --upgrade build
249+
250+
.PHONY: upgradesetuptools
251+
upgradesetuptools:
252+
python -m pip install --upgrade setuptools
253+
254+
.PHONY: package
255+
package: upgradepip upgradebuild upgradesetuptools
256+
python -m build ; \
257+
$(eval VERSION=$(shell python -c 'import setuptools; setuptools.setup()' --version))
258+
tar -zxvf "dist/sdgym-${VERSION}.tar.gz"
259+
mv "sdgym-${VERSION}" unpacked_sdist

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ dependencies = [
3131
"numpy>=1.24.0;python_version>='3.10' and python_version<'3.12'",
3232
"numpy>=1.26.0;python_version>='3.12' and python_version<'3.13'",
3333
"numpy>=2.1.0;python_version>='3.13'",
34+
'openpyxl>=3.1.2',
3435
"pandas>=1.4.0;python_version<'3.11'",
3536
"pandas>=1.5.0;python_version>='3.11' and python_version<'3.12'",
3637
"pandas>=2.1.1;python_version>='3.12' and python_version<'3.13'",
@@ -78,8 +79,6 @@ test = [
7879
'jupyter>=1.0.0,<2',
7980
'tomli>=2.0.0,<3',
8081
'slack-sdk>=3.23,<4.0',
81-
"openpyxl>=3.0.0; python_version<'3.9'",
82-
"openpyxl>=3.1.2; python_version>='3.9'",
8382
'pydrive2>=1.4.0,<2.0.0'
8483
]
8584
dev = [

0 commit comments

Comments
 (0)