Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ampledata committed Jun 22, 2024
1 parent 5a0d3a5 commit c7c61b5
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 74 deletions.
37 changes: 10 additions & 27 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Debian package
name: Build Debian Package

on:
push:
Expand All @@ -15,36 +15,19 @@ jobs:
steps:
- uses: actions/checkout@master

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

- name: Build Debian/Apt sdist_dsc
run: |
python3 -m pip install .
rm -Rf deb_dist/*
python3 setup.py --command-packages=stdeb.command sdist_dsc
- name: Create Debian Package
run: make clean package

- name: Build Debian/Apt bdist_deb
run: |
python3 -m pip install .
export REPO_NAME=$(echo ${{ github.repository }} | awk -F"/" '{print $2}')
python3 setup.py --command-packages=stdeb.command bdist_deb
ls -al deb_dist/
cp deb_dist/python3-${REPO_NAME}_*_all.deb deb_dist/python3-${REPO_NAME}_latest_all.deb
- uses: actions/upload-artifact@master
- name: Upload Artifacts to GitHub
uses: actions/upload-artifact@master
with:
name: artifact-deb
path: |
deb_dist/*.deb
path: deb_dist/*.deb

- name: Create Release
- name: Create GitHub Release
id: create_release
uses: actions/create-release@master
env:
Expand All @@ -55,7 +38,7 @@ jobs:
draft: false
prerelease: false

- name: Upload Release Asset
- name: Upload Release Asset to GitHub
id: upload-release-asset
uses: svenstaro/upload-release-action@v2
with:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## AirCOT 3.0.0

Happy Summer Solstice


## AirCOT 2.0.0

- New for 2024!
Expand Down
53 changes: 39 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Makefile from https://github.com/snstac/pytak
# PyTAK Makefile
#
# Copyright Sensors & Signals LLC https://www.snstac.com
# Copyright Sensors & Signals LLC https://www.snstac.com/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -14,10 +14,14 @@
# limitations under the License.
#

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

all: editable
prepare:
mkdir -p build/

develop:
python3 setup.py develop
Expand All @@ -26,13 +30,13 @@ editable:
python3 -m pip install -e .

install_test_requirements:
python3 -m pip install -r requirements_test.txt
python3 -m pip install -r requirements_test.txt

install:
python3 setup.py install

uninstall:
python3 -m pip uninstall -y $(this_app)
python3 -m pip uninstall -y $(REPO_NAME)

reinstall: uninstall install

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

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

flake8: pep8

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

pylint: lint

Expand All @@ -68,11 +72,32 @@ pytest:
test: editable install_test_requirements pytest

test_cov:
pytest --cov=$(this_app) --cov-report term-missing
pytest --cov=$(REPO_NAME) --cov-report term-missing

black:
black .

mkdocs:
pip install -r docs/requirements.txt
mkdocs serve
mkdocs serve

deb_dist:
python3 setup.py --command-packages=stdeb.command sdist_dsc

deb_custom:
cp debian/$(REPO_NAME).conf $(wildcard deb_dist/*/debian)/$(REPO_NAME).default
cp debian/$(REPO_NAME).postinst $(wildcard deb_dist/*/debian)/$(REPO_NAME).postinst
cp debian/$(REPO_NAME).service $(wildcard deb_dist/*/debian)/$(REPO_NAME).service

bdist_deb: deb_dist deb_custom
cd deb_dist/$(REPO_NAME)-*/ && dpkg-buildpackage -rfakeroot -uc -us

faux_latest:
cp deb_dist/$(REPO_NAME)_*-1_all.deb deb_dist/$(REPO_NAME)_latest_all.deb
cp deb_dist/$(REPO_NAME)_*-1_all.deb deb_dist/python3-$(REPO_NAME)_latest_all.deb

package: bdist_deb faux_latest

