Skip to content

Commit

Permalink
Version 20231007
Browse files Browse the repository at this point in the history
  • Loading branch information
mborsetti committed Oct 7, 2023
1 parent de4f1b2 commit 1f58dbb
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 76 deletions.
32 changes: 0 additions & 32 deletions .coveragerc

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.11', '3.10', '3.9', '3.8', '3.12.0-rc.1']
python-version: ['3.12', '3.11', '3.10', '3.9']
# for valid python-version see https://github.com/actions/python-versions/releases

env:
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@main
with:
python-version: '3.11'
python-version: '3.12'
cache: 'pip'

# Install pip dependencies
Expand Down
45 changes: 26 additions & 19 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,24 @@ on the UTC date of the release.

`Contributions <https://github.com/mborsetti/airportdata/blob/master/CHANGELOG.rst>`__ always welcomed!

Notice
======
Support for Python 3.8 will be removed on or about 5 October 2023. Older Python versions are supported for 3 years
after being obsoleted by a new major release (i.e. about 4 years since their original release). This will not affect
the CSV file.
Version 20231007
==================
* Added support for Python 3.12
* Removed support for Python 3.8 (This does not affect users of the the CSV files). As a reminder, older Python
versions are supported for 3 years after being obsoleted by a new major release (i.e. about 4 years since their
original release).
* Added VOKN/CNN, Kannur International Airport, Mattannur, Kerala, India. Based on a contribution upstream by `Ryan-DL
<https://github.com/Ryan-DL>`__ in PRs `#99 <https://github.com/mwgg/Airports/pull/91>`__
and `#93 <https://github.com/mwgg/Airports/pull/99>`__, but with official data from Indian AIP.
* Fixed IATA code and name of UELL/NER, Chulman Neryungri Airport, Chulman, Chukot, Russia.


20230906
Version 20230906
================
* Fixed regression in 20230905 where Python installation would not include the data files.

20230905

