Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0cec41b

Browse files
committed
Issue #184: Change to pyproject.toml
1 parent fba07d3 commit 0cec41b

7 files changed

Lines changed: 69 additions & 74 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,40 @@ jobs:
1111
- '3.9'
1212
- '3.10'
1313
- '3.11'
14-
- '3.12-dev'
14+
- '3.12'
15+
- '3.13'
1516
steps:
1617
- uses: actions/checkout@v4
1718
- uses: actions/setup-python@v5
1819
with:
1920
python-version: ${{ matrix.python-version }}
2021
- name: Install Package
2122
run: |
22-
python -m pip install --upgrade setuptools setuptools_scm wheel
23-
python -m pip install .
23+
python -m pip install .[tests]
2424
- name: Run Tests
2525
run: |
26-
python -m pip install pytest pytest-runner pytest-cov pytest-runner
27-
python setup.py test --addopts " --cov=metar"
28-
if [[ ${{ matrix.python-version }} == "3.8" ]]; then
29-
pip install codecov
26+
if [[ ${{ matrix.python-version }} == "3.13" ]]; then
27+
# For one of the python versions, check code coverage during pytest
28+
pip install .[codecov]
29+
python -m pytest --cov metar
3030
codecov
31+
else
32+
# For all other python versions, just run pytest
33+
python -m pytest
3134
fi
3235
3336
typing:
3437
name: Typing Check
3538
runs-on: ubuntu-latest
3639
strategy:
3740
matrix:
38-
python-version: ["3.11"]
41+
python-version: ["3.13"]
3942
steps:
4043
- uses: actions/checkout@v4
4144
- uses: actions/setup-python@v5
4245
with:
4346
python-version: ${{ matrix.python-version }}
4447
- name: Install dependencies
45-
run: pip install -r requirements-typing.txt
48+
run: python -m pip install .[typing]
4649
- name: Run mypy
4750
run: mypy metar

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Python-Metar
77
============
88

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

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

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

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

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

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

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

4949
METAR specifications
5050
--------------------
@@ -134,7 +134,9 @@ METAR: METAR KEWR 111851Z VRB03G19KT 2SM R04R/3000VP6000FT TSRA BR FEW015 BKN040
134134
Tests
135135
------------------------------------------------------------------------
136136

137-
The library is tested against Python 3.7-3.10. A [tox](https://tox.readthedocs.io/en/latest/)
137+
The library is tested against Python 3.8-3.13.
138+
139+
A [tox](https://tox.readthedocs.io/en/latest/)
138140
configuration file is included to easily run tests against each of these
139141
environments. To run tests against all environments, install tox and run:
140142

pyproject.toml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
[project]
2+
name = "python-metar"
3+
version = "1.11.0"
4+
description = "Metar - a package to parse METAR-coded weather reports"
5+
6+
authors = [
7+
{"name"="Tom Pollard", email="[email protected]"}
8+
]
9+
license = {file = "LICENSE"}
10+
11+
requires-python = ">= 3.8"
12+
readme = "README.md"
13+
classifiers = [
14+
"Development Status :: 5 - Production/Stable",
15+
"License :: OSI Approved :: BSD License",
16+
"Operating System :: OS Independent",
17+
"Programming Language :: Python",
18+
"Intended Audience :: Science/Research",
19+
"Topic :: Software Development :: Libraries :: Python Modules",
20+
]
21+
22+
dependencies = []
23+
24+
[tool.setuptools]
25+
packages = ["metar"]
26+
27+
[tool.setuptools.package-data]
28+
metar = ["nsd_cccc.txt", "py.typed", "*.pyi"]
29+
30+
[project.urls]
31+
Repository = "https://github.com/python-metar/python-metar/"
32+
33+
[build-system]
34+
requires = ["setuptools >= 61.0"]
35+
build-backend = "setuptools.build_meta"
36+
37+
[project.optional-dependencies]
38+
tests = [
39+
"pytest"
40+
]
41+
codecov = [
42+
"pytest-cov",
43+
"pytest",
44+
"codecov",
45+
]
46+
typing = [
47+
"mypy==1.3.0"
48+
]

requirements-typing.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.cfg

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

setup.py

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

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
downloadcache = {toxworkdir}/_download/
3-
envlist = py36, py35, py34, py33, py27
3+
envlist = py38, py39, py310, py311, py312, py313
44

55
[testenv]
66
deps = pytest

0 commit comments

Comments
 (0)