Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Ubuntu, Python, scos-actions, and scos-tekrsa versions #299

Merged
merged 12 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/github-actions-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
py:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v4
Expand All @@ -50,7 +50,7 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
exclude: src/static/.+|.+\.pem|.+\.crt|.vscode/.+|LICENSE.md
default_language_version:
python: python3.8
python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
Expand All @@ -19,7 +19,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
rev: v3.17.0
hooks:
- id: pyupgrade
args: ["--py38-plus"]
Expand All @@ -31,7 +31,7 @@ repos:
types: [file, python]
args: ["--profile", "black", "--filter-files", "--gitignore"]
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
types: [file, python]
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).
8 changes: 4 additions & 4 deletions docker/Dockerfile-api
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ 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
Expand All @@ -17,9 +17,9 @@ 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 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
93 changes: 54 additions & 39 deletions src/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile requirements-dev.in
#
aiohappyeyeballs==2.4.0
# via aiohttp
aiohttp==3.10.2
# via
# -r requirements.txt
# aiohttp
aiohttp==3.10.3
# via
# -r requirements-dev.in
# -r requirements.txt
# aiohttp-cors
# ray
aiohttp-cors==0.7.0
Expand All @@ -23,15 +26,15 @@ asgiref==3.7.2
# -r requirements.txt
# django
async-timeout==4.0.3
# via aiohttp
# via
# -r requirements.txt
# aiohttp
attrs==23.1.0
# via
# -r requirements.txt
# aiohttp
# jsonschema
# referencing
blessed==1.20.0
# via gpustat
cachetools==5.3.2
# via
# google-auth
Expand Down Expand Up @@ -70,7 +73,7 @@ defusedxml==0.7.1
# its-preselector
distlib==0.3.7
# via virtualenv
django==3.2.25
django==4.2.15
# via
# -r requirements.txt
# django-session-timeout
Expand All @@ -80,7 +83,7 @@ django==3.2.25
# scos-actions
django-session-timeout==0.1.0
# via -r requirements.txt
djangorestframework==3.14.0
djangorestframework==3.15.2
# via
# -r requirements.txt
# drf-yasg
Expand Down Expand Up @@ -111,8 +114,6 @@ google-auth==2.24.0
# via google-api-core
googleapis-common-protos==1.61.0
# via google-api-core
gpustat==1.1.1
# via ray
grpcio==1.59.3
# via
# -r requirements.txt
Expand All @@ -126,11 +127,6 @@ idna==3.7
# -r requirements.txt
# requests
# yarl
importlib-resources==6.4.5
# via
# -r requirements.txt
# jsonschema
# jsonschema-specifications
inflection==0.5.1
# via
# -r requirements.txt
Expand All @@ -141,6 +137,8 @@ its-preselector @ git+https://github.com/NTIA/Preselector@3.1.0
# via
# -r requirements.txt
# scos-actions
jinja2==3.1.4
# via memray
jsonfield==3.1.0
# via -r requirements.txt
jsonschema==4.20.0
Expand All @@ -151,10 +149,25 @@ jsonschema-specifications==2023.11.2
# via
# -r requirements.txt
# jsonschema
linkify-it-py==2.0.3
# via markdown-it-py
markdown-it-py[linkify,plugins]==3.0.0
# via
# mdit-py-plugins
# rich
# textual
markupsafe==2.1.5
# via jinja2
marshmallow==3.20.1
# via
# -r requirements.txt
# environs
mdit-py-plugins==0.4.2
# via markdown-it-py
mdurl==0.1.2
# via markdown-it-py
memray==1.14.0
# via ray
msgpack==1.0.7
# via
# -r requirements.txt
Expand All @@ -163,27 +176,25 @@ msgspec==0.18.4
# via
# -r requirements.txt
# scos-actions
multidict==6.0.4
multidict==6.0.5
# via
# -r requirements.txt
# aiohttp
# yarl
nodeenv==1.8.0
# via pre-commit
numexpr==2.8.6
numexpr==2.10.1
# via
# -r requirements.txt
# scos-actions
numpy==1.24.4
numpy==1.26.4
# via
# -r requirements.txt
# numexpr
# ray
# scipy
# scos-actions
# sigmf
# tekrsa-api-wrap
nvidia-ml-py==12.535.133
# via gpustat
opencensus==0.11.3
# via ray
opencensus-context==0.1.3
Expand All @@ -198,12 +209,9 @@ packaging==23.2
# pytest
# ray
# tox
pkgutil-resolve-name==1.3.10
# via
# -r requirements.txt
# jsonschema
platformdirs==3.11.0
# via
# textual
# tox
# virtualenv
pluggy==1.3.0
Expand All @@ -223,7 +231,6 @@ protobuf==4.25.1
psutil==5.9.6
# via
# -r requirements.txt
# gpustat
# scos-actions
psycopg2-binary==2.9.9
# via -r requirements.txt
Expand All @@ -241,6 +248,8 @@ pycparser==2.21
# cffi
pydantic==1.10.13
# via ray
pygments==2.18.0
# via rich
pyproject-api==1.5.4
# via tox
pytest==7.4.3
Expand All @@ -262,16 +271,14 @@ python-dotenv==1.0.0
pytz==2023.3.post1
# via
# -r requirements.txt
# django
# djangorestframework
# drf-yasg
pyyaml==6.0.1
# via
# -r requirements.txt
# drf-yasg
# pre-commit
# ray
ray[default]==2.6.3
ray[default]==2.37.0
# via
# -r requirements-dev.in
# -r requirements.txt
Expand All @@ -281,7 +288,7 @@ referencing==0.31.1
# -r requirements.txt
# jsonschema
# jsonschema-specifications
requests==2.31.0
requests==2.32.3
# via
# -r requirements.txt
# google-api-core
Expand All @@ -290,6 +297,10 @@ requests==2.31.0
# requests-mock
requests-mock==1.11.0
# via -r requirements.txt
rich==13.8.1
# via
# memray
# textual
rpds-py==0.13.2
# via
# -r requirements.txt
Expand All @@ -305,15 +316,15 @@ ruamel-yaml-clib==0.2.8
# via
# -r requirements.txt
# ruamel-yaml
scipy==1.10.1
scipy==1.13.1
# via
# -r requirements.txt
# scos-actions
scos-actions @ git+https://github.com/NTIA/scos-actions@10.0.2
scos-actions @ git+https://github.com/NTIA/scos-actions@11.0.0
# via
# -r requirements.txt
# scos-tekrsa
scos-tekrsa @ git+https://github.com/NTIA/scos-tekrsa@7.0.1
scos-tekrsa @ git+https://github.com/NTIA/scos-tekrsa@8.0.0
# via -r requirements.txt
sigmf @ git+https://github.com/NTIA/SigMF@multi-recording-archive
# via
Expand All @@ -322,7 +333,6 @@ sigmf @ git+https://github.com/NTIA/SigMF@multi-recording-archive
six==1.16.0
# via
# -r requirements.txt
# blessed
# django-session-timeout
# python-dateutil
# requests-mock
Expand All @@ -337,6 +347,8 @@ tekrsa-api-wrap==1.3.3
# via
# -r requirements.txt
# scos-tekrsa
textual==0.81.0
# via memray
tomli==2.0.1
# via
# coverage
Expand All @@ -350,6 +362,11 @@ typing-extensions==4.8.0
# -r requirements.txt
# asgiref
# pydantic
# textual
tzdata==2024.1
# via -r requirements.txt
uc-micro-py==1.0.3
# via linkify-it-py
uritemplate==4.1.1
# via
# -r requirements.txt
Expand All @@ -363,14 +380,12 @@ virtualenv==20.21.0
# pre-commit
# ray
# tox
wcwidth==0.2.12
# via blessed
yarl==1.9.4
# via aiohttp
zipp==3.19.1
# via
# -r requirements.txt
# importlib-resources
# aiohttp
zipp==3.19.1
# via -r requirements.txt