Version 20230905
================
* Fixed names of airports, cities, subdivisions (which now match `ISO 3166-2
<https://en.wikipedia.org/wiki/ISO_3166-2:UA#Current_codes>`__ names) and timezones for Ukraine (contributed by
Expand All @@ -34,21 +40,22 @@ the CSV file.
- Upgraded ``tox`` testing framework.
- Support Python 3.12 (version 3.12.0-rc.1).

20230717

Version 20230717
================
* Added new airport LRBV/GHV, Braşov-Ghimbav International Airport, Braşov, Transylvania, Romania (contributed by `Jonas
Eberle <https://github.com/jonaseberle>`__ in issue `#28 <https://github.com/mborsetti/airportsdata/issues/28>`__).


20230716
Version 20230716
================
* Fixed ICAO location identifier in HSSK/KRT, Khartoum International Airport, Khartoum, Sudan (reported by `Jonas Eberle
<https://github.com/jonaseberle>`__ in issue `#25 <https://github.com/mborsetti/airportsdata/issues/25>`__).
* Fixed altitude and coordinates of SECQ, Coaque Airport, Coaque, Ecuador (reported by `angelabinoyy
<https://github.com/angelabinoyy>`__ in issue `#26 <https://github.com/mborsetti/airportsdata/issues/26>`__).


20230630
Version 20230630
=================
* Added a net of 1,036 IATA location identifiers. Based on contributions upstream by `Justin Dixson
<https://github.com/JDShadowline>`__ in PRs `#91 <https://github.com/mwgg/Airports/pull/91>`__
Expand All @@ -69,7 +76,7 @@ the CSV file.



20230624
Version 20230624
=================
* Added \_OUK/OUK, Out Skerries Airstrip, Shetland, Scotland, Great Britain, LID: EG78. This is a landing strip
which has an IATA location identifier but no ICAO one, and is not present in GB'S AIP. As such, a pseudo-IATA location
Expand All @@ -88,7 +95,7 @@ the CSV file.



20230617
Version 20230617
=================
* Multiple fixes and additions suggested by `Nicolas Bridoux <https://github.com/Bridouille>`__ upstream in issue `#86
<https://github.com/mwgg/Airports/issues/86>`__.
Expand All @@ -99,7 +106,7 @@ the CSV file.
* Added IATA codes to multiple KL** airports.


20230528
Version 20230528
==================
* Added IATA Multi Airport City Location Identifiers as database file ``iata_macs.csv`` and in a dict
(containing data of the city's airports) returned by a new Python function; see `README_IATA.rst
Expand All @@ -108,40 +115,40 @@ the CSV file.
<https://github.com/mborsetti/airportsdata/issues/19>`__).


20230524
Version 20230524
==================
* Fixed timezone of KECP/ECP, Northwest Florida Beaches International Airport, Panama City, Florida, USA
(reported by `DonalChilde <https://github.com/DonalChilde>`__ in issue `#21
<https://github.com/mborsetti/airportsdata/issues/21>`__).


20230510
Version 20230510
==================
* Updated city of EDDF/FRA, Frankfurt am Main International Airport, Frankfurt am Main, Hesse, Germany to remove
erroneous hyphenation (requested by `Magic Mike <https://github.com/deezknuts>`__ in issue `#20
<https://github.com/mborsetti/airportsdata/issues/20>`__).


20230509
Version 20230509
==================
* Updated Kuwait International's ICAO Location Indicator from OKBK to OKKK. Confirmed with ICAO data.
(Contributed upstream by `Toni Vicente <https://github.com/arv187>`__ in in PR `#85
<https://github.com/mwgg/Airports/pull/85>`__).


20230408
Version 20230408
==================
* Changed IATA location identifier of UBBG/GNJ, Ganja Airport, Ganja, Goygol-Rayon, Azerbaijan. (Contributed
upstream by `Vladislav Kobyakov <https://github.com/ayakudere>`__ in in PR `#82
<https://github.com/mwgg/Airports/pull/82>`__).


20230323
Version 20230323
==================
* Added ZUTF/TFU, Chengdu/Tianfu Airport, Tianfu, Sichuan, China


20230303
Version 20230303
==================
* Better documented our use of pseudo-ICAO Identifiers.
* Reworded the IATA Multi Airport Cities page.
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
airportsdata |downloads|
========================

.. |ICAO| replace:: 28,131
.. |ICAO| replace:: 28,132

.. |IATA| replace:: 7,586
.. |IATA| replace:: 7,587

.. |LID| replace:: 12,567

Expand Down
3 changes: 3 additions & 0 deletions README_AIP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ contained here.
* - LK
- https://www.airport.lk/aasl/AIS/web.Home.htm
-
* - IN
- https://aim-india.aai.aero/
-
* - IT
- https://pre.enav.it/en/services/list
- Registration required
Expand Down
15 changes: 8 additions & 7 deletions RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
* Fixed regression in 20230905 where Python installation would not include the data files.

**Notice**

Support for Python 3.8 will be removed on or about 5 October 2023. Older Python versions are supported for 3 years
after being obsoleted by a new major release (i.e. about 4 years since their original release). This will not affect
the CSV file.
* Added support for Python 3.12
* Removed support for Python 3.8 (This does not affect users of the the CSV files). As a reminder, older Python
versions are supported for 3 years after being obsoleted by a new major release (i.e. about 4 years since their
original release).
* Added VOKN/CNN, Kannur International Airport, Mattannur, Kerala, India. Based on a contribution upstream by `Ryan-DL
<https://github.com/Ryan-DL>`__ in PRs `#99 <https://github.com/mwgg/Airports/pull/91>`__
and `#93 <https://github.com/mwgg/Airports/pull/99>`__, but with official data from Indian AIP.
* Fixed IATA code and name of UELL/NER, Chulman Neryungri Airport, Chulman, Chukot, Russia.
4 changes: 2 additions & 2 deletions airportsdata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

__project_name__ = __package__
# Release numbering follows the release date
__version__ = '20230906'
__min_python_version__ = (3, 8)
__version__ = '20231007'
__min_python_version__ = (3, 9)
__author__ = 'Mike Borsetti <mike@borsetti.com>'
__copyright__ = 'Copyright 2020- Mike Borsetti'
__license__ = 'MIT'
Expand Down
3 changes: 2 additions & 1 deletion airportsdata/airports.csv
Original file line number Diff line number Diff line change
Expand Up @@ -24453,7 +24453,7 @@
"UECT","TLK","Talakan Airport","Lenskiy Ulus","Sakha","RU",1329,59.881667,111.0455,"Asia/Yakutsk",""
"UEEA","ADH","Aldan Airport","Aldan","Chukot","RU",2241,58.6027984619,125.408996582,"Asia/Yakutsk",""
"UEEE","YKS","Yakutsk Airport","Yakutsk","Chukot","RU",325,62.0932998657,129.7709960938,"Asia/Yakutsk",""
"UELL","CNN","Chulman Airport","Chulman","Chukot","RU",2812,56.913898468,124.9140014648,"Asia/Yakutsk",""
"UELL","NER","Chulman Neryungri Airport","Chulman","Chukot","RU",2812,56.913898468,124.9140014648,"Asia/Yakutsk",""
"UEMA","MQJ","Moma Airport","Honuu","Chukot","RU",656,66.4508590698,143.2615509033,"Asia/Srednekolymsk",""
"UEMH","KDY","Tyopliy Klyuch Airport","Tyopliy Klyuch","Chukot","RU",0,62.7890014648,136.8549957275,"Asia/Vladivostok",""
"UEMM","GYG","Magan Airport","Magan","Chukot","RU",577,62.1034812927,129.5452880859,"Asia/Yakutsk",""
Expand Down Expand Up @@ -25345,6 +25345,7 @@
"VOHS","HYD","Rajiv Gandhi International Airport Shamshabad","Hyderabad","Telangana","IN",2024,17.2313175201,78.4298553467,"Asia/Kolkata",""
"VOHY","BPM","Begumpet Airport","Hyderabad","Telangana","IN",1742,17.4531002045,78.4675979614,"Asia/Kolkata",""
"VOJV","VDY","Vijayanagar Aerodrome (JSW)","","Karnataka","IN",1670,15.1749666667,76.6349472222,"Asia/Kolkata",""
"VOKN","CNN","Kannur International Airport","Mattannur","Kerala","IN",344,11.915833,75.545833,"Asia/Kolkata",""
"VOKP","","Koppal Aerodrome","Koppal","Karnataka","IN",1700,15.3591003418,76.2192993164,"Asia/Kolkata",""
"VOMD","IXM","Madurai Airport","Madurai","Tamil-Nadu","IN",459,9.8345098496,78.0933990479,"Asia/Kolkata",""
"VOML","IXE","Mangalore International Airport","Mangalore","Karnataka","IN",337,12.9612998962,74.8900985718,"Asia/Kolkata",""
Expand Down
59 changes: 52 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ description = """\
Extensive database of location and timezone data for nearly every airport and landing strip in the world.\
"""
readme = { file = 'README.rst', content-type = 'text/x-rst' }
requires-python = '>=3.8'
requires-python = '>=3.9'
license = {file = 'LICENSE'}
authors = [
{name = 'Mike Borsetti', email = 'mike+airportsdata@borsetti.com'},
Expand All @@ -32,8 +32,6 @@ classifiers = [
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
Expand Down Expand Up @@ -69,12 +67,59 @@ dependencies = {file = 'requirements.txt'}
# https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
[tool.black]
# What's in here overrides the command-line options shown by running $ black --help.
line-length = 120
target-version = ['py38']
skip-string-normalization = true
extend-exclude = '/(\.idea|\.pytest_cache|\__pycache__|\venv.*|\webchanges.egg-info)/'
line_length = 120
target_version = ['py39']
skip_string_normalization = true
extend_exclude = '/(\.idea|\.pytest_cache|\__pycache__|\venv.*|\webchanges.egg-info)/'
color = true


# -------------------------- coverage --------------------------
# Runs in Github Actions (see .github/workflows/ci-cd.yaml) and in tox (see tox.ini).
# Config file documentation at https://coverage.readthedocs.io/en/latest/config.html
[tool.coverage.run]
branch = true
source = ['./']
omit = [
'.*/*',
'build/*',
'dist/*',
'docs/*',
'htmlcov/*',
'pip/*',
'tests/*',
'airportsdata.egg-info/*'
]
relative_files = true
command_line = '-m pytest -vv'

[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
# Don't complain about missing debug-only code:
'def __repr__',
'if self\.debug:',

# Have to re-enable the standard pragma
'pragma: no cover',

# Don't complain if tests don't hit defensive assertion code:
'raise AssertionError',
'raise NotImplementedError',

# Don't complain if non-runnable code isn't run:
'if 0:',
'if __name__ == .__main__.:',

# Don't complain if module is not importable (handled by code):
'except ImportError:',

# Don't cover IDE code:
'if TYPE_CHECKING:'
]
# ignore_errors = true


# -------------------------- pytest --------------------------
[tool.pytest.ini_options]
# Disable below when running in PyCharm to enable breakpoints: https://github.com/pytest-dev/pytest-cov/issues/131
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
typing_extensions; python_version < "3.8"
3 changes: 2 additions & 1 deletion tests/test_airportsdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,11 @@ def test_iata_macs() -> None:
for iata, airport in mac['airports'].items():
assert airports_iata[iata] == airport


@pylatest_only
def test_wrong_key() -> None:
"""Test that you receive an error when using the wrong key."""
with pytest.raises(ValueError) as e:
# noinspection PyTypeChecker
airports_iata = airportsdata.load('wrong_key')
airportsdata.load('wrong_key') # type: ignore[arg-type]
assert e.value.args[0] == 'code_type must be one of ICAO, IATA or LID; received wrong_key'
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ requires =
virtualenv>=20.24.4
env_list =
pre-commit
py311-new-install
py312-new-install
py{312,311,310,39,38}-pytest
skip_missing_interpreters = true

Expand All @@ -31,7 +31,7 @@ parallel_show_output = true
[testenv:pre-commit]
# Settings defined in the top-level testenv section are automatically inherited if not overwritten
; temp_dir = {work_dir}/.tmp_pre-commit
base_python = python3.11
base_python = python3.12
deps =
-rtests/requirements_pre-commit.txt
temp_dir = {work_dir}/.tmp_pre-commit
Expand Down

0 comments on commit 1f58dbb

Please sign in to comment.