Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/NTIA/scos-sensor into deb…
Browse files Browse the repository at this point in the history
…ug_task_id_skip
  • Loading branch information
jhazentia committed Nov 20, 2024
2 parents c0aff6b + 1383e35 commit 001d826
Show file tree
Hide file tree
Showing 98 changed files with 8,887 additions and 3,690 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/github-actions-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
py:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- name: Checkout scos-sensor
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install tox-gh
run: python -m pip install tox-gh
- name: Set up test suite
Expand All @@ -50,7 +51,7 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
12 changes: 5 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
exclude: src/static/.+|.+\.pem|.+\.crt|.vscode/.+|LICENSE.md
default_language_version:
python: python3.8
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-ast
types: [file, python]
Expand All @@ -19,10 +17,10 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
rev: v3.19.0
hooks:
- id: pyupgrade
args: ["--py38-plus"]
args: ["--py39-plus"]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
Expand All @@ -31,12 +29,12 @@ repos:
types: [file, python]
args: ["--profile", "black", "--filter-files", "--gitignore"]
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.10.0
hooks:
- id: black
types: [file, python]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
rev: v0.42.0
hooks:
- id: markdownlint
types: [file, markdown]
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1054,4 +1054,5 @@ See [LICENSE](LICENSE.md).
## Contact
For technical questions about scos-sensor, contact Justin Haze, <jhaze@ntia.gov>
For technical questions about scos-sensor, contact the
[ITS Spectrum Monitoring Team](mailto:spectrummonitoring@ntia.gov).
10 changes: 5 additions & 5 deletions docker/Dockerfile-api
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ FROM $BASE_IMAGE
RUN apt-get update -q && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -qy --no-install-recommends \
libusb-1.0-0 libpython3.8 \
libusb-1.0-0 libpython3.10 \
git smartmontools \
python3-pip python3.8 python3.8-dev usbutils && \
python3-pip python3.10 python3.10-dev usbutils && \
apt-get clean && rm -rf /var/lib/apt/lists/*

ENV PYTHONUNBUFFERED 1
ENV PYTHONUNBUFFERED=1
RUN mkdir -p /src
WORKDIR /src
COPY ./src/requirements.txt /src
COPY ./src/requirements-dev.txt /src

ARG DOCKER_GIT_CREDENTIALS
RUN git config --global credential.helper store && echo "${DOCKER_GIT_CREDENTIALS}" > ~/.git-credentials
RUN python3.8 -m pip install --upgrade pip
RUN python3.10 -m pip install --upgrade pip
ARG DEBUG
RUN if [ "$DEBUG" = true ]; then python3.8 -m pip install --no-cache-dir -r requirements-dev.txt ; else python3.8 -m pip install --no-cache-dir -r requirements.txt ; fi
RUN if [ "$DEBUG" = true ]; then python3.10 -m pip install --no-cache-dir -r requirements-dev.txt ; else python3.10 -m pip install --no-cache-dir -r requirements.txt ; fi

COPY ./src /src
COPY ./gunicorn /gunicorn
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-nginx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:1.24-alpine
FROM nginx:1.26-alpine

RUN mkdir -p /var/www/scos-sensor/static
COPY --chown=nginx:nginx ./src/static/ /var/www/scos-sensor/static/
Expand Down
2 changes: 1 addition & 1 deletion entrypoints/api_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ trap cleanup_demodb SIGINT
RUNNING_MIGRATIONS="True"
export RUNNING_MIGRATIONS
echo "Starting Migrations"
python3.8 manage.py migrate
python3.10 manage.py migrate
RUNNING_MIGRATIONS="False"
echo "Starting Gunicorn"
exec gunicorn sensor.wsgi -c ../gunicorn/config.py &
Expand Down
Empty file removed mkdocs.yml
Empty file.
3 changes: 1 addition & 2 deletions src/initialization/action_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import os
import pkgutil
import shutil
from typing import Dict

from django.conf import settings
from scos_actions.actions import action_classes
Expand Down Expand Up @@ -46,7 +45,7 @@ def __new__(cls):
return cls._instance

@property
def actions(self) -> Dict[str, Action]:
def actions(self) -> dict[str, Action]:
"""
Returns all sensor actions configured in the system.
"""
Expand Down
8 changes: 4 additions & 4 deletions src/requirements-dev.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-rrequirements.txt

pre-commit>=3.0, <4.0
pytest-cov>=3.0, <4.0
pytest-django>=4.0, <5.0
ray[default]>=2.5.0
pre-commit>=4.0, <5.0
pytest-cov>=6.0, <7.0
pytest-django>=4.6, <5.0
ray[default]>=2.10.0
tox>=4.0,<5.0

# The following are sub-dependencies for which SCOS Sensor enforces a
Expand Down
Loading

0 comments on commit 001d826

Please sign in to comment.