From f6164ec6020776da9afedd46a1e4f1c717e3cda7 Mon Sep 17 00:00:00 2001 From: Mike Borsetti Date: Mon, 30 Sep 2024 19:25:26 +0800 Subject: [PATCH] Version 20240930 --- .github/workflows/ci-cd.yaml | 2 +- CHANGELOG.rst | 29 +++++++++++++++++++++++++++++ README.rst | 4 ++-- RELEASE.rst | 29 ++++++++++++++++++++++++++--- airportsdata/__init__.py | 2 +- airportsdata/airports.csv | 21 ++++++++++++++++----- pyproject.toml | 8 +++++++- tests/test_airportsdata.py | 12 +++++------- tox.ini | 6 +++--- 9 files changed, 90 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index 0f69924..80fc335 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -64,7 +64,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.12', '3.11', '3.10', '3.9'] + python-version: ['3.13.0-rc.2', '3.12', '3.11', '3.10', '3.9'] # for valid python-version see https://github.com/actions/python-versions/releases env: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 05736e7..8690487 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,35 @@ on the UTC date of the release. `Contributions `__ always welcomed! +Version 240930 +================== +* Contributions by `niclaswue + `__ in PRs `#40 `__, validated and + modified using ARINC data: + + - DTNH/NBE, Enfidha–Hammamet International Airport, Enfidha, Sousse, TN. + - ESKS/SCR, Sälen/Scandinavian Mountains Airport, Rörbäcksnäs, Dalarna, SE. + - LTCU/BGG, Bingöl Airport, Çeltiksuyu, Bingöl, TR. + - LTCV/NKT, Şırnak Şerafettin Elçi Airport, Cizre, Şırnak, TR. + - UTFF/FEG, Fergana Airport, Fergana, Fergana Region, UZ. + +* Additional airports (added upstream): + + - OERS/RSI, Red Sea International Airport, Hanak, Tabuk, SA. + - VNPR/PKR, Pokhara International Airport, Pokhara, Gandaki Province, NP. + - VTSY/BTZ, Yala Betong International Airport, Yarom, Yala, TH. + - ZBSG/SZH, Shuozhou Zirun Airport, Shuozhou, Shanxi, CN. + - ZSJG/JNG, Jining Da'an Airport, Jining, Shandong, CN. + - ZWAL/ACF, Aral Talim Airport, Aral, Xinjiang, CN. + +* Added IATA codes to the following airports: + + - CPV8/KEW, Keewaywin Airport, Keewaywin, Ontario, CA. + - CTK6/ZKG, Kegaska Airport, Kegaska, Quebec, CA. + - SBCD/CFC, Cacador Airport, Cacador, Santa Catarina, BR. + - ULBC/CEE, Cherepovets Airport, Cherepovets, Vologda. + - YWHI/WSY, Whitsunday Island Airport, , Queensland, AU. + Version 2024-08-06 ================== diff --git a/README.rst b/README.rst index efe6941..320b904 100644 --- a/README.rst +++ b/README.rst @@ -2,9 +2,9 @@ airportsdata |downloads| ======================== -.. |ICAO| replace:: 28,226 +.. |ICAO| replace:: 28,237 -.. |IATA| replace:: 7,867 +.. |IATA| replace:: 7,876 .. |LID| replace:: 12,604 diff --git a/RELEASE.rst b/RELEASE.rst index 2d3dcd8..774b7b9 100644 --- a/RELEASE.rst +++ b/RELEASE.rst @@ -1,3 +1,26 @@ -* Added K6N7/NYS, New York Skyports Inc Seaplane Base, New York, New York, US. Contributed by `maidough - `__ in PRs `#132 `__, validated and modified - using FAA data. +* Contributions by `niclaswue + `__ in PRs `#40 `__, validated and + modified using ARINC data: + + - DTNH/NBE, Enfidha–Hammamet International Airport, Enfidha, Sousse, TN. + - ESKS/SCR, Sälen/Scandinavian Mountains Airport, Rörbäcksnäs, Dalarna, SE. + - LTCU/BGG, Bingöl Airport, Çeltiksuyu, Bingöl, TR. + - LTCV/NKT, Şırnak Şerafettin Elçi Airport, Cizre, Şırnak, TR. + - UTFF/FEG, Fergana Airport, Fergana, Fergana Region, UZ. + +* Additional airports (added upstream): + + - OERS/RSI, Red Sea International Airport, Hanak, Tabuk, SA. + - VNPR/PKR, Pokhara International Airport, Pokhara, Gandaki Province, NP. + - VTSY/BTZ, Yala Betong International Airport, Yarom, Yala, TH. + - ZBSG/SZH, Shuozhou Zirun Airport, Shuozhou, Shanxi, CN. + - ZSJG/JNG, Jining Da'an Airport, Jining, Shandong, CN. + - ZWAL/ACF, Aral Talim Airport, Aral, Xinjiang, CN. + +* Added IATA codes to the following airports: + + - CPV8/KEW, Keewaywin Airport, Keewaywin, Ontario, CA. + - CTK6/ZKG, Kegaska Airport, Kegaska, Quebec, CA. + - SBCD/CFC, Cacador Airport, Cacador, Santa Catarina, BR. + - ULBC/CEE, Cherepovets Airport, Cherepovets, Vologda. + - YWHI/WSY, Whitsunday Island Airport, , Queensland, AU. diff --git a/airportsdata/__init__.py b/airportsdata/__init__.py index 8ff31c7..20247ac 100644 --- a/airportsdata/__init__.py +++ b/airportsdata/__init__.py @@ -11,7 +11,7 @@ __project_name__ = __package__ __min_python_version__ = (3, 9) # minimum version of Python required to run; supported until 4 October 2024 -__version__ = '20240806' # numbering follows the release date +__version__ = '20240930' # numbering follows the release date __author__ = 'Mike Borsetti ' __copyright__ = 'Copyright 2020- Mike Borsetti' __license__ = 'MIT' diff --git a/airportsdata/airports.csv b/airportsdata/airports.csv index d9bddfa..250cd19 100644 --- a/airportsdata/airports.csv +++ b/airportsdata/airports.csv @@ -5765,7 +5765,7 @@ "CPV3","","St. Joseph Island Airport","St. Joseph Island","Ontario","CA",600,46.2833,-83.95,"America/Toronto","" "CPV4","","Mansfield Airport","Mansfield","Ontario","CA",995,44.14392,-80.01362,"America/Toronto","" "CPV7","YHP","Poplar Hill Airport","Poplar Hill","Ontario","CA",1095,52.1133,-94.2556,"America/Winnipeg","" -"CPV8","","Keewaywin Airport","Keewaywin","Ontario","CA",988,52.9911,-92.8364,"America/Winnipeg","" +"CPV8","KEW","Keewaywin Airport","Keewaywin","Ontario","CA",988,52.9911,-92.8364,"America/Winnipeg","" "CPY9","","Fergus (Holyoake Airfield)","","Ontario","CA",1380,43.72861,-80.28306,"America/Toronto","" "CPZ3","","Trenton / Mountain View Airport","Mountain View","Ontario","CA",362,44.0694,-77.3381,"America/Toronto","" "CRB2","","Cottam Airport","Cottam","Ontario","CA",635,42.14,-82.6528,"America/Toronto","" @@ -5881,7 +5881,7 @@ "CTH2","","Thor Lake Airport","","Northwest Territories","CA",809,62.10079,-112.62411,"America/Yellowknife","" "CTH3","","Grandes-Bergeronnes Airport","Grandes-Bergeronnes","Quebec","CA",69,48.2322,-69.5428,"America/Toronto","" "CTK2","","Senneterre Airport","Senneterre","Quebec","CA",1106,48.3406,-77.1811,"America/Toronto","" -"CTK6","","Kegaska Airport","Kegaska","Quebec","CA",32,50.1958,-61.2658,"America/Blanc-Sablon","" +"CTK6","ZKG","Kegaska Airport","Kegaska","Quebec","CA",32,50.1958,-61.2658,"America/Blanc-Sablon","" "CTK7","","Selkirk / Kindy Airstrip","","Ontario","CA",686,42.85111,-79.87917,"America/Toronto","" "CTN6","","Treherne (South Norfolk Airpark) Airport","Treherne","Manitoba","CA",1190,49.6597,-98.6653,"America/Winnipeg","" "CTP9","YAU","Donaldson Airport","Kattiniq","Quebec","CA",1902,61.6622,-73.3214,"America/Toronto","" @@ -6511,6 +6511,7 @@ "DT70","","Medenine Airport","Medenine","Madanin","TN",427,33.3502,10.444,"Africa/Tunis","" "DTKA","TBJ","Tabarka 7 Novembre Airport","Tabarka","Jundubah","TN",230,36.98,8.87694,"Africa/Tunis","" "DTMB","MIR","Monastir Habib Bourguiba International Airport","Monastir","Al-Munastir","TN",9,35.7581,10.7547,"Africa/Tunis","" +"DTNH","NBE","Enfidha–Hammamet International Airport","Enfidha","Sousse","TN",21,36.075833,10.438667,"Africa/Tunis","" "DTTA","TUN","Tunis Carthage International Airport","Tunis","Tunis","TN",22,36.851,10.2272,"Africa/Tunis","" "DTTB","","Sidi Ahmed Air Base","Sidi Ahmed","Banzart","TN",20,37.2454,9.79145,"Africa/Tunis","" "DTTD","","Remada Air Base","Remada","Tataouine","TN",1004,32.3062,10.3821,"Africa/Tunis","" @@ -7724,6 +7725,7 @@ "ESKM","MXX","Mora Airport","","Dalarna","SE",634,60.9579,14.5114,"Europe/Stockholm","" "ESKN","NYO","Stockholm Skavsta Airport","Stockholm / Nykoping","Sodermanland","SE",140,58.7886,16.9122,"Europe/Stockholm","" "ESKO","","Munkfors Airport","Munkfors","Vaermland","SE",0,59.7988,13.4907,"Europe/Stockholm","" +"ESKS","SCR","Sälen/Scandinavian Mountains Airport","Rörbäcksnäs","Dalarna","SE",1649,61.164667,12.833833,"Europe/Stockholm","" "ESKT","","Tierp Air Base","Tierp","Uppsala","SE",0,60.345,17.4219,"Europe/Stockholm","" "ESKU","","Sunne Airport","","Vaermland","SE",0,59.8602,13.1129,"Europe/Stockholm","" "ESKV","","Arvika Airport","","Vaermland","SE",237,59.6759,12.6394,"Europe/Stockholm","" @@ -16237,6 +16239,8 @@ "LTCR","MQM","Mardin Airport","Mardin","Mardin","TR",1729,37.2233,40.6317,"Europe/Istanbul","" "LTCS","GNY","Sanliurfa GAP Airport","Sanliurfa","Sanliurfa","TR",2708,37.44566,38.89559,"Europe/Istanbul","" "LTCT","IGD","Igdir Airport","Igdir","Kars","TR",3101,39.97663,43.87665,"Europe/Istanbul","" +"LTCU","BGG","Bingöl Airport","Çeltiksuyu","Bingöl","TR",3492,38.861167,40.5925,"Europe/Istanbul","" +"LTCV","NKT","Şırnak Şerafettin Elçi Airport","Cizre","Şırnak","TR",2041,37.363833,42.06,"Europe/Istanbul","" "LTCW","YKO","Yüksekova Selahaddin Eyyubi Airport","Yüksekova","Hakkari","TR",6096,37.54967,44.2375,"Europe/Istanbul","" "LTDA","HTY","Hatay Airport","Hatay","Hatay","TR",269,36.36278,36.28222,"Europe/Istanbul","" "LTFA","","Kaklic Airport","Izmir","Izmir","TR",13,38.5176,26.9774,"Europe/Istanbul","" @@ -18193,6 +18197,7 @@ "OERK","RUH","King Khaled International Airport","Riyadh","","SA",2049,24.9576,46.6988,"Asia/Riyadh","" "OERM","","Ras Mishab Airport","","Eastern Province","SA",13,28.0796,48.611,"Asia/Riyadh","" "OERR","RAE","Arar Domestic Airport","Arar","Northern Borders","SA",1813,30.9066,41.1382,"Asia/Riyadh","" +"OERS","RSI","Red Sea International Airport","Hanak","Tabuk","SA",140,25.627975,37.088914,"Asia/Riyadh","" "OERT","","Ras Tanura Airport","","Eastern Province","SA",6,26.7231,50.0308,"Asia/Riyadh","" "OERY","XXN","Riyadh Air Base","Riyadh","Ar-Riyaḑ","SA",2082,24.7098,46.7252,"Asia/Riyadh","" "OESB","","Shaibah Airport","","Eastern Province","SA",300,22.5145,53.9641,"Asia/Riyadh","" @@ -19742,7 +19747,7 @@ "SBCA","CAC","Cascavel Airport","Cascavel","Paraná","BR",2473,-25.0003,-53.5008,"America/Sao_Paulo","" "SBCB","CFB","Cabo Frio Airport","Cabo Frio","Rio de Janeiro","BR",23,-22.9217,-42.0743,"America/Sao_Paulo","" "SBCC","","Cachimbo Airport","Novo Progresso","Pará","BR",1762,-9.33394,-54.9654,"America/Belem","" -"SBCD","","Cacador Airport","Cacador","Santa Catarina","BR",3376,-26.7884,-50.9398,"America/Sao_Paulo","" +"SBCD","CFC","Cacador Airport","Cacador","Santa Catarina","BR",3376,-26.7884,-50.9398,"America/Sao_Paulo","" "SBCF","CNF","Tancredo Neves International Airport","Belo Horizonte","Minas Gerais","BR",2715,-19.62444,-43.97194,"America/Sao_Paulo","" "SBCG","CGR","Campo Grande Airport","Campo Grande","Mato-Grosso-do-Sul","BR",1833,-20.4687,-54.6725,"America/Campo_Grande","" "SBCH","XAP","Chapeco Airport","Chapeco","Santa Catarina","BR",2146,-27.1342,-52.6566,"America/Sao_Paulo","" @@ -24670,7 +24675,7 @@ "ULAS","CSH","Solovki Airport","Solovetsky Islands","Arkhangelskaya","RU",60,65.03,35.73333,"Europe/Moscow","" "ULAT","","Pertominsk Airport","Pertominsk","Arkhangelskaya","RU",56,64.79,38.42,"Europe/Moscow","" "ULAV","","Nizhnyaya Pesha Airport","Nizhnyaya Pesha","Nenets","RU",32,66.753,47.743,"Europe/Moscow","" -"ULBC","","Cherepovets Airport","Cherepovets","Vologda","RU",377,59.2736,38.0158,"Europe/Moscow","" +"ULBC","CEE","Cherepovets Airport","Cherepovets","Vologda","RU",377,59.2736,38.0158,"Europe/Moscow","" "ULBD","","Dolgoshchelye Airport","Dolgoshchelye","Arkhangelskaya","RU",0,66.0437,43.4581,"Europe/Moscow","" "ULBI","","Chizha Airport","Chizha","Nenets","RU",0,67.084,44.367,"Europe/Moscow","" "ULBL","","Lopshenga Airport","Lopshenga","Arkhangelskaya","RU",49,64.98,37.693,"Europe/Moscow","" @@ -24904,6 +24909,7 @@ "UTDK","TJU","Kulob Airport","Kulyab","Khatlon","TJ",2293,37.9881,69.805,"Asia/Dushanbe","" "UTDL","LBD","Khudzhand Airport","Khudzhand","Viloyati-Sughd","TJ",1450,40.2154,69.6947,"Asia/Dushanbe","" "UTDT","KQT","Qurghonteppa International Airport","Kurgan-Tyube","Khatlon","TJ",1473,37.8664,68.8647,"Asia/Dushanbe","" +"UTFF","FEG","Fergana Airport","Fergana","Fergana Region","UZ",2052,40.358333,71.744667,"Asia/Tashkent","" "UTKA","AZN","Andizhan Airport","Andizhan","Andijon","UZ",1515,40.7277,72.294,"Asia/Tashkent","" "UTKF","FEG","Fergana Airport","Fergana","Fergana","UZ",1980,40.3588,71.745,"Asia/Tashkent","" "UTKK","","Kokand Airport","Kokand","Fergana","UZ",1357,40.5398,70.9748,"Asia/Tashkent","" @@ -25364,6 +25370,7 @@ "VNNG","KEP","Nepalgunj Airport","Nepalgunj","Mid-Western","NP",540,28.1036,81.667,"Asia/Kathmandu","" "VNPK","PKR","Pokhara Airport","Pokhara","Western Region","NP",2712,28.2009,83.9821,"Asia/Kathmandu","" "VNPL","PPL","Phaplu Airport","Phaplu","Eastern Region","NP",7918,27.51779,86.58445,"Asia/Kathmandu","" +"VNPR","PKR","Pokhara International Airport","Pokhara","Gandaki Province","NP",800,28.18969,84.014893,"Asia/Kathmandu","" "VNRB","RJB","Rajbiraj Airport","Rajbiraj","Eastern Region","NP",250,26.517,86.75,"Asia/Kathmandu","" "VNRC","RHP","Ramechhap Airport","Ramechhap","Central Region","NP",1555,27.394,86.0614,"Asia/Kathmandu","" "VNRK","RUK","Rukumkot Airport","Rukumkot","Mid-Western","NP",2500,28.627,82.195,"Asia/Kathmandu","" @@ -25527,6 +25534,7 @@ "VTSR","UNN","Ranong Airport","","Ranong","TH",57,9.77762,98.5855,"Asia/Bangkok","" "VTSS","HDY","Hat Yai International Airport","Hat Yai","Songkhla","TH",90,6.93321,100.393,"Asia/Bangkok","" "VTST","TST","Trang Airport","","Trang","TH",67,7.50874,99.6166,"Asia/Bangkok","" +"VTSY","BTZ","Yala Betong International Airport","Yarom","Yala","TH",765,5.786288,101.147523,"Asia/Bangkok","" "VTUD","UTH","Udon Thani Airport","Udon Thani","Changwat-Udon-Thani","TH",579,17.3864,102.788,"Asia/Bangkok","" "VTUI","SNO","Sakon Nakhon Airport","","Sakon-Nakhon","TH",529,17.1951,104.119,"Asia/Bangkok","" "VTUJ","PXR","Surin Airport","","Surin","TH",478,14.8683,103.498,"Asia/Bangkok","" @@ -27868,7 +27876,7 @@ "YWGW","","Wongawol Airport","","Western Australia","AU",0,-26.1333,121.967,"Australia/Perth","" "YWHA","WYA","Whyalla Airport","Whyalla","South Australia","AU",41,-33.0589,137.51401,"Australia/Adelaide","" "YWHC","","White Cliffs Airport","","New South Wales","AU",162,-30.8533,143.07201,"Australia/Sydney","" -"YWHI","","Whitsunday Island Airport","","Queensland","AU",0,-20.2667,148.767,"Australia/Brisbane","" +"YWHI","WSY","Whitsunday Island Airport","","Queensland","AU",0,-20.2667,148.767,"Australia/Brisbane","" "YWHL","","Walhallow Airport","","Northern Territory","AU",0,-17.7667,135.64999,"Australia/Darwin","" "YWIB","","Mount Willoughby Airport","","South Australia","AU",0,-27.9833,134.14999,"Australia/Adelaide","" "YWIE","","Wirralie Gold Mine Airport","","Queensland","AU",0,-21.1167,147.267,"Australia/Brisbane","" @@ -28001,6 +28009,7 @@ "ZBMZ","NZH","Manzhouli Xijiao Airport","Manzhouli","Inner-Mongolia","CN",2198,49.566667,117.33,"Asia/Shanghai","" "ZBNY","NAY","Beijing Nanyuan Airport","Beijing","Beijing","CN",0,39.7828,116.388,"Asia/Shanghai","" "ZBOW","BAV","Baotou Airport","Baotou","Inner Mongolia","CN",3321,40.56,109.997,"Asia/Shanghai","" +"ZBSG","SZH","Shuozhou Zirun Airport","Shuozhou","Shanxi","CN",3422,39.273056,112.691111,"Asia/Shanghai","" "ZBSH","","Shanhaiguan Air Base","Qinhuangdao","Hebei","CN",30,39.9681,119.731,"Asia/Shanghai","" "ZBSJ","SJW","Shijiazhuang Daguocun International Airport","Shijiazhuang","Hebei","CN",233,38.2807,114.697,"Asia/Shanghai","" "ZBTJ","TSN","Tianjin Binhai International Airport","Tianjin","Tianjin","CN",10,39.1244,117.346,"Asia/Shanghai","" @@ -28115,6 +28124,7 @@ "ZSGZ","KOW","Ganzhou Airport","Ganzhou","Jiangxi","CN",387,25.8258,114.912,"Asia/Shanghai","" "ZSHC","HGH","Hangzhou Xiaoshan International Airport","Hangzhou","Zhejiang","CN",23,30.2295,120.434,"Asia/Shanghai","" "ZSJD","JDZ","Jingdezhen Airport","Jingdezhen","Jiangxi","CN",112,29.3386,117.176,"Asia/Shanghai","" +"ZSJG","JNG","Jining Da'an Airport","Jining","Shandong","CN",118,35.646944,116.744167,"Asia/Shanghai","" "ZSJJ","JIU","Jiujiang Lushan Airport","Jiujiang","Jiangxi","CN",0,29.47694,115.80111,"Asia/Shanghai","" "ZSJN","TNA","Yaoqiang Airport","Jinan","Shandong","CN",76,36.8572,117.216,"Asia/Shanghai","" "ZSJU","JUZ","Quzhou Airport","Quzhou","Zhejiang","CN",0,28.9658,118.899,"Asia/Shanghai","" @@ -28182,6 +28192,7 @@ "ZUYI","ACX","Xingyi Airport","Xingyi","Guizhou","CN",4150,25.08639,104.95944,"Asia/Shanghai","" "ZUZY","ZYI","Zunyi Xinzhou Airport","Zunyi","Guizhou","CN",2920,27.5895,107.0007,"Asia/Shanghai","" "ZWAK","AKU","Aksu Airport","Aksu","Xinjiang","CN",0,41.2625,80.2917,"Asia/Shanghai","" +"ZWAL","ACF","Aral Talim Airport","Aral","Xinjiang","CN",3346,40.435799,81.264117,"Asia/Shanghai","" "ZWAT","AAT","Altay Air Base","Altay","Xinjiang","CN",2460,47.74989,88.08581,"Asia/Shanghai","" "ZWBL","BPL","Alashankou Bole (Bortala) airport","Bole","Xinjiang","CN",1253,44.895,82.3,"Asia/Shanghai","" "ZWCM","IQM","Qiemo Airport","Qiemo","Xinjiang","CN",4108,38.1494,85.5328,"Asia/Shanghai","" diff --git a/pyproject.toml b/pyproject.toml index 4cf01f6..c2f13c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,14 +31,17 @@ keywords = ['airports', 'aerodromes', 'ICAO', 'IATA'] classifiers = [ 'Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Operating System :: OS Independent', 'Topic :: Database', 'Intended Audience :: Developers', + 'Typing :: Typed', ] [project.urls] @@ -47,6 +50,7 @@ Repository = 'https://github.com/mborsetti/airportsdata/' 'Database (csv)' = 'https://github.com/mborsetti/airportsdata/blob/main/airportsdata/airports.csv' Changelog = 'https://github.com/mborsetti/airportsdata/blob/main/CHANGELOG.rst' Issues = 'https://github.com/mborsetti/airportsdata/issues' +CI = 'https://github.com/mborsetti/airportsdata/actions' # -------------------------- setuptools -------------------------- @@ -127,6 +131,8 @@ exclude_lines = [ # Disable below when running in PyCharm to enable breakpoints: https://github.com/pytest-dev/pytest-cov/issues/131 # Adds pytest-cov functionality (see https://pytest-cov.readthedocs.io/en/latest/config.html) # addopts = --cov=./ --cov-report term --cov-report html --cov-report xml --cov-config=.coveragerc - +log_auto_indent = true # Enable log display during test run (aka "live logging" https://docs.pytest.org/en/stable/logging.html#live-logs) log_cli = true +minversion = '8.3.3' +testpaths = ['tests'] diff --git a/tests/test_airportsdata.py b/tests/test_airportsdata.py index 2fbca1f..7a3c600 100644 --- a/tests/test_airportsdata.py +++ b/tests/test_airportsdata.py @@ -2,19 +2,15 @@ import sys import warnings +import zoneinfo from pathlib import Path -import pytest - import airportsdata +import pytest -try: # required for < Python 3.9 - import zoneinfo -except ImportError: - import backports.zoneinfo as zoneinfo # type: ignore[no-redef,import-not-found] pylatest_only = pytest.mark.skipif( - sys.version_info < (3, 11), + sys.version_info < (3, 12), reason='Data quality and integrity is only checked once, with latest Python version', ) @@ -598,7 +594,9 @@ def test_data_quality() -> None: assert airport['subd'] in subdiv[airport['country']] assert isinstance(airport['elevation'], float) assert isinstance(airport['lat'], float) + assert -90 <= airport['lat'] <= 90 assert isinstance(airport['lon'], float) + assert -180 <= airport['lon'] <= 180 if airport['tz'] in tz_deprecated: warnings.warn( DeprecationWarning( diff --git a/tox.ini b/tox.ini index 0915844..33887ca 100644 --- a/tox.ini +++ b/tox.ini @@ -10,12 +10,12 @@ [tox] requires = - tox>=4.16.0 - virtualenv>=20.26.3 + tox >= 4.20.0 + virtualenv >= 20.26.6 env_list = pre-commit py312-new-install - py{312,311,310,39}-pytest + py{313,312,311,310,39}-pytest skip_missing_interpreters = true [testenv]