Skip to content

Commit 60ea41b

Browse files
authored
Merge pull request #210 from VeckoTheGecko/changes2
Ruff config, pytest config, pre-commit config
2 parents 83fb120 + ac3f2c5 commit 60ea41b

33 files changed

+1151
-804
lines changed

.circleci/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
- store_artifacts:
2626
path: docs/_build/html/
2727

28-
2928
workflows:
3029
main:
3130
jobs:

.flake8

Lines changed: 0 additions & 17 deletions
This file was deleted.

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6651931839dd826ea9a171688ec2595976a84871

.github/workflows/doc-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ jobs:
99
with:
1010
repo-token: ${{ secrets.GITHUB_TOKEN }}
1111
artifact-path: 0/docs/_build/html/index.html
12-
circleci-jobs: build_docs
12+
circleci-jobs: build_docs

.github/workflows/publish-to-pypi.yml

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -8,106 +8,106 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v4
12-
- name: Set up Python
13-
uses: actions/setup-python@v5
14-
with:
15-
python-version: "3.x"
16-
- name: Install pypa/build
17-
run: python3 -m pip install build --user
18-
- name: Build a binary wheel and a source tarball
19-
run: python3 -m build
20-
- name: Store the distribution packages
21-
uses: actions/upload-artifact@v4
22-
with:
23-
name: python-package-distributions
24-
path: dist/
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.x"
16+
- name: Install pypa/build
17+
run: python3 -m pip install build --user
18+
- name: Build a binary wheel and a source tarball
19+
run: python3 -m build
20+
- name: Store the distribution packages
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: python-package-distributions
24+
path: dist/
2525

2626
publish-to-pypi:
2727
name: >-
2828
Publish Python 🐍 distribution 📦 to PyPI
29-
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
29+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
3030
needs:
31-
- build
31+
- build
3232
runs-on: ubuntu-latest
3333
environment:
3434
name: pypi
3535
url: https://pypi.org/p/pyglider
3636
permissions:
37-
id-token: write # IMPORTANT: mandatory for trusted publishing
37+
id-token: write # IMPORTANT: mandatory for trusted publishing
3838

3939
steps:
40-
- name: Download all the dists
41-
uses: actions/download-artifact@v4
42-
with:
43-
name: python-package-distributions
44-
path: dist/
45-
- name: Publish distribution 📦 to PyPI
46-
uses: pypa/gh-action-pypi-publish@release/v1
40+
- name: Download all the dists
41+
uses: actions/download-artifact@v4
42+
with:
43+
name: python-package-distributions
44+
path: dist/
45+
- name: Publish distribution 📦 to PyPI
46+
uses: pypa/gh-action-pypi-publish@release/v1
4747

4848
github-release:
4949
name: >-
5050
Sign the Python 🐍 distribution 📦 with Sigstore
5151
and upload them to GitHub Release
5252
needs:
53-
- publish-to-pypi
53+
- publish-to-pypi
5454
runs-on: ubuntu-latest
5555

5656
permissions:
57-
contents: write # IMPORTANT: mandatory for making GitHub Releases
58-
id-token: write # IMPORTANT: mandatory for sigstore
57+
contents: write # IMPORTANT: mandatory for making GitHub Releases
58+
id-token: write # IMPORTANT: mandatory for sigstore
5959