# The following packages are considered to be unsafe in a requirements file:
# setuptools
9 changes: 6 additions & 3 deletions src/requirements.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cryptography>=43.0.1
django>=3.2.25, <4.0
djangorestframework>=3.0, <4.0
django>=4.2, <5.0
djangorestframework>=3.15.2, <4.0
django-session-timeout>=0.1, <1.0
drf-yasg>=1.0, <2.0
environs>=9.0, <10.0
Expand All @@ -9,12 +9,15 @@ gunicorn>=22.0, <23.0
jsonfield>=3.0, <4.0
packaging>=23.0, <24.0
psycopg2-binary>=2.0, <3.0
tzdata # https://code.djangoproject.com/ticket/33814
requests>=2.32.0
requests-mock>=1.0, <2.0
scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@7.0.1
scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@8.0.0

# The following are sub-dependencies for which SCOS Sensor enforces a
# higher minimum patch version than the dependencies which require them.
# This is done to ensure the inclusion of specific security patches.
aiohttp>=3.10.2 # CVE-2024-42367
certifi>=2024.7.4 # CVE-2024-39689
idna>=3.7 # CVE-2024-3651
grpcio>=1.53.0 # CVE-2023-32732, CVE-2023-32731, CVE-2023-1428
Expand Down
Loading
Loading