From cc66efecf74cbb927e23204b9f8d31f12a2dbd04 Mon Sep 17 00:00:00 2001 From: Harrison Cook Date: Fri, 11 Oct 2024 10:22:36 +0000 Subject: [PATCH 1/3] Update publish --- .github/workflows/python-publish.yml | 91 ++++++++++++++++++++++------ 1 file changed, 74 insertions(+), 17 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 1991304..1404fd2 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,23 +1,80 @@ ---- - # This workflow will upload a Python Package using Twine when a release is created - # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - name: Upload Python Package +name: Upload Python Package - on: - release: - types: [created] +on: - jobs: - quality: - uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-precommit-run.yml@v2 + push: {} + + release: + types: [created] + +jobs: + quality: + name: Code QA + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - uses: pre-commit/action@v3.0.1 + env: + SKIP: no-commit-to-branch + + checks: + if: ${{ github.event_name == 'release' }} + + strategy: + fail-fast: false + matrix: + platform: ["ubuntu-latest", "macos-latest"] + python-version: ["3.10"] + + name: Python ${{ matrix.python-version }} on ${{ matrix.platform }} + runs-on: ${{ matrix.platform }} + needs: quality + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 with: - skip-hooks: "no-commit-to-branch" + python-version: ${{ matrix.python-version }} + + - name: Install + run: | + pip install pytest + pip install -e . + pip freeze + + - name: Tests + run: pytest + + deploy: - checks: - uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-pytest-pyproject.yml@v2 + if: ${{ github.event_name == 'release' }} + runs-on: ubuntu-latest + needs: checks + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' - deploy: - needs: [checks, quality] - uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2 - secrets: inherit + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build wheel twine + - name: Build and publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: | + python -m pip install --upgrade build + python -m build + twine upload dist/* From bb13f6a529a1f35daec2d68587ea606aeda9a613 Mon Sep 17 00:00:00 2001 From: Harrison Cook Date: Fri, 11 Oct 2024 13:24:53 +0000 Subject: [PATCH 2/3] Add section2 to default template --- src/ai_models_multio/templates/default.tmpl | Bin 179 -> 196 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/ai_models_multio/templates/default.tmpl b/src/ai_models_multio/templates/default.tmpl index e2f890a57d52dea5ea01d64c3285a1babd51bab1..a7076620f2e4cb689a59eaf78d3740498d0d2d5f 100644 GIT binary patch delta 42 scmdnYc!W{FJ;>AP|9=K11_(GZQ9y!Ekcoj22$@(I4GatnC#v=V0MTd&S^xk5 delta 27 ecmX@YxS3JFJ;>AP|9=K11_; Date: Fri, 11 Oct 2024 14:36:58 +0000 Subject: [PATCH 3/3] Update README --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f6dd649..e9932b3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ # ai-models-multio +[![Upload Python Package](https://github.com/ecmwf-lab/ai-models-multio/actions/workflows/python-publish.yml/badge.svg)](https://github.com/ecmwf-lab/ai-models-multio/actions/workflows/python-publish.yml) -Output plugin for multio +**DISCLAIMER** +This project is **BETA** and will be **Experimental** for the foreseeable future. +Interfaces and functionality are likely to change, and the project itself may be scrapped. +**DO NOT** use this software in any project/software that is operational. + + +## Output plugin for multio Allows for an alternative encoding method to grib, and direct writing to FDB.