Skip to content

Commit

Permalink
Version 20230303
Browse files Browse the repository at this point in the history
  • Loading branch information
mborsetti committed Mar 3, 2023
1 parent 18e2206 commit e255322
Show file tree
Hide file tree
Showing 14 changed files with 631 additions and 1,374 deletions.
82 changes: 46 additions & 36 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
# hooks to the latest tag on the default branch.

# NOTE: in this package implementation, tox runs 'pre-commit run -a'
# To manually run without committing > pre-commit run --all-files

minimum_pre_commit_version: 2.20.0
minimum_pre_commit_version: 3.1.1

# Force all unspecified python hooks to run python3
default_language_version:
Expand All @@ -19,67 +20,69 @@ default_language_version:
# A list of repository mappings.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
# see https://github.com/pre-commit/pre-commit-hooks
# - id: check-added-large-files
# description: Prevent giant files from being committed
- id: check-ast
description: Simply check whether files parse as valid python
# description: Prevent giant files from being committed.
# - id: check-ast # black takes care of this
# description: Simply check whether files parse as valid python.
- id: check-builtin-literals
description: Require literal syntax when initializing empty or zero Python builtin types
description: Require literal syntax when initializing empty or zero Python builtin types.
- id: check-case-conflict
description: Check for files with names that would conflict on a case-insensitive filesystem
- id: check-docstring-first
description: Checks for a common error of placing code before the docstring
# - id: check-docstring-first # black takes care of this
# description: Checks for a common error of placing code before the docstring.
- id: check-executables-have-shebangs
description: Checks that non-binary executables have a proper shebang
# - id: check-json
# description: Attempts to load all json files to verify syntax
description: Checks that non-binary executables have a proper shebang.
- id: check-json
description: Attempts to load all json files to verify syntax.
- id: check-merge-conflict
description: Check for files that contain merge conflict strings
# - id: check-shebang-scripts-are-executable
# description: Checks that scripts with shebangs are executable
description: Check for files that contain merge conflict strings.
# - id: check-shebang-scripts-are-executable # have none
# description: Checks that scripts with shebangs are executable.
# - id: check-symlinks
# description: Checks for symlinks which do not point to anything
# - id: check-toml
# description: Checks for symlinks which do not point to anything.
# - id: check-toml # have no toml files
# description: Attempts to load all TOML files to verify syntax.
- id: check-vcs-permalinks
description: Ensures that links to vcs websites are permalinks
# - id: check-xml
# description: Attempts to load all xml files to verify syntax
# - id: check-yaml
description: Ensures that links to vcs websites are permalinks.
# - id: check-xml # have no xml files
# description: Attempts to load all xml files to verify syntax.
# - id: check-yaml # have no yaml files
# args: [--allow-multiple-documents]
# description: Attempts to load all yaml files to verify syntax
# description: Attempts to load all yaml files to verify syntax.
- id: debug-statements
description: Check for debugger imports and py37+ breakpoint() calls in python source.
- id: destroyed-symlinks
description: >-
Detects symlinks which are changed to regular files with a content of a path which that symlink was
pointing to
# - id: detect-aws-credentials
# description: Checks for the existence of AWS secrets that you have set up with the AWS CLI
# - id: detect-private-key
# description: Checks for the existence of private keys
pointing to.
# - id: detect-aws-credentials # have none
# description: Checks for the existence of AWS secrets that you have set up with the AWS CLI.
# - id: detect-private-key # have none
# description: Checks for the existence of private keys.
- id: double-quote-string-fixer
description: This hook replaces double quoted strings with single quoted strings.
- id: end-of-file-fixer
description: Makes sure files end in a newline and only a newline
description: Makes sure files end in a newline and only a newline.
# - id: file-contents-sorter
# description: Sort the lines in specified files (defaults to alphabetical)
- id: fix-byte-order-marker
description: removes UTF-8 byte order marker
- id: fix-encoding-pragma
args: ['--remove']
args: [--remove]
description: "Remove # -*- coding: utf-8 -*- from the top of python files"
# - id: file-contents-sorter
# description: Sort the lines in specified files (defaults to alphabetical)
# - id: forbid-new-submodules
# description: Prevent addition of new git submodules
# - id: mixed-line-ending
# args: ['--fix=lf']
- id: forbid-submodules
description: forbids any submodules in the repository.
# - id: mixed-line-ending # are using gitattributes https://git-scm.com/docs/gitattributes
# args: [--fix=lf]
# description: Forces replacing of line ending by the UNIX 'lf' character
# note: switched to using gitattributes https://git-scm.com/docs/gitattributes
# - id: name-tests-test
# description: Assert that Python files in tests/ end in _test.py
- id: name-tests-test
description: verifies that test files are named correctly.
args: [--pytest-test-first]
# - id: no-commit-to-branch
# description: Protect specific branches from direct checkins.
# - id: pretty-format-json
Expand All @@ -92,7 +95,7 @@ repos:
# description: Trims trailing whitespace

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
description: >-
Expand Down Expand Up @@ -141,6 +144,13 @@ repos:
language: python
types: [python]
args: [--show-error-codes]
- id: tox-ini-fmt # https://github.com/tox-dev/tox-ini-fmt
name: Apply a consistent format to tox.ini files (tox-ini-fmt)
entry: tox-ini-fmt
additional_dependencies: [tox-ini-fmt]
language: python
files: tox.ini
types: [ini]

