Skip to content
Merged
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
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,40 @@ jobs:
- '3.9'
- '3.10'
- '3.11'
- '3.12-dev'
- '3.12'
- '3.13'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Package
run: |
python -m pip install --upgrade setuptools setuptools_scm wheel
python -m pip install .
python -m pip install .[tests]
- name: Run Tests
run: |
python -m pip install pytest pytest-runner pytest-cov pytest-runner
python setup.py test --addopts " --cov=metar"
if [[ ${{ matrix.python-version }} == "3.8" ]]; then
pip install codecov
if [[ ${{ matrix.python-version }} == "3.13" ]]; then
# For one of the python versions, check code coverage during pytest
pip install .[codecov]
python -m pytest --cov metar
codecov
else
# For all other python versions, just run pytest
python -m pytest
fi

typing:
name: Typing Check
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -r requirements-typing.txt
run: python -m pip install .[typing]
- name: Run mypy
run: mypy metar
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Python-Metar
============

Python-metar is a python package for interpreting METAR and SPECI coded
weather reports.
weather reports.

METAR and SPECI are coded aviation weather reports. The official
coding schemes are specified in the World Meteorological Organization
Expand Down Expand Up @@ -35,16 +35,16 @@ The current METAR report for a given airport is available at the URL

http://tgftp.nws.noaa.gov/data/observations/metar/stations/<station>.TXT

where `station` is the four-letter ICAO airport station code. The
where `station` is the four-letter ICAO airport station code. The
accompanying script get_report.py will download and decode the
current report for any specified station.
current report for any specified station.

The METAR reports for all stations (worldwide) for any "cycle" (i.e., hour)
The METAR reports for all stations (worldwide) for any "cycle" (i.e., hour)
in the last 24 hours are available in a single file at the URL

http://tgftp.nws.noaa.gov/data/observations/metar/cycles/<cycle>Z.TXT

where `cycle` is a 2-digit cycle number (`00` thru `23`).
where `cycle` is a 2-digit cycle number (`00` thru `23`).

METAR specifications
--------------------
Expand Down Expand Up @@ -134,7 +134,9 @@ METAR: METAR KEWR 111851Z VRB03G19KT 2SM R04R/3000VP6000FT TSRA BR FEW015 BKN040
Tests
------------------------------------------------------------------------

The library is tested against Python 3.7-3.10. A [tox](https://tox.readthedocs.io/en/latest/)
The library is tested against Python 3.8-3.13.

A [tox](https://tox.readthedocs.io/en/latest/)
configuration file is included to easily run tests against each of these
environments. To run tests against all environments, install tox and run:

Expand Down
48 changes: 48 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[project]
name = "python-metar"
version = "1.11.0"
description = "Metar - a package to parse METAR-coded weather reports"

authors = [
{"name"="Tom Pollard", email="[email protected]"}
]
license = {file = "LICENSE"}

requires-python = ">= 3.8"
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Intended Audience :: Science/Research",
"Topic :: Software Development :: Libraries :: Python Modules",
]

dependencies = []

[tool.setuptools]
packages = ["metar"]

[tool.setuptools.package-data]
metar = ["nsd_cccc.txt", "py.typed", "*.pyi"]

[project.urls]
Repository = "https://github.com/python-metar/python-metar/"

[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"

[project.optional-dependencies]
tests = [
"pytest"
]
codecov = [
"pytest-cov",
"pytest",
"codecov",
]
typing = [
"mypy==1.3.0"
]
1 change: 0 additions & 1 deletion requirements-typing.txt

This file was deleted.

7 changes: 0 additions & 7 deletions setup.cfg

This file was deleted.

50 changes: 0 additions & 50 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
downloadcache = {toxworkdir}/_download/
envlist = py36, py35, py34, py33, py27
envlist = py38, py39, py310, py311, py312, py313

[testenv]
deps = pytest
Expand Down
Loading