Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: CI

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:

jobs:
lint:
name: Lint and Format Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Install UV
uses: astral-sh/setup-uv@v3

- name: Install dependencies
run: |
uv pip install --system ruff

- name: Run ruff format check
run: ruff format --check .

- name: Run ruff linting
run: ruff check .

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Install UV
uses: astral-sh/setup-uv@v3

- name: Install dependencies
run: |
uv pip install --system -e ".[dev]"

- name: Run tests
run: |
pytest

test-package-install:
name: Test Package Installation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Install UV
uses: astral-sh/setup-uv@v3

- name: Install package
run: |
uv pip install --system -e .

- name: Test CLI availability
run: |
which gen-stac || echo "CLI not found in PATH, checking if it's installed..."
python -c "from overture_stac import OvertureRelease, RegistryManifest; print('Package imports successfully')"

- name: Test imports
run: |
python -c "from overture_stac.overture_stac import OvertureRelease; print('OvertureRelease imported')"
python -c "from overture_stac.registry_manifest import RegistryManifest; print('RegistryManifest imported')"

all-checks-pass:
name: All Checks Pass
needs: [lint, test, test-package-install]
runs-on: ubuntu-latest
if: always()
steps:
- name: Check if all jobs passed
run: |
if [ "${{ needs.lint.result }}" != "success" ] || \
[ "${{ needs.test.result }}" != "success" ] || \
[ "${{ needs.test-package-install.result }}" != "success" ]; then
echo "One or more checks failed"
exit 1
fi
echo "All checks passed!"
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Build STAC for Overture Release
name: Publish STAC

on:

# Run daily at 6 AM UTC
schedule:
- cron: "0 6 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -11,9 +13,14 @@ permissions:
pages: write
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
build-and-deploy:
name: Build and Deploy STAC Catalog
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand All @@ -23,25 +30,28 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install UV
uses: astral-sh/setup-uv@v3

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
uv pip install --system -e .

- name: Run STAC Builder
run: python3 gen-all-release-stac.py
- name: Build STAC Catalog
run: |
gen-stac --output public_releases

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'public_releases'
path: "public_releases"

- name: Deploy to GitHub Pages
id: deployment
Expand Down
79 changes: 79 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Virtual environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# PyCharm
.idea/

# VS Code
.vscode/
*.code-workspace

# Testing
.pytest_cache/
.coverage
htmlcov/
.tox/
.nox/
coverage.xml
*.cover
*.log

# MyPy
.mypy_cache/
.dmypy.json
dmypy.json

# Ruff
.ruff_cache/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# UV
.uv/

# Distribution / Packaging
*.whl

# Output directories
public_releases/
output/

# Misc
.DS_Store
*.swp
*.swo
*~
Loading