Skip to content

Commit c7c61b5

Browse files
committed
updates
1 parent 5a0d3a5 commit c7c61b5

16 files changed

+87
-74
lines changed

.github/workflows/debian.yml

+10-27
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Debian package
1+
name: Build Debian Package
22

33
on:
44
push:
@@ -15,36 +15,19 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@master
1717

18-
- name: Install packaging dependencies
19-
run: |
20-
sudo apt-get update -qq
21-
sudo apt-get install -y \
22-
python3 python3-dev python3-pip python3-venv python3-all \
23-
dh-python debhelper devscripts dput software-properties-common \
24-
python3-distutils python3-setuptools python3-wheel python3-stdeb \
25-
python3-all
18+
- name: Install Debian Package Building Dependencies
19+
run: sudo bash debian/install_pkg_build_deps.sh
2620

27-
- name: Build Debian/Apt sdist_dsc
28-
run: |
29-
python3 -m pip install .
30-
rm -Rf deb_dist/*
31-
python3 setup.py --command-packages=stdeb.command sdist_dsc
21+
- name: Create Debian Package
22+
run: make clean package
3223

33-
- name: Build Debian/Apt bdist_deb
34-
run: |
35-
python3 -m pip install .
36-
export REPO_NAME=$(echo ${{ github.repository }} | awk -F"/" '{print $2}')
37-
python3 setup.py --command-packages=stdeb.command bdist_deb
38-
ls -al deb_dist/
39-
cp deb_dist/python3-${REPO_NAME}_*_all.deb deb_dist/python3-${REPO_NAME}_latest_all.deb
40-
41-
- uses: actions/upload-artifact@master
24+
- name: Upload Artifacts to GitHub
25+
uses: actions/upload-artifact@master
4226
with:
4327
name: artifact-deb
44-
path: |
45-
deb_dist/*.deb
28+
path: deb_dist/*.deb
4629

47-
- name: Create Release
30+
- name: Create GitHub Release
4831
id: create_release
4932
uses: actions/create-release@master
5033
env:
@@ -55,7 +38,7 @@ jobs:
5538
draft: false
5639
prerelease: false
5740

58-
- name: Upload Release Asset
41+
- name: Upload Release Asset to GitHub
5942
id: upload-release-asset
6043
uses: svenstaro/upload-release-action@v2
6144
with:

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## AirCOT 3.0.0
2+
3+
Happy Summer Solstice
4+
5+
16
## AirCOT 2.0.0
27

38
- New for 2024!

Makefile

+39-14
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
# Makefile from https://github.com/snstac/pytak
2+
# PyTAK Makefile
13
#
2-
# Copyright Sensors & Signals LLC https://www.snstac.com
4+
# Copyright Sensors & Signals LLC https://www.snstac.com/
35
#
46
# Licensed under the Apache License, Version 2.0 (the "License");
57
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
7-
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
8+
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
99
#
1010
# Unless required by applicable law or agreed to in writing, software
1111
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,10 +14,14 @@
1414
# limitations under the License.
1515
#
1616

17-
this_app = aircot
18-
.DEFAULT_GOAL := all
17+
REPO_NAME ?= $(shell echo $(wildcard */__init__.py) | awk -F'/' '{print $$1}')
18+
SHELL := /bin/bash
19+
.DEFAULT_GOAL := editable
20+
# postinst = $(wildcard debian/*.postinst.sh)
21+
# service = $(wildcard debian/*.service)
1922

20-
all: editable
23+
prepare:
24+
mkdir -p build/
2125

2226
develop:
2327
python3 setup.py develop
@@ -26,13 +30,13 @@ editable:
2630
python3 -m pip install -e .
2731

2832
install_test_requirements:
29-
python3 -m pip install -r requirements_test.txt
33+
python3 -m pip install -r requirements_test.txt
3034

3135
install:
3236
python3 setup.py install
3337

3438
uninstall:
35-
python3 -m pip uninstall -y $(this_app)
39+
python3 -m pip uninstall -y $(REPO_NAME)
3640

3741
reinstall: uninstall install
3842

@@ -43,16 +47,16 @@ clean:
4347
@rm -rf *.egg* build dist *.py[oc] */*.py[co] cover doctest_pypi.cfg \
4448
nosetests.xml pylint.log output.xml flake8.log tests.log \
4549
test-result.xml htmlcov fab.log .coverage __pycache__ \
46-
*/__pycache__
50+
*/__pycache__ deb_dist .mypy_cache
4751

