Skip to content

Commit e18e664

Browse files
authored
Pkg metrics (#64)
* make it a package * trim logs
1 parent aed4845 commit e18e664

File tree

7 files changed

+1082
-1065
lines changed

7 files changed

+1082
-1065
lines changed

.github/workflows/pypi.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
release:
9+
types:
10+
- published
11+
12+
defaults:
13+
run:
14+
shell: bash
15+
16+
jobs:
17+
packages:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: "3.x"
26+
27+
- name: Get tags
28+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
29+
30+
- name: Install build tools
31+
run: |
32+
python -m pip install --upgrade build twine
33+
34+
- name: Build sdist and binary wheel
35+
run: python -m build --sdist --wheel . --outdir dist
36+
37+
- name: CheckFiles
38+
run: >
39+
ls dist
40+
&& python -m pip install --upgrade check-manifest
41+
&& check-manifest --verbose
42+
43+
- name: Test wheels
44+
run: >
45+
cd dist
46+
&& python -m pip install *.whl
47+
&& python -m twine check *
48+
49+
- name: Publish a Python distribution to PyPI
50+
if: success() && github.event_name == 'release'
51+
uses: pypa/gh-action-pypi-publish@release/v1
52+
with:
53+
user: __token__
54+
password: ${{ secrets.PYPI_PASSWORD }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ website/deploy/gts_regional.html
55
website/deploy/gts_atn.html
66
/website/deploy/asset_inventory.html
77
.ipynb_checkpoints/
8+
ioos_metrics/_version.py
9+
*.log

MANIFEST.in

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
include LICENSE
2+
include README.md
3+
include pyproject.toml
4+
5+
graft ioos_metrics
6+
7+
prune .github
8+
prune *.egg-info
9+
prune gts
10+
prune website
11+
prune tests
12+
13+
exclude *.ipynb
14+
exclude btn_metrics.py
15+
exclude gts_atn_metrics.py
16+
exclude gts_regional_metrics.py
17+
exclude read_bufr.py
18+
exclude ioos_btn_metrics.csv
19+
20+
exclude ruff.toml
21+
exclude .gitignore
22+
exclude .pre-commit-config.yaml
23+
exclude *.yml
24+
exclude ioos_metrics/_version.py

0 commit comments

Comments
 (0)