diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml new file mode 100644 index 00000000..175814d9 --- /dev/null +++ b/.github/workflows/coverage.yaml @@ -0,0 +1,70 @@ +name: unit tests to collect code coverage + +on: + push: + branches: [ develop ] + secrets: + THICKET_CODECOV_TOKEN: + required: true + +jobs: + build: + + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"] + exclude: + - os: macos-latest + python-version: [3.5, 3.6] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Python Dependencies for 3.12 and later + if: ${{ matrix.python-version >= '3.12' }} + run: | + python -m pip install --upgrade pip pytest setuptools wheel + pip install -r requirements.txt + # Optional Dependency for HDF Checkpointing + pip install tables + python setup.py install + python setup.py build_ext --inplace + python -m pip list + + - name: Standard Install Python3 Dependencies + run: | + python -m pip install --upgrade pip pytest + pip install -r requirements.txt + # Optional Dependency for HDF Checkpointing + pip install tables + python setup.py install + python setup.py build_ext --inplace + python -m pip list + + - name: Install coverage tools + run: | + pip install codecov + pip install pytest-cov + + - name: Basic Test with pytest + run: | + PYTHONPATH=. $(which pytest) --cov=./ --cov-report=xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.THICKET_CODECOV_TOKEN }} + with: + directory: ./coverage/reports + env_vars: OS,PYTHON + files: /home/runner/work/hatchet/hatchet/coverage.xml + flags: unittests + verbose: true + fail_ci_if_error: true diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 52ea0144..39dbfbfc 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -14,7 +14,7 @@ jobs: matrix: # TODO: add macos-latest os: [ubuntu-latest] - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"] exclude: - os: macos-latest python-version: [3.5, 3.6] @@ -33,7 +33,17 @@ jobs: # Obtain the latest cached version of npm (either local cache or action cache) node-version: node - - name: Install Python3 dependencies + - name: Install Python3 dependencies for 3.12 and later + if: ${{ matrix.python-version >= '3.12' }} + run: | + python -m pip install --upgrade pip pytest setuptools wheel + pip install -r requirements.txt + python -m pip install --upgrade --force-reinstall git+https://github.com/LLNL/hatchet.git@develop + python setup.py install + python setup.py build_ext --inplace + python -m pip list + + - name: Standard Install Python3 Dependencies run: | python -m pip install --upgrade pip pytest pip install -r requirements.txt @@ -65,23 +75,6 @@ jobs: run: | pip install extrap - - name: Install coverage tools - run: | - pip install codecov - pip install pytest-cov - - name: Basic Test with pytest run: | - PYTHONPATH=. $(which pytest) --cov=./ --cov-report=xml - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - env: - CODECOV_TOKEN: ${{ secrets.THICKET_CODECOV_TOKEN }} - with: - directory: ./coverage/reports/ - env_vars: OS,PYTHON - files: /home/runner/work/thicket/thicket/coverage.xml - flags: unittests - verbose: true - fail_ci_if_error: true + PYTHONPATH=. $(which pytest) diff --git a/requirements.txt b/requirements.txt index d4ed1077..3215a087 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,9 @@ scipy numpy -pandas>=1.1 +pandas>=1.1,<3 llnl-hatchet matplotlib seaborn beautifulsoup4 +more-itertools +tqdm diff --git a/setup.py b/setup.py index 13dde0e2..095c0f90 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ def readme(): install_requires=[ "scipy", "numpy", - "pandas >= 1.1", + "pandas >= 1.1,<3", "llnl-hatchet", "tqdm", "more-itertools", diff --git a/thicket/stats/calc_boxplot_statistics.py b/thicket/stats/calc_boxplot_statistics.py index fb5d9e5a..f2e02059 100644 --- a/thicket/stats/calc_boxplot_statistics.py +++ b/thicket/stats/calc_boxplot_statistics.py @@ -177,6 +177,6 @@ def calc_boxplot_statistics(thicket, columns=[], quartiles=[0.25, 0.5, 0.75], ** thicket.statsframe.dataframe = thicket.statsframe.dataframe.join(df_box) # sort columns in index - thicket.statsframe.dataframe = thicket.statsframe.dataframe.sort_index(axis=1) + # thicket.statsframe.dataframe = thicket.statsframe.dataframe.sort_index(axis=1) return output_column_names