Skip to content

Commit

Permalink
Merge branch 'main' into update-docker-file
Browse files Browse the repository at this point in the history
  • Loading branch information
hollandjg authored Mar 4, 2024
2 parents 7fcc6a6 + 02d66c5 commit 4879f45
Show file tree
Hide file tree
Showing 141 changed files with 5,310 additions and 55,803 deletions.
Binary file removed ._.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tar.gz filter=lfs diff=lfs merge=lfs -text
36 changes: 36 additions & 0 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Icesat2 to PyPI

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: |
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: dist
repository-url: https://test.pypi.org/legacy/
40 changes: 40 additions & 0 deletions .github/workflows/test_icesat2_tracks_pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Smoke Tests
on:
pull_request: {}
push:
branches: [ main ]
jobs:
python_run_scripts:
strategy:
fail-fast: false
matrix:
version: ['3.11']
runs-on: ubuntu-22.04
steps:
- name: install mpi
run: sudo apt update && sudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }} # install the python version needed
cache: "pip"
- name: install icesat2-tracks using pip
run: pip install .
- name: List dependencies
run: pip list
- name: first step B01_SL_load_single_file
run: icesat2waves load-file --track-name 20190502052058_05180312_005_01 --batch-key SH_testSLsinglefile2 --output-dir ./work
- name: second step make_spectra
run: icesat2waves make-spectra --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./work
- name: third step plot_spectra
run: icesat2waves plot-spectra --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./work
- name: fouth step IOWAGA threads
run: icesat2waves make-iowaga-threads-prior --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./work
- name: fifth step B04_angle
run: icesat2waves make-b04-angle --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./work
- name: sixth step B04_define_angle
run: icesat2waves define-angle --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./work
- name: seventh step B06_correct_separate
run: icesat2waves correct-separate --track-name SH_20190502_05180312 --batch-key SH_testSLsinglefile2 --output-dir ./work

Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@ jobs:
- name: install mpi
run: sudo apt update && sudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev
- uses: actions/checkout@v3
with:
lfs: true
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }} # install the python version needed
cache: "pip"
- name: install icesat2-tracks using pip
run: pip install .
- name: List dependencies
run: pip list
- name: test icesat2waves app
run: icesat2waves --help
- name: test command for step 1
run: load_single_file --help
- name: first step B01_SL_load_single_file
run: python src/icesat2_tracks/analysis_db/B01_SL_load_single_file.py --track-name 20190502052058_05180312_005_01 --batch-key SH_testSLsinglefile2 --output-dir ./work
- name: install pytest
run: pip install pytest pytest-xdist pytest-sugar pytest-durations
- name: Run tests
run: pytest --capture=sys --verbose --showlocals --tb=long --numprocesses=auto tests/test_steps.py

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ analysis_db/support_files/
*.egg-info/
.installed.cfg
*.egg

logs/
*__pycache__/
*__pycache__/*

# Environments
.env
.venv
.venv39/
env/
venv/
ENV/
Expand All @@ -57,4 +58,4 @@ dist/

#visual code
.vscode/
*.h5
*.h5
Loading

0 comments on commit 4879f45

Please sign in to comment.