-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
084f21f
commit de58374
Showing
9 changed files
with
139 additions
and
218 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "Build DASCore Docs" | ||
description: "Builds DASCore's Documentation." | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
with: | ||
version: 1.3.450 | ||
tinytex: true | ||
|
||
- name: print quarto version | ||
run: | | ||
quarto --version | ||
- name: render API docs | ||
shell: bash -l {0} | ||
run: | | ||
python scripts/build_api_docs.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: "Mamba Install" | ||
description: "Sets up mamba before installing DASCore's environment.yml file." | ||
inputs: | ||
python-version: | ||
description: "The python string of the version to install" | ||
required: true | ||
|
||
environment-file: | ||
description: "The path to the environment file to use." | ||
required: false | ||
default: "environment.yml" | ||
|
||
install-group-str: | ||
description: "The string to use for specifying install groups" | ||
default: "[dev]" | ||
required: false | ||
|
||
install-package: | ||
description: "If true, install dascore" | ||
default: true | ||
required: false | ||
type: boolean | ||
|
||
cache-number: | ||
description: "Cache number. Use != 1 to reset data cache" | ||
required: false | ||
default: 1 | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up environment variable with date | ||
shell: bash -l {0} | ||
run: echo "CURRENT_DATE=$(date '+%Y-%m-%d')" >> $GITHUB_ENV | ||
|
||
- uses: mamba-org/setup-micromamba@v2 | ||
with: | ||
micromamba-version: '2.0.5-0' # versions: https://github.com/mamba-org/micromamba-releases | ||
environment-file: ${{ inputs.environment-file }} | ||
init-shell: >- | ||
bash | ||
powershell | ||
cache-environment: true | ||
cache-environment-key: environment-${{ env.CURRENT_DATE }}-${{ inputs.environment-file }} | ||
post-cleanup: 'all' | ||
create-args: >- | ||
python=${{ inputs.python-version }} | ||
# Not sure why this is needed but it appears to be the case | ||
- 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: print python version | ||
shell: bash -el {0} | ||
run: | | ||
python --version | ||
- name: get tags for correct versioning | ||
shell: bash -el {0} | ||
run: | | ||
git fetch --tags --force | ||
- name: install dascore | ||
if: "${{ inputs.install-package == 'true' }}" | ||
shell: bash -l {0} | ||
run: | | ||
pip install -e .${{ inputs.install-group-str }} | ||
- name: set data cache path | ||
shell: bash -el {0} | ||
run: | | ||
echo "DATA_CACHE_PATH=$(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_${{ inputs.cache-number }} | ||
|
||
# Print out the package info for current environment | ||
- name: print package info | ||
shell: bash -el {0} | ||
run: | | ||
micromamba info | ||
micromamba list |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: dascore | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- pytables | ||
- h5py | ||
- pooch |
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
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
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
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
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
Oops, something went wrong.