Skip to content

Commit

Permalink
run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
VeckoTheGecko committed Dec 13, 2024
1 parent cc912e3 commit 6651931
Show file tree
Hide file tree
Showing 29 changed files with 1,072 additions and 787 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- store_artifacts:
path: docs/_build/html/


workflows:
main:
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
artifact-path: 0/docs/_build/html/index.html
circleci-jobs: build_docs
circleci-jobs: build_docs
134 changes: 67 additions & 67 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,106 +8,106 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run: python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run: python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pyglider
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v2.1.1
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v2.1.1
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build
- build
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/pyglider

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ docs/pyglider
dist

*.png
.DS_Store
.DS_Store
3 changes: 1 addition & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ python:
# Install our python package before building the docs
- method: pip
path: .

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
Expand All @@ -39,4 +38,4 @@ python:
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
# - requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,4 @@ third-party archives.
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
![](docs/_static/PyGliderHorizontal.svg)

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

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

### Contact

Get in touch with us using Discussion above or by opening an issue.
Get in touch with us using Discussion above or by opening an issue.
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ coverage:
if_no_uploads: error
if_not_found: success
if_ci_failed: failure
paths: '!tests/.*'
paths: "!tests/.*"
tests:
target: auto
if_no_uploads: error
if_not_found: success
if_ci_failed: failure
paths: 'tests/.*'
paths: "tests/.*"
10 changes: 5 additions & 5 deletions docs/Install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## conda/pip

PyGlider depends on `dask` and `netcdf4`, both of which can be tricky to install using ``pip``,
hence we recommend these be installed with [``conda``](https://www.anaconda.com/). To install
PyGlider depends on `dask` and `netcdf4`, both of which can be tricky to install using `pip`,
hence we recommend these be installed with [`conda`](https://www.anaconda.com/). To install
PyGlider, create an environment, and do

```
Expand All @@ -15,13 +15,13 @@ conda install -c conda-forge pyglider
## Editable installation

If you want to be able to edit the files in `pyglider/pyglider` then install
the dependencies as above. Fork of PyGlider on github, and then clone it locally:
the dependencies as above. Fork of PyGlider on github, and then clone it locally:

```
git clone https://github.com/yourname/pyglider.git
```

Navigate to the new ``pyglider`` directory and then do `pip install -e .`.
Navigate to the new `pyglider` directory and then do `pip install -e .`.
That will re-install pyglider with links to the local directory, so you
can edit the library files. If you do so, consider making a pull-request
can edit the library files. If you do so, consider making a pull-request
with your changes!
39 changes: 20 additions & 19 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"numpydoc",
"myst_parser",
'numpydoc',
'myst_parser',
'sphinx.ext.autodoc',
'sphinx.ext.inheritance_diagram',
'autoapi.sphinx',
Expand All @@ -42,9 +42,9 @@
extensions.append('sphinx.ext.intersphinx')

intersphinx_mapping = {
'xarray': ('http://xarray.pydata.org/en/stable/', None),
'python': ('https://docs.python.org/3/', None),
}
'xarray': ('http://xarray.pydata.org/en/stable/', None),
'python': ('https://docs.python.org/3/', None),
}

autoapi_modules = {'pyglider': None}

Expand All @@ -62,40 +62,41 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "pydata_sphinx_theme"
html_theme = 'pydata_sphinx_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_logo = "_static/PyGliderHorizontal.svg"
html_logo = '_static/PyGliderHorizontal.svg'

html_context = {
# "github_url": "https://github.com", # or your GitHub Enterprise interprise
"github_user": "c-proof",
"github_repo": "pyglider",
"doc_path": "docs/",
'github_user': 'c-proof',
'github_repo': 'pyglider',
'doc_path': 'docs/',
}
html_theme_options = {
"icon_links": [
'icon_links': [
{
# Label for this link
"name": "GitHub",
'name': 'GitHub',
# URL where the link will redirect
"url": "https://github.com/c-proof/pyglider", # required
'url': 'https://github.com/c-proof/pyglider', # required
# Icon class (if "type": "fontawesome"), or path to local image (if "type": "local")
"icon": "fab fa-github-square",
'icon': 'fab fa-github-square',
# The type of image to be used (see below for details)
"type": "fontawesome",
'type': 'fontawesome',
},
{
"name": "PyPI",
"url": "https://pypi.org/project/pyglider",
"icon": "fas fa-box",
'name': 'PyPI',
'url': 'https://pypi.org/project/pyglider',
'icon': 'fas fa-box',
},
# { "name": "conda-forge",
# "url": "https://anaconda.org/conda-forge/pyglider",
# "icon": "fas fa-box"
# }
]}
]
}
Loading

0 comments on commit 6651931

Please sign in to comment.