Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .flake8

This file was deleted.

4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ updates:
timezone: "Europe/London"
labels:
- "🤖 Bot"
groups:
actions:
patterns:
- "*"
2 changes: 1 addition & 1 deletion .github/workflows/ci-citation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: "validate"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
key: tox-${{ hashFiles('requirements/dev.yml') }}-${{ hashFiles('tox.ini') }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ concurrency:
jobs:
manifest:
name: "check-manifest"
uses: scitools/workflows/.github/workflows/ci-manifest.yml@2024.09.1
uses: scitools/workflows/.github/workflows/ci-manifest.yml@2025.07.3
16 changes: 16 additions & 0 deletions .github/workflows/ci-template-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Checks if a PR makes any changes that ought to be shared via templating.
# See the called workflow in the scitools/workflows repo for more details.

name: ci-template-check

on:
pull_request_target:
branches:
- main

jobs:
prompt-share:
uses: scitools/workflows/.github/workflows/[email protected]
secrets: inherit
with:
pr_number: ${{ github.event.pull_request.number }}
23 changes: 18 additions & 5 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,31 @@ concurrency:
cancel-in-progress: true

jobs:
build:
tests:
name: "${{ matrix.session }} (${{ matrix.version }})"

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
version: ["py310", "py311"]
session: [ "test" ]
include:
- version: "py311"
coverage: "--cov-report= --cov=tephi"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
key: tox-${{ hashFiles('requirements/dev.yml') }}-${{ hashFiles('tox.ini') }}
path: |
.tox

- name: Run tox
run: pipx run 'tox<4'
run: |
pip install 'tox<4'
tox -e ${{ matrix.version }}-${{ matrix.session }}
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ coverage.xml
# Sphinx documentation
docs/_build/
# ignore autogen apidoc files
docs/tephi/source/api
docs/source/api
# misc
*.lock

Expand Down
108 changes: 97 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,114 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# See https://pre-commit.ci/#configuration
# See https://github.com/scientific-python/cookie#sp-repo-review

ci:
autofix_prs: false
autoupdate_commit_msg: "chore: update pre-commit hooks"


# Alphabetised, for lack of a better order.
files: |
(?x)(
docs\/.+\.py|
docs\/.+\.rst|
pyproject\.toml|
setup\.py|
src\/.+\.py
)
minimum_pre_commit_version: 1.21.0

repos:

# Hook for pre-commit's built-in checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.4.0'
rev: v5.0.0
hooks:
# Prevent giant files from being committed.
- id: check-added-large-files
# Check whether files parse as valid Python.
- id: check-ast
# Check for file name conflicts on case-insensitive filesystems.
- id: check-case-conflict
# Check for files that contain merge conflict strings.
- id: check-merge-conflict
# Check for debugger imports and py37+ `breakpoint()` calls in python source.
# Check for debugger imports and py37+ `breakpoint()` calls in Python source.
- id: debug-statements
# Don't commit to master branch.
# Check TOML file syntax.
- id: check-toml
# Check YAML file syntax.
- id: check-yaml
# Makes sure files end in a newline and only a newline.
# Duplicates Ruff W292 but also works on non-Python files.
- id: end-of-file-fixer
# Replaces or checks mixed line ending.
- id: mixed-line-ending
# Don't commit to main branch.
- id: no-commit-to-branch
# Trims trailing whitespace.
# Duplicates Ruff W291 but also works on non-Python files.
- id: trailing-whitespace

# Hooks from all other repos
# NOTE : keep these in hook-name (aka 'id') order

- repo: https://github.com/psf/black
rev: 23.7.0
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.19.1
hooks:
- id: black
- id: blacken-docs
types: [file, rst]

- repo: https://github.com/codespell-project/codespell
rev: "v2.4.1"
hooks:
- id: codespell
types_or: [asciidoc, python, markdown, rst]
additional_dependencies: [tomli]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.17.0'
hooks:
- id: mypy
exclude: 'noxfile\.py|docs/conf\.py'

- repo: https://github.com/numpy/numpydoc
rev: v1.9.0
hooks:
- id: numpydoc-validation
types: [file, python]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.12.5"
hooks:
- id: ruff
types: [file, python]
args: [--fix, --show-fixes]
- id: ruff-format
types: [file, python]
args: [--config=./pyproject.toml]

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
- repo: https://github.com/aio-libs/sort-all
rev: v1.3.0
hooks:
- id: flake8
- id: sort-all
types: [file, python]
args: [--config=./.flake8]

- repo: https://github.com/scientific-python/cookie
rev: 2025.05.02
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
args: ["--show=errskip"]

- repo: https://github.com/abravalheri/validate-pyproject
# More exhaustive than Ruff RUF200.
rev: "v0.24.1"
hooks:
- id: validate-pyproject

- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
version: 2
sphinx:
# path to conf file
configuration: docs/source/conf.py
fail_on_warning: false

build:
os: "ubuntu-22.04"
tools:
python: "mambaforge-22.9"
python: "mambaforge-23.11"

conda:
environment: requirements/rtd.yml
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
cff-version: 1.2.0
message: "If you've used tephi in your research, please cite us using the references below."
title: "tephi"
authors:
- family-names: "Little"
given-names: "Bill"
orcid: "https://orcid.org/0000-0002-1345-9465"
- family-names: "Sadek"
given-names: "Elias"
orcid: "https://orcid.org/0009-0007-3284-9745"

title: "tephi"
- name: "Tephi Contributors"
abstract: "Tephigram plotting in Python"
date-released: "2014-07-01"
license: "BSD-3-Clause"
license-url: "https://spdx.org/licenses/BSD-3-Clause.html"
repository-code: "https://github.com/SciTools/tephi"
type: "software"
type: "software"
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ recursive-include docs *.png
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs Makefile
recursive-include tephi *.json
recursive-include tephi *.npz
recursive-include tephi *.txt
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions docs/tephi/source/barbs.rst → docs/source/barbs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ A profile must be first plotted before the barbs are associated with that profil
dew_point = os.path.join(tephi.DATA_DIR, 'dews.txt')
dew_data = tephi.loadtxt(dew_point, column_titles=('pressure', 'dewpoint'))
dews = zip(dew_data.pressure, dew_data.dewpoint)
tpg = tephi.Tephigram()
tpg = tephi.TephiAxes()
profile = tpg.plot(dews)
barbs = [(0, 0, 900), (1, 30, 850), (5, 60, 800),
(10, 90, 750), (15, 120, 700), (20, 150, 650),
Expand Down Expand Up @@ -64,7 +64,7 @@ Note that, the barbs default to the same colour as their associated profile.
dews = zip(dew_data.pressure, dew_data.dewpoint)
temps = zip(temp_data.pressure, temp_data.temperature)

tpg = tephi.Tephigram()
tpg = tephi.TephiAxes()
dprofile = tpg.plot(dews)
dbarbs = [(0, 0, 900), (15, 120, 600), (35, 240, 300)]
dprofile.barbs(dbarbs)
Expand All @@ -89,7 +89,7 @@ Barbs may also be plotted using wind speed and wind direction data (associated w
barb_data = tephi.loadtxt(winds, column_titles=column_titles)
dews = zip(barb_data.pressure, barb_data.dewpoint)
barbs = zip(barb_data.wind_speed, barb_data.wind_direction, barb_data.pressure)
tpg = tephi.Tephigram()
tpg = tephi.TephiAxes()
profile = tpg.plot(dews)
profile.barbs(barbs)
plt.show()
Expand All @@ -113,7 +113,7 @@ This transparency allows full control when plotting barbs on the tephigram.
dew_point = os.path.join(tephi.DATA_DIR, 'dews.txt')
dew_data = tephi.loadtxt(dew_point, column_titles=('pressure', 'dewpoint'))
dews = zip(dew_data.pressure, dew_data.dewpoint)
tpg = tephi.Tephigram()
tpg = tephi.TephiAxes()
profile = tpg.plot(dews)
barbs = [(0, 0, 900), (1, 30, 850), (5, 60, 800),
(10, 90, 750), (15, 120, 700), (20, 150, 650),
Expand Down Expand Up @@ -141,7 +141,7 @@ By default, the barbs are plotted on the right hand side of the tephigram. The p
dew_point = os.path.join(tephi.DATA_DIR, 'dews.txt')
dew_data = tephi.loadtxt(dew_point, column_titles=('pressure', 'dewpoint'))
dews = zip(dew_data.pressure, dew_data.dewpoint)
tpg = tephi.Tephigram()
tpg = tephi.TephiAxes()
profile = tpg.plot(dews)
barbs = [(0, 0, 900), (1, 30, 850), (5, 60, 800),
(10, 90, 750), (15, 120, 700), (20, 150, 650),
Expand Down
Loading
Loading