extract:
dpkg-deb -e $(wildcard deb_dist/*latest_all.deb) deb_dist/extract
dpkg-deb -x $(wildcard deb_dist/*latest_all.deb) deb_dist/extract
16 changes: 7 additions & 9 deletions README.rst → README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
.. image:: https://pytak.readthedocs.io/en/latest/atak_screenshot_with_pytak_logo-x25.jpg
:alt: ATAK Screenshot with PyTAK Logo.
![ATAK screenshot with PyTAK logo.](https://aircot.readthedocs.io/en/latest/media/atak_screenshot_with_pytak_logo-x25.png)

Classify aircraft in TAK
************************
# Classify aircraft in TAK

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

AirCOT is used by these TAK compatible products:

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.
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.
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.
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.

`Documentation is available here. <https://aircot.rtfd.io>`_
[Documentation is available here](https://aircot.rtfd.io)

## Copyright & License

License
=======
Copyright Sensors & Signals LLC https://www.snstac.com

Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
15 changes: 4 additions & 11 deletions aircot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@
# limitations under the License.
#

"""Aircraft classifier for TAK.
"""Aircraft classifier for TAK."""

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

__version__ = "2.0.0"
__author__ = "Greg Albrecht <gba@snstac.com>"
__copyright__ = "Copyright Sensors & Signals LLC https://www.snstac.com"
__license__ = "Apache License, Version 2.0"

# Python 3.6 test/build work-around:
# COMPAT Python 3.6 test/build work-around:
try:
from .constants import ( # NOQA
LOG_FORMAT,
Expand Down Expand Up @@ -67,5 +61,4 @@
except ImportError as exc:
import warnings

warnings.warn(str(exc))
warnings.warn("ADSBCOT ignoring ImportError - Python 3.6 compat work-around.")
warnings.warn(f"COMPAT Python 3.6. Ignoring {str(exc)}")
7 changes: 2 additions & 5 deletions aircot/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# constants.py from https://github.com/snstac/aircot
#
# Copyright Sensors & Signals LLC https://www.snstac.com
#
Expand All @@ -20,10 +21,6 @@
import logging
import os

__author__ = "Greg Albrecht <gba@snstac.com>"
__copyright__ = "Copyright Sensors & Signals LLC https://www.snstac.com"
__license__ = "Apache License, Version 2.0"

LOG_LEVEL: int = logging.INFO
LOG_FORMAT: logging.Formatter = logging.Formatter(
("%(asctime)s aircot %(levelname)s - %(message)s")
Expand All @@ -43,7 +40,7 @@
DEFAULT_COT_VAL: str = "9999999.0"

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

DEFAULT_ADSB_ID_DB: str = "cotdb_indexed.json"

Expand Down
1 change: 1 addition & 0 deletions aircot/functions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# constants.py from https://github.com/snstac/aircot
#
# Copyright Sensors & Signals LLC https://www.snstac.com
#
Expand Down
Empty file added debian/aircot.conf
Empty file.
Empty file added debian/aircot.postinst
Empty file.
Empty file added debian/aircot.service
Empty file.
10 changes: 10 additions & 0 deletions debian/install_pkg_build_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

echo "Installing Debian package build dependencies"

apt-get update -qq

apt-get install -y \
python3 python3-dev python3-pip python3-venv python3-all \
dh-python debhelper devscripts dput software-properties-common \
python3-distutils python3-setuptools python3-wheel python3-stdeb
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
site_name: AirCOT - Aircraft classifiers for TAK
site_name: Aircraft classifiers for TAK
site_url: https://aircot.rtfd.io/
repo_url: https://github.com/snstac/aircot/
site_description: Software for classifying aircraft within the Team Awareness Kit (TAK) ecosystem of products.
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ project_urls =
CI: GitHub Actions = https://github.com/snstac/aircot/actions
GitHub: issues = https://github.com/snstac/aircot/issues
GitHub: repo = https://github.com/snstac/aircot
description = Software for classifying aircraft within the Team Awareness Kit (TAK) ecosystem of products.
long_description = file: README.rst
long_description_content_type = text/x-rst
description = Software for classifying aircraft within TAK.
long_description = file: README.md
long_description_content_type = text/markdown
maintainer = Greg Albrecht <oss@undef.net>
maintainer_email = oss@undef.net
license = Apache 2.0
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# setup.py from https://github.com/snstac/aircot
#
# Copyright Sensors & Signals LLC https://www.snstac.com
#
Expand All @@ -16,10 +17,7 @@
# limitations under the License.
#

"""Setup for AirCOT.
:source: <https://github.com/snstac/aircot>
"""
"""Setup for AirCOT."""

from setuptools import setup

Expand Down
3 changes: 3 additions & 0 deletions stdeb.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[DEFAULT]
Package3: aircot
Replaces3: python3-aircot

0 comments on commit c7c61b5

Please sign in to comment.