├── tests ├── __init__.py ├── import_test.py ├── flight_path_test.py ├── flight_times_test.py └── flight_analyse_test.py ├── requirements.txt ├── pytest.ini ├── .gitmodules ├── .travis.yml ├── .gitignore ├── CHANGELOG.rst ├── MANIFEST.in ├── Vagrantfile ├── README.rst └── setup.py /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pytest==4.6.3 2 | -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | testpaths = tests 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "xcsoar"] 2 | path = xcsoar.submodule 3 | url = git://github.com/XCSoar/XCSoar.git 4 | -------------------------------------------------------------------------------- /tests/import_test.py: -------------------------------------------------------------------------------- 1 | def test_import(): 2 | import xcsoar 3 | 4 | assert getattr(xcsoar, "Flight", None) != None 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: bionic 2 | 3 | branches: 4 | except: 5 | - /^dependabot\/.*$/ 6 | 7 | jobs: 8 | include: 9 | - &test 10 | stage: test 11 | 12 | language: python 13 | python: 2.7 14 | 15 | addons: 16 | apt: 17 | packages: 18 | - libcurl4-openssl-dev 19 | - python-dev 20 | 21 | install: 22 | - pip install -r requirements.txt 23 | 24 | before_script: 25 | - git submodule update --init --recursive 26 | 27 | script: 28 | # Try to install the package 29 | - pip install . 30 | 31 | # Run tests 32 | - pytest -vv 33 | 34 | - <<: *test 35 | python: 3.6 36 | 37 | - stage: test 38 | name: "Linting (black)" 39 | 40 | language: python 41 | python: 3.6 42 | 43 | install: 44 | - pip install black==18.9b0 45 | 46 | script: 47 | - black tests *.py --check 48 | 49 | notifications: 50 | email: 51 | on_failure: change 52 | 53 | deploy: 54 | provider: pypi 55 | distributions: "sdist" 56 | skip_cleanup: true 57 | user: Tobias.Bieniek 58 | password: 59 | secure: EoZBUYwOumozqjqZ0ODDUfywSF+kSxUeIEVQNzjKjWdbzdwzD9tBi3uEGed6+CkZr9R/5arc/YAjCt/1zuKfdgOD6Mh6VxgkcPoaBkfF0nsTKwgNzN29BEU4P1V7nWpILy7JPC80K0fCvH2UwGlmB79oMFuLu74vcf2MhTKA40E= 60 | on: 61 | tags: true 62 | repo: skylines-project/py-xcsoar 63 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Vagrant files 2 | .vagrant/ 3 | 4 | ### Python template 5 | # Byte-compiled / optimized / DLL files 6 | __pycache__/ 7 | *.py[cod] 8 | *$py.class 9 | 10 | # C extensions 11 | *.so 12 | 13 | # Distribution / packaging 14 | .Python 15 | env/ 16 | build/ 17 | develop-eggs/ 18 | dist/ 19 | downloads/ 20 | eggs/ 21 | .eggs/ 22 | lib/ 23 | lib64/ 24 | parts/ 25 | sdist/ 26 | var/ 27 | wheels/ 28 | *.egg-info/ 29 | .installed.cfg 30 | *.egg 31 | 32 | # PyInstaller 33 | # Usually these files are written by a python script from a template 34 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 35 | *.manifest 36 | *.spec 37 | 38 | # Installer logs 39 | pip-log.txt 40 | pip-delete-this-directory.txt 41 | 42 | # Unit test / coverage reports 43 | htmlcov/ 44 | .tox/ 45 | .coverage 46 | .coverage.* 47 | .cache 48 | nosetests.xml 49 | coverage.xml 50 | *,cover 51 | .hypothesis/ 52 | 53 | # Translations 54 | *.mo 55 | *.pot 56 | 57 | # Django stuff: 58 | *.log 59 | local_settings.py 60 | 61 | # Flask stuff: 62 | instance/ 63 | .webassets-cache 64 | 65 | # Scrapy stuff: 66 | .scrapy 67 | 68 | # Sphinx documentation 69 | docs/_build/ 70 | 71 | # PyBuilder 72 | target/ 73 | 74 | # Jupyter Notebook 75 | .ipynb_checkpoints 76 | 77 | # pyenv 78 | .python-version 79 | 80 | # celery beat schedule file 81 | celerybeat-schedule 82 | 83 | # dotenv 84 | .env 85 | 86 | # virtualenv 87 | .venv 88 | venv/ 89 | ENV/ 90 | 91 | # Spyder project settings 92 | .spyderproject 93 | 94 | # Rope project settings 95 | .ropeproject 96 | 97 | -------------------------------------------------------------------------------- /CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | CHANGELOG 2 | ========= 3 | 4 | 0.7.0 5 | ----- 6 | 7 | - Update to XCSoar v6.8.14 8 | - Add support for long-form `HFDTE` records in IGC files 9 | - Add support for Python 3.6 10 | - Drop support for Python 3.4 and 3.5 11 | 12 | 13 | 0.6.4 14 | ----- 15 | 16 | - Disable binary wheel distribution 17 | - Remove unnecessary freetype and libpng requirements 18 | - Exclude boost docs and tests from source distribution 19 | 20 | 21 | 0.6.3 22 | ----- 23 | 24 | - Fix wheel compatibility tags 25 | 26 | 27 | 0.6.2 28 | ----- 29 | 30 | - Update to XCSoar 6.8.11 31 | 32 | 33 | 0.6.1 34 | ----- 35 | 36 | - Adjusted wheel distribution 37 | 38 | 39 | 0.6 40 | --- 41 | 42 | - Add Python 3 support 43 | 44 | 45 | 0.5 46 | --- 47 | 48 | Use XCSoar 6.8.2 codebase. 49 | 50 | 51 | 0.4.2 52 | ----- 53 | 54 | - Fix installation on Mac OSX 55 | 56 | 57 | 0.4.1 58 | ----- 59 | 60 | Update xcsoar source to latest 6.8 development version: 61 | 62 | - adding RMZ airspaces 63 | 64 | - fixing a endless loop bug in the replay code 65 | 66 | 67 | 0.4 68 | --- 69 | 70 | Add interface to XCSoar's airspace warning code. 71 | 72 | 73 | 0.3 74 | ----- 75 | 76 | - update XCSoar source to the latest 6.8 development version 77 | 78 | - add QNH processing 79 | 80 | 81 | 0.2.1 82 | ----- 83 | 84 | Update XCSoar source to fix some issues: 85 | 86 | - fix double free due to incorrect DECREF in Flight.encode() 87 | 88 | - fix two other improbable memory leaks 89 | 90 | - conversion to RoughAltitude rounds fixed/double numbers before casting to 91 | short to prevent wrong rounding 92 | 93 | 0.2 94 | --- 95 | First version with c++ python interface to XCSoar. 96 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | # metadata 2 | include README.rst 3 | include xcsoar.submodule/AUTHORS 4 | include xcsoar.submodule/COPYING 5 | include xcsoar.submodule/README 6 | include xcsoar.submodule/VERSION.txt 7 | 8 | # build scripts 9 | include xcsoar.submodule/Makefile 10 | graft xcsoar.submodule/build 11 | 12 | # source files 13 | graft xcsoar.submodule/src 14 | prune xcsoar.submodule/src/Android 15 | prune xcsoar.submodule/src/Dialogs 16 | prune xcsoar.submodule/src/Form 17 | prune xcsoar.submodule/src/Gauge 18 | prune xcsoar.submodule/src/InfoBoxes 19 | prune xcsoar.submodule/src/Input 20 | prune xcsoar.submodule/src/Java 21 | prune xcsoar.submodule/src/Kobo 22 | prune xcsoar.submodule/src/Look 23 | prune xcsoar.submodule/src/MapWindow 24 | prune xcsoar.submodule/src/Renderer 25 | prune xcsoar.submodule/src/Screen 26 | prune xcsoar.submodule/src/UIUtil 27 | prune xcsoar.submodule/src/Widget 28 | graft xcsoar.submodule/python 29 | graft xcsoar.submodule/test/src 30 | include xcsoar.submodule/tools/GenerateSineTables.cpp 31 | 32 | # boost 33 | graft xcsoar.submodule/lib/boost/assert/include 34 | graft xcsoar.submodule/lib/boost/config/include 35 | graft xcsoar.submodule/lib/boost/core/include 36 | graft xcsoar.submodule/lib/boost/detail/include 37 | graft xcsoar.submodule/lib/boost/function_types/include 38 | graft xcsoar.submodule/lib/boost/functional/include 39 | graft xcsoar.submodule/lib/boost/integer/include 40 | graft xcsoar.submodule/lib/boost/intrusive/include 41 | graft xcsoar.submodule/lib/boost/move/include 42 | graft xcsoar.submodule/lib/boost/mpl/include 43 | graft xcsoar.submodule/lib/boost/preprocessor/include 44 | graft xcsoar.submodule/lib/boost/static_assert/include 45 | graft xcsoar.submodule/lib/boost/tti/include 46 | graft xcsoar.submodule/lib/boost/type_traits/include 47 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | $script = <