# - repo: https://github.com/pycqa/doc8
# rev: 0.9.0a1
Expand Down
43 changes: 37 additions & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,44 @@ on the UTC date of the release.

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


20230303
==================
* Better documented our use of pseudo-ICAO Identifiers.
* Reworded the IATA Multi Airport Cities page.
* Removed IATA code QUS from DNGU, Gusau Airport, Gusau, Zamfara, Nigeria (code not in IATA database).
* Implemented suggestions made upstream by `Nicolas Bridoux
<https://github.com/Bridouille>`__ in issue `#80 <https://github.com/mborsetti/airportsdata/issues/80>`__:

* Added:

- AYLO/LWI, Lowai Airstrip, Lowai, Morobe Province, Papua New Guinea
- LTCW/YKO, Yüksekova Selahaddin Eyyubi Airport, Yüksekova, Hakkari, Turkey
- MPRH/RIH, Río Hato Airport, Río Hato, Coclé, Panama
- UWSG/GSV, Gagarin Airport, Saratov, Saratov, Russia
- ZSSM/SQJ, Sanming Shaxian Airport, Sanming, Fujian, China
* Added IATA code and updated ICAO one:

- VEDH/DBR, Darbhanga Airport, Bihar, India (was VE89)
- VOTK/TCR, Tuticorin Southwest Airport, Tamil-Nadu, India (was VO80)
* Added IATA code:

- 5MS1/RFK, Rollang Field, Rolling Fork, Mississippi, USA
- KTHM/THM, Thompson Falls Airport, Thompson Falls, Montana, USA
- MMSM/NLU, Santa Lucia Air Force Base, Reyes Acozac, Mexico
- SKSA/RVE, Los Colonizadores Airport, Saravena, Arauca, Colombia
- SKVG/VGZ, Villagarzon Airport, Villagarzon, Putumayo, Colombia
- YBGD/OCM, Boolgeeda Airport, Western Australia, Australia
* Added ``tox-ini-fmt`` to ``pre-commit`` to apply a consistent format to tox.ini files.


Version 20221121
==================
* All USA airports have been replaced with information sourced by the FAA. This consists of 12,566 operational airports
located in the US and its territories, and covers country codes ``US``, ``PR`` (The Commonwealth of Puerto Rico),
``VI`` (The Virgin Islands of the United States), ``AS`` (The Territory of American Samoa), ``FM`` (The Federated
States of Micronesia), ``GU`` (The Territory of Guam), ``MH`` (The Republic of the Marshall Islands), ``MP`` (The
Commonwealth of the Northern Mariana Islands) and ``PW`` (The Republic of Palau).
* All USA airports have been replaced with information sourced from the FAA. This consists of 12,566 operational
airports located in the US and its territories, and covers country codes ``US``, ``PR`` (The Commonwealth of Puerto
Rico), ``VI`` (The Virgin Islands of the United States), ``AS`` (The Territory of American Samoa), ``FM`` (The
Federated States of Micronesia), ``GU`` (The Territory of Guam), ``MH`` (The Republic of the Marshall Islands),
``MP`` (The Commonwealth of the Northern Mariana Islands) and ``PW`` (The Republic of Palau).
* As a result of this upgrade, 379 airports that the FAA shows as permanently closed have been removed, and for
other reasons the total net number of airports has decreased by an additional 387. Timezone information, when not
available in the previous database, has been sourced from `TimeZoneDB <https://timezonedb.com>`__.
Expand All @@ -29,7 +60,7 @@ Version 20221121
Version 20221105.1
==================
* Added LLER/ETM, Ilan and Asaf Ramon Airport, Eilat, Southern District, Israel. Reported by `Andrzej Pomirski
<https://github.com/Acrobot>`__ in issue `#7 <https://github.com/mborsetti/airportsdata/issues/17>`__.
<https://github.com/Acrobot>`__ in issue `#17 <https://github.com/mborsetti/airportsdata/issues/17>`__.
* Added LENE, La Caminera Airport, Torrenueva, Ciudad Real, Spain. (Contributed upstream by `Vladimir Simakhin
<https://github.com/vsimakhin>`__ in in PR `#78 <https://github.com/mwgg/Airports/pull/77>`__).

