Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
blaylockbk committed Jan 17, 2024
2 parents 85e97ba + afa8676 commit 378b3e1
Show file tree
Hide file tree
Showing 31 changed files with 2,603 additions and 385 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish to PyPI

on:
push:
tags:
- "20*"

jobs:
pypi-release:
name: Publish release on PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write

steps:
- name: Checkout source
uses: actions/checkout@v4

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

- name: Build source and wheel distributions
run: |
python -m pip install --upgrade build twine
python -m build
twine check --strict dist/*
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# Remember to manually create release on GitHub using the same tag.
65 changes: 65 additions & 0 deletions .github/workflows/tests-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Tests (Python)

on:
push:
branches: [main]
pull_request:
branches: [main]

# Allow job to be triggered manually.
workflow_dispatch:

# Cancel in-progress jobs when pushing to the same branch.
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
# In order to save resources, only run particular
# matrix slots on other OS than Linux.
include:
- os: "macos-latest"
python-version: "3.11"
- os: "windows-latest"
python-version: "3.11"

env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}

defaults:
run:
shell: bash -el {0}

name: Python ${{ matrix.python-version }} on OS ${{ matrix.os }}
steps:
- name: Acquire sources
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: "pip"
cache-dependency-path: "setup.cfg"

- name: Install project
run: |
pip3 install --requirement=requirements-test.txt
pip3 install --editable=.
- name: Run tests
env:
TMPDIR: ${{ runner.temp }}
run: |
pytest
5 changes: 3 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"recommendations": [
"ms-python.python",
"bungcip.better-toml",
"ginfuru.better-nunjucks"
"ginfuru.better-nunjucks",
"charliermarsh.ruff"
]
}
}
34 changes: 20 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
{
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
},
"cSpell.words": [
"Herbie",
"meteogram",
"synopticpy",
"Timeseries"
],
"path-autocomplete.pathMappings": {
"{{assets}}/": "${folder}/11ty-site/dev/app/assets",
"{{root}}/": "${folder}/11ty-site/dev/app"
},
"python.testing.pytestArgs": [
"tests"
],
"workbench.colorCustomizations": {
// Colors Based on MesoWest colors
// https://mesowest.utah.edu/
Expand All @@ -11,22 +27,12 @@
// "activityBar.background": "#990000",
// "activityBarBadge.background": "#FADE2A",
// "activityBarBadge.foreground":"#2180AF",
"titleBar.activeBackground": "#1D4795",
"titleBar.activeBackground": "#1D4795"
// "titleBar.activeForeground": "#ffffff",
// "statusBar.background": "#43A047",
// "statusBarItem.remoteBackground": "#465A9B",
// "button.background": "#2180AF",
},
"python.formatting.provider": "black",
"esbonio.server.enabled": true,
"cSpell.words": [
"Herbie",
"meteogram",
"synopticpy",
"Timeseries"
],
"path-autocomplete.pathMappings": {
"{{root}}/": "${folder}/11ty-site/dev/app",
"{{assets}}/": "${folder}/11ty-site/dev/app/assets",
}
}
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
Loading

0 comments on commit 378b3e1

Please sign in to comment.