add get_name patch/spool method #619
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run minimum dependency tests without conda | |
name: TestCodeMinDeps | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'pyproject.toml' | |
- '**.py' | |
- '.github/workflows/run_min_dep_tests.yml' | |
env: | |
# used to manually trigger cache reset. Just increment if needed. | |
CACHE_NUMBER: 1 | |
# Cancel previous runs when this one starts. | |
concurrency: | |
group: TestCodeMinDeps-${{ github.event.pull_request.number || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
# Runs the tests on combinations of the supported python/os matrix. | |
test_code_min_deps: | |
timeout-minutes: 25 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ['3.12', '3.13'] | |
# only run if CI isn't turned off | |
if: github.event_name == 'push' || !contains(github.event.pull_request.labels.*.name, 'no_ci') | |
env: | |
# set conda environment file with dependencies | |
env_file: "environment.yml" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
depth: 0 | |
- name: "get tags" | |
run: | | |
git fetch --tags --force # Retrieve annotated tags. | |
- uses: mamba-org/setup-micromamba@v2 | |
with: | |
micromamba-version: '2.0.2-1' # versions: https://github.com/mamba-org/micromamba-releases | |
environment-file: environment.yml | |
init-shell: >- | |
bash | |
powershell | |
cache-environment: true | |
cache-environment-key: environment-${{ steps.date.outputs.date }} | |
post-cleanup: 'all' | |
create-args: >- | |
python=${{ matrix.python-version }} | |
# Not sure why this is needed but it appears to be the case. | |
# Also installs pytables so hdf5 gets installed on windows | |
- name: fix env | |
shell: bash -l {0} | |
run: | | |
micromamba shell init --shell bash --root-prefix=~/micromamba | |
eval "$(micromamba shell hook --shell bash)" | |
micromamba activate dascore | |
- name: install hdf5 | |
shell: bash -l {0} | |
run: | | |
micromamba install pytables | |
# Then switch over to uv. We can use this exclusively once we drop pytables. | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
- name: set data cache path | |
shell: bash -l {0} | |
run: | | |
export PATH="$pythonLocation:$PATH" | |
echo "DATA_CACHE_PATH=$(uv run --extra test python -c "import pooch; print(pooch.os_cache('dascore'))")" >> $GITHUB_ENV | |
- name: cache test data | |
uses: actions/cache@v3 | |
with: | |
enableCrossOsArchive: true | |
path: ${{ env.DATA_CACHE_PATH }} | |
key: DATA_${{ env.CACHE_NUMBER }} | |
- name: run test suite | |
shell: bash -l {0} | |
run: uv run --extra test --python ${{ matrix.python-version }} pytest -s --cov dascore --cov-append --cov-report=xml | |
# Runs examples in docstrings | |
- name: test docstrings | |
shell: bash -l {0} | |
run: uv run --extra test --python ${{ matrix.python-version }} pytest dascore --doctest-modules |