Skip to content

Commit 28911c7

Browse files
authored
Merge pull request #4 from ecmwf-lab/develop
Merge to main
2 parents 27889cd + e6e931e commit 28911c7

File tree

3 files changed

+82
-18
lines changed

3 files changed

+82
-18
lines changed

.github/workflows/python-publish.yml

+74-17
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,80 @@
1-
---
2-
# This workflow will upload a Python Package using Twine when a release is created
3-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
43

5-
name: Upload Python Package
4+
name: Upload Python Package
65

7-
on:
8-
release:
9-
types: [created]
6+
on:
107

11-
jobs:
12-
quality:
13-
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-precommit-run.yml@v2
8+
push: {}
9+
10+
release:
11+
types: [created]
12+
13+
jobs:
14+
quality:
15+
name: Code QA
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: 3.x
22+
- uses: pre-commit/[email protected]
23+
env:
24+
SKIP: no-commit-to-branch
25+
26+
checks:
27+
if: ${{ github.event_name == 'release' }}
28+
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
platform: ["ubuntu-latest", "macos-latest"]
33+
python-version: ["3.10"]
34+
35+
name: Python ${{ matrix.python-version }} on ${{ matrix.platform }}
36+
runs-on: ${{ matrix.platform }}
37+
needs: quality
38+
39+
steps:
40+
- uses: actions/checkout@v2
41+
42+
- uses: actions/setup-python@v2
1443
with:
15-
skip-hooks: "no-commit-to-branch"
44+
python-version: ${{ matrix.python-version }}
45+
46+
- name: Install
47+
run: |
48+
pip install pytest
49+
pip install -e .
50+
pip freeze
51+
52+
- name: Tests
53+
run: pytest
54+
55+
deploy:
1656

17-
checks:
18-
uses: ecmwf-actions/reusable-workflows/.github/workflows/qa-pytest-pyproject.yml@v2
57+
if: ${{ github.event_name == 'release' }}
58+
runs-on: ubuntu-latest
59+
needs: checks
60+
61+
steps:
62+
- uses: actions/checkout@v2
63+
64+
- name: Set up Python
65+
uses: actions/setup-python@v2
66+
with:
67+
python-version: '3.x'
1968

20-
deploy:
21-
needs: [checks, quality]
22-
uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2
23-
secrets: inherit
69+
- name: Install dependencies
70+
run: |
71+
python -m pip install --upgrade pip
72+
pip install build wheel twine
73+
- name: Build and publish
74+
env:
75+
TWINE_USERNAME: __token__
76+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
77+
run: |
78+
python -m pip install --upgrade build
79+
python -m build
80+
twine upload dist/*

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# ai-models-multio
2+
[![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)
23

3-
Output plugin for multio
4+
**DISCLAIMER**
5+
This project is **BETA** and will be **Experimental** for the foreseeable future.
6+
Interfaces and functionality are likely to change, and the project itself may be scrapped.
7+
**DO NOT** use this software in any project/software that is operational.
8+
9+
10+
## Output plugin for multio
411

512
Allows for an alternative encoding method to grib, and direct writing to FDB.
613

17 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)