Expand Down
43 changes: 22 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ airportsdata

.. |ICAO| replace:: 28,130

.. |IATA| replace:: 6,577
.. |IATA| replace:: 6,478

.. |LID| replace:: 12,566

Expand Down Expand Up @@ -38,24 +38,25 @@ with |ICAO| entries.

Each entry consists of the following data:

* ``icao``: ICAO 4-letter Location Indicator, or, if missing, a 4-alphanumeric or ``K`` + 3-alphanumeric FAA LID[*]
(|ICAO| entries)
* ``iata``: IATA 3-letter Location Code (|IATA| entries) or an empty string
* ``icao``: ICAO 4-letter Location Indicator or (if none) an internal Pseudo-ICAO Identifier[*] (|ICAO| entries)
* ``iata``: IATA 3-letter Location Code (|IATA| entries) or an empty string[#]
* ``name``: Official name (latin script)
* ``city``: City
* ``subd``: Subdivision (e.g. state, province, region, etc.)
* ``country``: `ISO 3166-1 <https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes>`__ alpha-2 country code
(plus ``XK`` for Kosovo)
* ``elevation``: MSL elevation (the highest point of the landing area) in feet
* ``elevation``: MSL elevation (the highest point of the landing area) in feet; it is often wrong
* ``lat``: Latitude (decimal)
* ``lon``: Longitude (decimal)
* ``tz``: Timezone expressed as a `tz database name <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>`__
(IANA-compliant)
* ``lid``: U.S. FAA location identifier (|LID| entries) or an empty string
(IANA-compliant) or an empty string for Antarctica
* ``lid``: U.S. FAA Location Identifier (|LID| entries), or an empty string

.. [*] See `here <https://github.com/mborsetti/airportsdata/blob/main/README_FAA.rst>`__ for an explanation on how
airports and seaplane bases with only an U.S. FAA Location Identifier (FAA LID), or IATA location identifier, are
listed. See `here <https://github.com/mborsetti/airportsdata/blob/main/README_IATA.rst>`__ for a list of IATA Multi
.. [*] See `here <https://github.com/mborsetti/airportsdata/blob/main/README_identifiers.rst>`__ for an explanation on
how the Pseudo-ICAO Identifier is generated for airports and seaplane bases without an ICAO 4-letter Location
Indicator.
.. [#] See `here <https://github.com/mborsetti/airportsdata/blob/main/README_IATA.rst>`__ for a list of IATA Multi
Airport Cities.
Best efforts are placed to review all contributions for accuracy, but accuracy cannot be guaranteed nor should be
Expand All @@ -70,8 +71,8 @@ Known issues:
Please report any issues you may find `here
<https://github.com/mborsetti/airportsdata/blob/main/CONTRIBUTING.rst>`__.

This project is a fork of https://github.com/mwgg/Airports. All IATA codes submitted in this fork have been
validated against `IATA <https://www.iata.org/en/publications/directories/code-search/>`__.
This project is a fork of https://github.com/mwgg/Airports. All new data submitted in this fork have been validated
against `IATA <https://www.iata.org/en/publications/directories/code-search/>`__ and ARINC database or national AFD.

Raw data
========
Expand All @@ -93,25 +94,25 @@ Once installed, to load the data into a dict:

.. code-block:: python
import airportsdata
airports = airportsdata.load() # key is the ICAO identifier (the default)
print(airports['KJFK'])
import airportsdata
airports = airportsdata.load() # key is the ICAO identifier (the default)
print(airports['KJFK'])
or

.. code-block:: python
import airportsdata
airports = airportsdata.load('IATA') # key is the IATA location code
print(airports['JFK'])
import airportsdata
airports = airportsdata.load('IATA') # key is the IATA location code
print(airports['JFK'])
or

.. code-block:: python
import airportsdata
airports = airportsdata.load('LID') # key is the FAA LID
print(airports['01AA'])
import airportsdata
airports = airportsdata.load('LID') # key is the FAA LID
print(airports['01AA'])
License
=======
Expand Down
Loading

0 comments on commit e255322

Please sign in to comment.