6060
steps:
61-
- name: Download all the dists
62-
uses: actions/download-artifact@v4
63-
with:
64-
name: python-package-distributions
65-
path: dist/
66-
- name: Sign the dists with Sigstore
67-
uses: sigstore/[email protected]
68-
with:
69-
inputs: >-
70-
./dist/*.tar.gz
71-
./dist/*.whl
72-
- name: Create GitHub Release
73-
env:
74-
GITHUB_TOKEN: ${{ github.token }}
75-
run: >-
76-
gh release create
77-
'${{ github.ref_name }}'
78-
--repo '${{ github.repository }}'
79-
--notes ""
80-
- name: Upload artifact signatures to GitHub Release
81-
env:
82-
GITHUB_TOKEN: ${{ github.token }}
83-
# Upload to GitHub Release using the `gh` CLI.
84-
# `dist/` contains the built packages, and the
85-
# sigstore-produced signatures and certificates.
86-
run: >-
87-
gh release upload
88-
'${{ github.ref_name }}' dist/**
89-
--repo '${{ github.repository }}'
61+
- name: Download all the dists
62+
uses: actions/download-artifact@v4
63+
with:
64+
name: python-package-distributions
65+
path: dist/
66+
- name: Sign the dists with Sigstore
67+
uses: sigstore/[email protected]
68+
with:
69+
inputs: >-
70+
./dist/*.tar.gz
71+
./dist/*.whl
72+
- name: Create GitHub Release
73+
env:
74+
GITHUB_TOKEN: ${{ github.token }}
75+
run: >-
76+
gh release create
77+
'${{ github.ref_name }}'
78+
--repo '${{ github.repository }}'
79+
--notes ""
80+
- name: Upload artifact signatures to GitHub Release
81+
env:
82+
GITHUB_TOKEN: ${{ github.token }}
83+
# Upload to GitHub Release using the `gh` CLI.
84+
# `dist/` contains the built packages, and the
85+
# sigstore-produced signatures and certificates.
86+
run: >-
87+
gh release upload
88+
'${{ github.ref_name }}' dist/**
89+
--repo '${{ github.repository }}'
9090
9191
publish-to-testpypi:
9292
name: Publish Python 🐍 distribution 📦 to TestPyPI
9393
needs:
94-
- build
94+
- build
9595
runs-on: ubuntu-latest
9696

9797
environment:
9898
name: testpypi
9999
url: https://test.pypi.org/p/pyglider
100100

101101
permissions:
102-
id-token: write # IMPORTANT: mandatory for trusted publishing
102+
id-token: write # IMPORTANT: mandatory for trusted publishing
103103

104104
steps:
105-
- name: Download all the dists
106-
uses: actions/download-artifact@v4
107-
with:
108-
name: python-package-distributions
109-
path: dist/
110-
- name: Publish distribution 📦 to TestPyPI
111-
uses: pypa/gh-action-pypi-publish@release/v1
112-
with:
113-
repository-url: https://test.pypi.org/legacy/
105+
- name: Download all the dists
106+
uses: actions/download-artifact@v4
107+
with:
108+
name: python-package-distributions
109+
path: dist/
110+
- name: Publish distribution 📦 to TestPyPI
111+
uses: pypa/gh-action-pypi-publish@release/v1
112+
with:
113+
repository-url: https://test.pypi.org/legacy/

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ docs/pyglider
55
dist
66

77
*.png
8-
.DS_Store
8+
.DS_Store

.pre-commit-config.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
exclude: "^tests/example-data/.*"
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v5.0.0
5+
hooks:
6+
- id: trailing-whitespace
7+
- id: end-of-file-fixer
8+
- id: check-yaml
9+
- id: check-ast
10+
- id: check-json
11+
- repo: https://github.com/astral-sh/ruff-pre-commit
12+
rev: v0.8.2
13+
hooks:
14+
- id: ruff
15+
name: ruff lint
16+
args: [--fix, --show-fixes]
17+
- id: ruff-format
18+
- repo: https://github.com/rbubley/mirrors-prettier # Update mirror as official mirror is deprecated
19+
rev: v3.4.2
20+
hooks:
21+
- id: prettier
22+
- repo: https://github.com/ComPWA/taplo-pre-commit
23+
rev: v0.9.3
24+
hooks:
25+
- id: taplo-format
26+
args: ["--option", "array_auto_collapse=false"]
27+
- repo: https://github.com/abravalheri/validate-pyproject
28+
rev: v0.23
29+
hooks:
30+
- id: validate-pyproject
31+
additional_dependencies: ["validate-pyproject-schema-store[all]"]

.readthedocs.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ python:
2828
# Install our python package before building the docs
2929
- method: pip
3030
path: .
31-
3231
# Optionally build your docs in additional formats such as PDF and ePub
3332
# formats:
3433
# - pdf
@@ -39,4 +38,4 @@ python:
3938
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
4039
# python:
4140
# install:
42-
# - requirements: docs/requirements.txt
41+
# - requirements: docs/requirements.txt

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,4 @@ third-party archives.
188188
distributed under the License is distributed on an "AS IS" BASIS,
189189
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190190
See the License for the specific language governing permissions and
191-
limitations under the License.
191+
limitations under the License.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
![](docs/_static/PyGliderHorizontal.svg)
22

3-
Python tools for interacting with ocean glider data. PyGlider takes data from
3+
Python tools for interacting with ocean glider data. PyGlider takes data from
44
Teledyne/Webb Slocum gliders and Alseamar SeaExplorers and creates CF-compliant
55
NetCDF files.
66

77
For documentation, please see <http://pyglider.readthedocs.io>
88

99
### Contact
1010

11-
Get in touch with us using Discussion above or by opening an issue.
11+
Get in touch with us using Discussion above or by opening an issue.

0 commit comments

Comments
 (0)