Skip to content

Commit e8c7d48

Browse files
authored
pin pandas version to less than 3, add missing required packages, temporarily remove sorting of index in boxplot (llnl#271)
* pin pandas version to less than 3 * separate codecov workflow in CI, add python 3.12, 3.13 * fix if check * fix wheel package name * add missing more-itertools to list of requirements more-itertools is in setup.py * add missing tqdm * temporarily remove sorting of index in boxplot, so tests pass Pandas error trying to sort columns, most are tuples, but one is a slice. TypeError: '<' not supported between instances of 'tuple' and 'slice'
1 parent 4ef1117 commit e8c7d48

5 files changed

Lines changed: 88 additions & 23 deletions

File tree

.github/workflows/coverage.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: unit tests to collect code coverage
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
secrets:
7+
THICKET_CODECOV_TOKEN:
8+
required: true
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-22.04]
17+
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
18+
exclude:
19+
- os: macos-latest
20+
python-version: [3.5, 3.6]
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Install Python Dependencies for 3.12 and later
31+
if: ${{ matrix.python-version >= '3.12' }}
32+
run: |
33+
python -m pip install --upgrade pip pytest setuptools wheel
34+
pip install -r requirements.txt
35+
# Optional Dependency for HDF Checkpointing
36+
pip install tables
37+
python setup.py install
38+
python setup.py build_ext --inplace
39+
python -m pip list
40+
41+
- name: Standard Install Python3 Dependencies
42+
run: |
43+
python -m pip install --upgrade pip pytest
44+
pip install -r requirements.txt
45+
# Optional Dependency for HDF Checkpointing
46+
pip install tables
47+
python setup.py install
48+
python setup.py build_ext --inplace
49+
python -m pip list
50+
51+
- name: Install coverage tools
52+
run: |
53+
pip install codecov
54+
pip install pytest-cov
55+
56+
- name: Basic Test with pytest
57+
run: |
58+
PYTHONPATH=. $(which pytest) --cov=./ --cov-report=xml
59+
60+
- name: Upload coverage to Codecov
61+
uses: codecov/codecov-action@v4
62+
env:
63+
CODECOV_TOKEN: ${{ secrets.THICKET_CODECOV_TOKEN }}
64+
with:
65+
directory: ./coverage/reports
66+
env_vars: OS,PYTHON
67+
files: /home/runner/work/hatchet/hatchet/coverage.xml
68+
flags: unittests
69+
verbose: true
70+
fail_ci_if_error: true

.github/workflows/unit-tests.yaml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
matrix:
1515
# TODO: add macos-latest
1616
os: [ubuntu-latest]
17-
python-version: [3.8, 3.9, "3.10", "3.11"]
17+
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
1818
exclude:
1919
- os: macos-latest
2020
python-version: [3.5, 3.6]
@@ -33,7 +33,17 @@ jobs:
3333
# Obtain the latest cached version of npm (either local cache or action cache)
3434
node-version: node
3535

36-
- name: Install Python3 dependencies
36+
- name: Install Python3 dependencies for 3.12 and later
37+
if: ${{ matrix.python-version >= '3.12' }}
38+
run: |
39+
python -m pip install --upgrade pip pytest setuptools wheel
40+
pip install -r requirements.txt
41+
python -m pip install --upgrade --force-reinstall git+https://github.com/LLNL/hatchet.git@develop
42+
python setup.py install
43+
python setup.py build_ext --inplace
44+
python -m pip list
45+
46+
- name: Standard Install Python3 Dependencies
3747
run: |
3848
python -m pip install --upgrade pip pytest
3949
pip install -r requirements.txt
@@ -65,23 +75,6 @@ jobs:
6575
run: |
6676
pip install extrap
6777
68-
- name: Install coverage tools
69-
run: |
70-
pip install codecov
71-
pip install pytest-cov
72-
7378
- name: Basic Test with pytest
7479
run: |
75-
PYTHONPATH=. $(which pytest) --cov=./ --cov-report=xml
76-
77-
- name: Upload coverage to Codecov
78-
uses: codecov/codecov-action@v4
79-
env:
80-
CODECOV_TOKEN: ${{ secrets.THICKET_CODECOV_TOKEN }}
81-
with:
82-
directory: ./coverage/reports/
83-
env_vars: OS,PYTHON
84-
files: /home/runner/work/thicket/thicket/coverage.xml
85-
flags: unittests
86-
verbose: true
87-
fail_ci_if_error: true
80+
PYTHONPATH=. $(which pytest)

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
scipy
22
numpy
3-
pandas>=1.1
3+
pandas>=1.1,<3
44
llnl-hatchet
55
matplotlib
66
seaborn
77
beautifulsoup4
8+
more-itertools
9+
tqdm

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def readme():
4444
install_requires=[
4545
"scipy",
4646
"numpy",
47-
"pandas >= 1.1",
47+
"pandas >= 1.1,<3",
4848
"llnl-hatchet",
4949
"tqdm",
5050
"more-itertools",

thicket/stats/calc_boxplot_statistics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,6 @@ def calc_boxplot_statistics(thicket, columns=[], quartiles=[0.25, 0.5, 0.75], **
177177
thicket.statsframe.dataframe = thicket.statsframe.dataframe.join(df_box)
178178

179179
# sort columns in index
180-
thicket.statsframe.dataframe = thicket.statsframe.dataframe.sort_index(axis=1)
180+
# thicket.statsframe.dataframe = thicket.statsframe.dataframe.sort_index(axis=1)
181181

182182
return output_column_names

0 commit comments

Comments
 (0)