4852
pep8:
49-
flake8 --max-line-length=88 --extend-ignore=E203 --exit-zero $(this_app)/*.py
53+
flake8 --max-line-length=88 --extend-ignore=E203 --exit-zero $(REPO_NAME)/*.py
5054

5155
flake8: pep8
5256

5357
lint:
5458
pylint --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" \
55-
--max-line-length=88 -r n $(this_app)/*.py || exit 0
59+
--max-line-length=88 -r n $(REPO_NAME)/*.py || exit 0
5660

5761
pylint: lint
5862

@@ -68,11 +72,32 @@ pytest:
6872
test: editable install_test_requirements pytest
6973

7074
test_cov:
71-
pytest --cov=$(this_app) --cov-report term-missing
75+
pytest --cov=$(REPO_NAME) --cov-report term-missing
7276

7377
black:
7478
black .
7579

7680
mkdocs:
7781
pip install -r docs/requirements.txt
78-
mkdocs serve
82+
mkdocs serve
83+
84+
deb_dist:
85+
python3 setup.py --command-packages=stdeb.command sdist_dsc
86+
87+
deb_custom:
88+
cp debian/$(REPO_NAME).conf $(wildcard deb_dist/*/debian)/$(REPO_NAME).default
89+
cp debian/$(REPO_NAME).postinst $(wildcard deb_dist/*/debian)/$(REPO_NAME).postinst
90+
cp debian/$(REPO_NAME).service $(wildcard deb_dist/*/debian)/$(REPO_NAME).service
91+
92+
bdist_deb: deb_dist deb_custom
93+
cd deb_dist/$(REPO_NAME)-*/ && dpkg-buildpackage -rfakeroot -uc -us
94+
95+
faux_latest:
96+
cp deb_dist/$(REPO_NAME)_*-1_all.deb deb_dist/$(REPO_NAME)_latest_all.deb
97+
cp deb_dist/$(REPO_NAME)_*-1_all.deb deb_dist/python3-$(REPO_NAME)_latest_all.deb
98+
99+
package: bdist_deb faux_latest
100+
101+
extract:
102+
dpkg-deb -e $(wildcard deb_dist/*latest_all.deb) deb_dist/extract
103+
dpkg-deb -x $(wildcard deb_dist/*latest_all.deb) deb_dist/extract

README.rst README.md

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
.. image:: https://pytak.readthedocs.io/en/latest/atak_screenshot_with_pytak_logo-x25.jpg
2-
:alt: ATAK Screenshot with PyTAK Logo.
1+
![ATAK screenshot with PyTAK logo.](https://aircot.readthedocs.io/en/latest/media/atak_screenshot_with_pytak_logo-x25.png)
32

4-
Classify aircraft in TAK
5-
************************
3+
# Classify aircraft in TAK
64

75
AirCOT is software for classifying aircraft within the Team Awareness Kit (TAK) ecosystem of products.
86

97
AirCOT is used by these TAK compatible products:
108

11-
1. `adsbcot <https://github.com/snstac/adsbcot>`_: ADSBCOT is software for monitoring and analyzing aviation surveillance data via the Team Awareness Kit (TAK) ecosystem of products.
12-
2. `AirTAK <https://www.snstac.com/airtak>`_: AirTAK is a low SWaP-C device for monitoring and analyzing aviation surveillance data via the Team Awareness Kit (TAK) ecosystem of products.
9+
1. [ADSBCOT](https://github.com/snstac/adsbcot) is software for monitoring and analyzing aviation surveillance data via the Team Awareness Kit (TAK) ecosystem of products.
10+
2. [AirTAK](https://www.snstac.com/airtak) is a low SWaP-C device for monitoring and analyzing aviation surveillance data via the Team Awareness Kit (TAK) ecosystem of products.
1311

14-
`Documentation is available here. <https://aircot.rtfd.io>`_
12+
[Documentation is available here](https://aircot.rtfd.io)
13+
14+
## Copyright & License
1515

16-
License
17-
=======
1816
Copyright Sensors & Signals LLC https://www.snstac.com
1917

2018
Licensed under the Apache License, Version 2.0 (the "License");

aircot/__init__.py

+4-11
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,11 @@
1616
# limitations under the License.
1717
#
1818

19-
"""Aircraft classifier for TAK.
19+
"""Aircraft classifier for TAK."""
2020

21-
:source: <https://github.com/snstac/aircot>
22-
"""
21+
__version__ = "3.0.0-beta1"
2322

24-
__version__ = "2.0.0"
25-
__author__ = "Greg Albrecht <[email protected]>"
26-
__copyright__ = "Copyright Sensors & Signals LLC https://www.snstac.com"
27-
__license__ = "Apache License, Version 2.0"
28-
29-
# Python 3.6 test/build work-around:
23+
# COMPAT Python 3.6 test/build work-around:
3024
try:
3125
from .constants import ( # NOQA
3226
LOG_FORMAT,
@@ -67,5 +61,4 @@
6761
except ImportError as exc:
6862
import warnings
6963

70-
warnings.warn(str(exc))
71-
warnings.warn("ADSBCOT ignoring ImportError - Python 3.6 compat work-around.")
64+
warnings.warn(f"COMPAT Python 3.6. Ignoring {str(exc)}")

aircot/constants.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
3+
# constants.py from https://github.com/snstac/aircot
34
#
45
# Copyright Sensors & Signals LLC https://www.snstac.com
56
#
@@ -20,10 +21,6 @@
2021
import logging
2122
import os
2223

23-
__author__ = "Greg Albrecht <[email protected]>"
24-
__copyright__ = "Copyright Sensors & Signals LLC https://www.snstac.com"
25-
__license__ = "Apache License, Version 2.0"
26-
2724
LOG_LEVEL: int = logging.INFO
2825
LOG_FORMAT: logging.Formatter = logging.Formatter(
2926
("%(asctime)s aircot %(levelname)s - %(message)s")
@@ -43,7 +40,7 @@
4340
DEFAULT_COT_VAL: str = "9999999.0"
4441

4542
W3C_XML_DATETIME: str = "%Y-%m-%dT%H:%M:%S.%fZ"
46-
ISO_8601_UTC = W3C_XML_DATETIME # Issue 51: Not technically correct.
43+
ISO_8601_UTC: str = "%Y-%m-%dT%H:%M:%SZ"
4744

4845
DEFAULT_ADSB_ID_DB: str = "cotdb_indexed.json"
4946

aircot/functions.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
3+
# constants.py from https://github.com/snstac/aircot
34
#
45
# Copyright Sensors & Signals LLC https://www.snstac.com
56
#

debian/aircot.conf

Whitespace-only changes.

debian/aircot.postinst

Whitespace-only changes.

debian/aircot.service

Whitespace-only changes.

debian/install_pkg_build_deps.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
echo "Installing Debian package build dependencies"
4+
5+
apt-get update -qq
6+
7+
apt-get install -y \
8+
python3 python3-dev python3-pip python3-venv python3-all \
9+
dh-python debhelper devscripts dput software-properties-common \
10+
python3-distutils python3-setuptools python3-wheel python3-stdeb

mkdocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
site_name: AirCOT - Aircraft classifiers for TAK
1+
site_name: Aircraft classifiers for TAK
22
site_url: https://aircot.rtfd.io/
33
repo_url: https://github.com/snstac/aircot/
44
site_description: Software for classifying aircraft within the Team Awareness Kit (TAK) ecosystem of products.

setup.cfg

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ project_urls =
2323
CI: GitHub Actions = https://github.com/snstac/aircot/actions
2424
GitHub: issues = https://github.com/snstac/aircot/issues
2525
GitHub: repo = https://github.com/snstac/aircot
26-
description = Software for classifying aircraft within the Team Awareness Kit (TAK) ecosystem of products.
27-
long_description = file: README.rst
28-
long_description_content_type = text/x-rst
26+
description = Software for classifying aircraft within TAK.
27+
long_description = file: README.md
28+
long_description_content_type = text/markdown
2929
maintainer = Greg Albrecht <[email protected]>
3030
maintainer_email = [email protected]
3131
license = Apache 2.0

setup.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
3+
# setup.py from https://github.com/snstac/aircot
34
#
45
# Copyright Sensors & Signals LLC https://www.snstac.com
56
#
@@ -16,10 +17,7 @@
1617
# limitations under the License.
1718
#
1819

19-
"""Setup for AirCOT.
20-
21-
:source: <https://github.com/snstac/aircot>
22-
"""
20+
"""Setup for AirCOT."""
2321

2422
from setuptools import setup
2523

stdeb.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[DEFAULT]
2+
Package3: aircot
3+
Replaces3: python3-aircot

0 commit comments

Comments
 (0)