From 6b41fc652415a097dbbeea985968fd1ee3571e7e Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Mon, 10 Jan 2022 13:22:07 -0700 Subject: [PATCH 01/12] use pip-tools, minimize requirements.txt for scos-sensor compatibility --- README.md | 33 ++++++++- requirements-dev.in | 8 +++ requirements-dev.txt | 158 ++++++++++++++++++++++++++++++++++++------- requirements.in | 4 ++ requirements.txt | 48 +++++++++++-- 5 files changed, 220 insertions(+), 31 deletions(-) create mode 100644 requirements-dev.in create mode 100644 requirements.in diff --git a/README.md b/README.md index f7c70eb..0b20254 100644 --- a/README.md +++ b/README.md @@ -63,13 +63,44 @@ using a tool such a `conda` or `venv`. The following commands create a virtual environment using `venv` and install the required dependencies for development and testing. -```python +```bash python3 -m venv ./venv source venv/bin/activate python3 -m pip install --upgrade pip # upgrade to pip>=18.1 python3 -m pip install -r requirements-dev.txt ``` +The requirements.txt file is intended for dependencies needed for installation into +scos-sensor. It does not include dependencies already in scos-sensor. + +#### Using pip-tools + +Run the following the virtual environment to install pip-tools. + +```bash +python -m pip install pip-tools +``` + +To update requirements.txt after modifying requirements.in: + +```bash +pip-compile requirements.in +``` + +To update requirements-dev.txt after modifying requirements.in or requirements-dev.in: + +```bash +pip-compile requirements-dev.in +``` + +Use pip-sync to match virtual environment to requirements-dev.txt: + +```bash +pip-sync requirements.txt requirements-dev.txt +``` + +For more information about pip-tools, see + ### Running Tests Since the UHD drivers are required, a docker container is used for testing. [Install diff --git a/requirements-dev.in b/requirements-dev.in new file mode 100644 index 0000000..caa281b --- /dev/null +++ b/requirements-dev.in @@ -0,0 +1,8 @@ +-rrequirements.txt + +black~=19.10b0 +Django~=3.1.13 +environs~=7.3.1 +packaging==20.4 +pre-commit~=2.9.2 +pytest~=5.4.1 diff --git a/requirements-dev.txt b/requirements-dev.txt index fb71200..3edceac 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,29 +1,141 @@ --rrequirements.txt - +# +# This file is autogenerated by pip-compile with python 3.6 +# To update, run: +# +# pip-compile requirements-dev.in +# appdirs==1.4.4 -attrs==20.2.0 + # via black +asgiref==3.4.1 + # via + # -r requirements.txt + # django + # scos-actions +attrs==21.4.0 + # via + # black + # pytest black==19.10b0 -cfgv==3.2.0 -click==7.1.2 -distlib==0.3.1 -filelock==3.0.12 -identify==1.5.5 -importlib-metadata==2.0.0 -importlib-resources==3.0.0 -more-itertools==8.5.0 -nodeenv==1.5.0 + # via -r requirements-dev.in +cfgv==3.3.1 + # via pre-commit +click==8.0.3 + # via black +distlib==0.3.4 + # via virtualenv +django==3.1.14 + # via + # -r requirements-dev.in + # -r requirements.txt + # scos-actions +environs==7.3.1 + # via -r requirements-dev.in +filelock==3.4.1 + # via virtualenv +identify==2.4.2 + # via pre-commit +importlib-metadata==4.8.3 + # via + # click + # pluggy + # pre-commit + # pytest + # virtualenv +importlib-resources==5.4.0 + # via + # pre-commit + # virtualenv +marshmallow==3.14.1 + # via environs +more-itertools==8.12.0 + # via pytest +nodeenv==1.6.0 + # via pre-commit +numpy==1.18.5 + # via + # -r requirements.txt + # scipy + # scos-actions packaging==20.4 -pathspec==0.8.0 + # via + # -r requirements-dev.in + # pytest +pathspec==0.9.0 + # via black +platformdirs==2.4.0 + # via virtualenv pluggy==0.13.1 -pre-commit==2.6.0 -py==1.9.0 -pyparsing==2.4.7 -pytest==5.4.1 -PyYAML==5.4 -regex==2020.9.27 + # via pytest +pre-commit==2.9.3 + # via -r requirements-dev.in +py==1.11.0 + # via pytest +pyparsing==3.0.6 + # via packaging +pytest==5.4.3 + # via -r requirements-dev.in +python-dateutil==2.8.1 + # via + # -r requirements.txt + # scos-actions +python-dotenv==0.19.2 + # via environs +pytz==2020.1 + # via + # -r requirements.txt + # django + # scos-actions +pyyaml==6.0 + # via pre-commit +regex==2021.11.10 + # via black +ruamel.yaml==0.16.10 + # via + # -r requirements.txt + # scos-actions +ruamel.yaml.clib==0.2.0 + # via + # -r requirements.txt + # ruamel.yaml + # scos-actions +scipy==1.4.1 + # via + # -r requirements.txt + # scos-actions +scos-actions @ git+https://github.com/NTIA/scos-actions@bug_fix + # via -r requirements.txt +sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive + # via + # -r requirements.txt + # scos-actions six==1.15.0 -toml==0.10.1 -typed-ast==1.4.1 -virtualenv==20.0.33 + # via + # -r requirements.txt + # packaging + # python-dateutil + # scos-actions + # virtualenv +sqlparse==0.3.1 + # via + # -r requirements.txt + # django + # scos-actions +toml==0.10.2 + # via + # black + # pre-commit +typed-ast==1.5.1 + # via black +typing-extensions==4.0.1 + # via + # -r requirements.txt + # asgiref + # importlib-metadata +virtualenv==20.13.0 + # via pre-commit wcwidth==0.2.5 -zipp==3.3.0 + # via pytest +zipp==3.6.0 + # via + # importlib-metadata + # importlib-resources diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000..25730b9 --- /dev/null +++ b/requirements.in @@ -0,0 +1,4 @@ +# for use with scos-sensor +numpy==1.18.5 +scipy==1.4.1 +scos_actions @ git+https://github.com/NTIA/scos-actions@bug_fix#egg=scos_actions diff --git a/requirements.txt b/requirements.txt index 9d20f55..d0dbca3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,49 @@ -asgiref==3.2.10 -Django==3.0.12 -environs==7.3.1 -marshmallow==3.8.0 +# +# This file is autogenerated by pip-compile with python 3.6 +# To update, run: +# +# pip-compile requirements.in +# +asgiref==3.4.1 + # via + # django + # scos-actions +django==3.1.14 + # via scos-actions numpy==1.18.5 + # via + # -r requirements.in + # scipy + # scos-actions + # sigmf python-dateutil==2.8.1 -python-dotenv==0.14.0 + # via scos-actions pytz==2020.1 + # via + # django + # scos-actions ruamel.yaml==0.16.10 + # via scos-actions ruamel.yaml.clib==0.2.0 + # via + # ruamel.yaml + # scos-actions scipy==1.4.1 -scos_actions @ git+https://github.com/NTIA/scos-actions@master#egg=scos_actions -SigMF @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive#egg=SigMF-0.0.2beta + # via + # -r requirements.in + # scos-actions +scos-actions @ git+https://github.com/NTIA/scos-actions@bug_fix + # via -r requirements.in +sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive + # via scos-actions six==1.15.0 + # via + # python-dateutil + # scos-actions + # sigmf sqlparse==0.3.1 + # via + # django + # scos-actions +typing-extensions==4.0.1 + # via asgiref From a5e2096074bdb4d2ad85d94e92c4df66bc371584 Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Thu, 3 Feb 2022 13:22:00 -0700 Subject: [PATCH 02/12] python 3.7 updates, readme updates --- .pre-commit-config.yaml | 19 ++++++++++--------- README.md | 9 +++++++-- docker/Dockerfile-test | 10 +++++----- docker/Dockerfile-uhd | 6 +++--- requirements-dev.in | 2 +- requirements-dev.txt | 37 ++++++++----------------------------- requirements.in | 2 -- requirements.txt | 27 +++------------------------ setup.py | 2 +- 9 files changed, 38 insertions(+), 76 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 43082b4..0662ee9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,20 +11,21 @@ repos: rev: v1.9.1 hooks: - id: seed-isort-config - language_version: python3.6 + language_version: python3.7 - repo: https://github.com/pre-commit/mirrors-isort rev: v4.3.20 hooks: - id: isort - language_version: python3.6 + language_version: python3.7 - repo: https://github.com/ambv/black rev: stable hooks: - id: black - language_version: python3.6 - - repo: https://github.com/markdownlint/markdownlint - rev: v0.9.0 - hooks: - - id: markdownlint - args: [-s, .ml_style.rb, README.md] - exclude: GitHubRepoPublicReleaseApproval.md|LICENSE.md + language_version: python3.7 + # TODO markdownlint broken + # - repo: https://github.com/markdownlint/markdownlint + # rev: v0.9.0 + # hooks: + # - id: markdownlint + # args: [-s, .ml_style.rb, README.md] + # exclude: GitHubRepoPublicReleaseApproval.md|LICENSE.md diff --git a/README.md b/README.md index 0b20254..9b89954 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Below are steps to run scos-sensor with the scos-usrp plugin: ### Requirements and Configuration Requires pip>=18.1 (upgrade using `python3 -m pip install --upgrade pip`) and -python>=3.6. +python>=3.7. It is highly recommended that you first initialize a virtual development environment using a tool such a `conda` or `venv`. The following commands create a virtual @@ -75,7 +75,12 @@ scos-sensor. It does not include dependencies already in scos-sensor. #### Using pip-tools -Run the following the virtual environment to install pip-tools. +It is recommended to keep direct dependencies in a separate file. The direct +dependencies are in the requirements.in and requirements-dev.in files. Then pip-tools +can be used to generate files with all the dependencies and transitive dependencies +(sub-dependencies). The files containing all the dependencies are in requirements.txt +and requirements-dev.txt. Run the following in the virtual environment to install +pip-tools. ```bash python -m pip install pip-tools diff --git a/docker/Dockerfile-test b/docker/Dockerfile-test index 24db24e..97a9009 100644 --- a/docker/Dockerfile-test +++ b/docker/Dockerfile-test @@ -6,10 +6,10 @@ RUN apt-get update -q && \ libboost-date-time1.65.1 libboost-filesystem1.65.1 \ libboost-python1.65.1 libboost-regex1.65.1 \ libboost-serialization1.65.1 libboost-system1.65.1 \ - libboost-thread1.65.1 libusb-1.0-0 libpython3.6 \ + libboost-thread1.65.1 libusb-1.0-0 libpython3.7 \ libboost-program-options1.65.1 \ - git python3-setuptools python3-pip python3-numpy \ - swig gcc python3-dev && \ + git python3.7 \ + swig gcc python3.7-dev && \ apt-get clean && rm -rf /var/lib/apt/lists/* ENV PYTHONUNBUFFERED 1 @@ -18,7 +18,7 @@ WORKDIR /src COPY ./ /src ARG DOCKER_GIT_CREDENTIALS -RUN python3 -m pip install --upgrade pip -RUN pip3 install --no-cache-dir -r requirements-dev.txt +RUN python3.7 -m pip install --upgrade pip +RUN python3.7 -m pip install --no-cache-dir -r requirements-dev.txt ENTRYPOINT ["pytest"] diff --git a/docker/Dockerfile-uhd b/docker/Dockerfile-uhd index b9051d6..b941bb1 100644 --- a/docker/Dockerfile-uhd +++ b/docker/Dockerfile-uhd @@ -38,8 +38,8 @@ RUN apt-get update -q && \ libboost-python1.65.1 libboost-regex1.65.1 \ libboost-serialization1.65.1 libboost-system1.65.1 \ libboost-thread1.65.1 libboost-program-options1.65.1 \ - libusb-1.0-0 libpython3.6 python3-setuptools python3-pip \ - python3-numpy && \ + libusb-1.0-0 libpython3.7 \ + && \ apt-get clean && rm -rf /var/lib/apt/lists/* -CMD /usr/bin/python3 +CMD /usr/bin/python3.7 diff --git a/requirements-dev.in b/requirements-dev.in index caa281b..4cf7196 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -4,5 +4,5 @@ black~=19.10b0 Django~=3.1.13 environs~=7.3.1 packaging==20.4 -pre-commit~=2.9.2 +pre-commit~=2.17.0 pytest~=5.4.1 diff --git a/requirements-dev.txt b/requirements-dev.txt index 3edceac..82a77bb 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with python 3.6 +# This file is autogenerated by pip-compile with python 3.7 # To update, run: # # pip-compile requirements-dev.in @@ -7,10 +7,7 @@ appdirs==1.4.4 # via black asgiref==3.4.1 - # via - # -r requirements.txt - # django - # scos-actions + # via django attrs==21.4.0 # via # black @@ -24,10 +21,7 @@ click==8.0.3 distlib==0.3.4 # via virtualenv django==3.1.14 - # via - # -r requirements-dev.in - # -r requirements.txt - # scos-actions + # via -r requirements-dev.in environs==7.3.1 # via -r requirements-dev.in filelock==3.4.1 @@ -41,10 +35,6 @@ importlib-metadata==4.8.3 # pre-commit # pytest # virtualenv -importlib-resources==5.4.0 - # via - # pre-commit - # virtualenv marshmallow==3.14.1 # via environs more-itertools==8.12.0 @@ -55,7 +45,6 @@ numpy==1.18.5 # via # -r requirements.txt # scipy - # scos-actions packaging==20.4 # via # -r requirements-dev.in @@ -66,7 +55,7 @@ platformdirs==2.4.0 # via virtualenv pluggy==0.13.1 # via pytest -pre-commit==2.9.3 +pre-commit==2.17.0 # via -r requirements-dev.in py==1.11.0 # via pytest @@ -81,10 +70,7 @@ python-dateutil==2.8.1 python-dotenv==0.19.2 # via environs pytz==2020.1 - # via - # -r requirements.txt - # django - # scos-actions + # via django pyyaml==6.0 # via pre-commit regex==2021.11.10 @@ -98,7 +84,7 @@ ruamel.yaml.clib==0.2.0 # -r requirements.txt # ruamel.yaml # scos-actions -scipy==1.4.1 +scipy==1.7.3 # via # -r requirements.txt # scos-actions @@ -113,13 +99,9 @@ six==1.15.0 # -r requirements.txt # packaging # python-dateutil - # scos-actions # virtualenv sqlparse==0.3.1 - # via - # -r requirements.txt - # django - # scos-actions + # via django toml==0.10.2 # via # black @@ -128,7 +110,6 @@ typed-ast==1.5.1 # via black typing-extensions==4.0.1 # via - # -r requirements.txt # asgiref # importlib-metadata virtualenv==20.13.0 @@ -136,6 +117,4 @@ virtualenv==20.13.0 wcwidth==0.2.5 # via pytest zipp==3.6.0 - # via - # importlib-metadata - # importlib-resources + # via importlib-metadata diff --git a/requirements.in b/requirements.in index 25730b9..a2c5d84 100644 --- a/requirements.in +++ b/requirements.in @@ -1,4 +1,2 @@ # for use with scos-sensor -numpy==1.18.5 -scipy==1.4.1 scos_actions @ git+https://github.com/NTIA/scos-actions@bug_fix#egg=scos_actions diff --git a/requirements.txt b/requirements.txt index d0dbca3..d2a36aa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,37 +1,23 @@ # -# This file is autogenerated by pip-compile with python 3.6 +# This file is autogenerated by pip-compile with python 3.7 # To update, run: # # pip-compile requirements.in # -asgiref==3.4.1 - # via - # django - # scos-actions -django==3.1.14 - # via scos-actions numpy==1.18.5 # via - # -r requirements.in # scipy - # scos-actions # sigmf python-dateutil==2.8.1 # via scos-actions -pytz==2020.1 - # via - # django - # scos-actions ruamel.yaml==0.16.10 # via scos-actions ruamel.yaml.clib==0.2.0 # via # ruamel.yaml # scos-actions -scipy==1.4.1 - # via - # -r requirements.in - # scos-actions +scipy==1.7.3 + # via scos-actions scos-actions @ git+https://github.com/NTIA/scos-actions@bug_fix # via -r requirements.in sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive @@ -39,11 +25,4 @@ sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive six==1.15.0 # via # python-dateutil - # scos-actions # sigmf -sqlparse==0.3.1 - # via - # django - # scos-actions -typing-extensions==4.0.1 - # via asgiref diff --git a/setup.py b/setup.py index 3d9f87e..d3ddf48 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ # "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], - python_requires=">=3.6", + python_requires=">=3.7", install_requires=install_requires, package_data={"scos_usrp": ["configs/*.example", "configs/actions/*.yml"]}, ) From 3d45c1680d457e4595655c54f250ceb09cb00704 Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Thu, 3 Feb 2022 13:27:06 -0700 Subject: [PATCH 03/12] updated interfaces, add height, autoformatting updates --- scos_usrp/hardware/gps_iface.py | 7 ++- scos_usrp/hardware/tests/resources/utils.py | 4 +- scos_usrp/hardware/tests/test_calibration.py | 62 ++++++++++---------- scos_usrp/hardware/tests/test_gps.py | 9 ++- scos_usrp/hardware/tests/test_usrp.py | 2 +- scos_usrp/hardware/usrp_radio.py | 36 ++++++------ 6 files changed, 62 insertions(+), 58 deletions(-) diff --git a/scos_usrp/hardware/gps_iface.py b/scos_usrp/hardware/gps_iface.py index cc8d44e..c41f9ad 100644 --- a/scos_usrp/hardware/gps_iface.py +++ b/scos_usrp/hardware/gps_iface.py @@ -14,7 +14,7 @@ class USRPLocation(GPSInterface): def __init__(self, radio): self.radio = radio - def get_lat_long(self, timeout_s=1): + def get_location(self, timeout_s=1): """Use low-level UHD and USRP block methods to sync with GPS.""" if not self.radio.is_available: @@ -114,6 +114,9 @@ def get_lat_long(self, timeout_s=1): longitude_degs = int(longitude / 100) longitude_mins = longitude - (longitude_degs * 100) longitude_dd = longitude_degs + (longitude_mins / 60) + + if altu.strip() == "M": + height = float(alt) except ValueError as err: logger.error("Got invalid GPGGA sentence from GPS - {}".format(err)) return None @@ -121,7 +124,7 @@ def get_lat_long(self, timeout_s=1): msg = "Updated GPS lat, long ({}, {})".format(latitude_dd, longitude_dd) logger.info(msg) - return latitude_dd, longitude_dd + return latitude_dd, longitude_dd, height def get_gps_time(self): uhd = self.radio.uhd diff --git a/scos_usrp/hardware/tests/resources/utils.py b/scos_usrp/hardware/tests/resources/utils.py index 730cd33..9fdafda 100644 --- a/scos_usrp/hardware/tests/resources/utils.py +++ b/scos_usrp/hardware/tests/resources/utils.py @@ -4,7 +4,7 @@ def easy_gain(sample_rate, frequency, gain): - """ Create an easily interpolated calibration gain value for testing. + """Create an easily interpolated calibration gain value for testing. :type sample_rate: float :param sample_rate: Sample rate in samples per second @@ -21,7 +21,7 @@ def easy_gain(sample_rate, frequency, gain): def is_close(a, b, tolerance): - """ Handle floating point comparisons """ + """Handle floating point comparisons""" return abs(a - b) <= tolerance diff --git a/scos_usrp/hardware/tests/test_calibration.py b/scos_usrp/hardware/tests/test_calibration.py index 61cd8c5..94447e6 100644 --- a/scos_usrp/hardware/tests/test_calibration.py +++ b/scos_usrp/hardware/tests/test_calibration.py @@ -16,11 +16,11 @@ class TestCalibrationFile: setup_complete = False def rand_index(self, l): - """ Get a random index for a list """ + """Get a random index for a list""" return random.randint(0, len(l) - 1) def check_duplicate(self, sr, f, g): - """ Check if a set of points was already tested """ + """Check if a set of points was already tested""" for pt in self.pytest_points: duplicate_f = f == pt["frequency"] duplicate_g = g == pt["gain"] @@ -29,13 +29,13 @@ def check_duplicate(self, sr, f, g): return True def run_pytest_point(self, sr, f, g, reason, sr_m=False, f_m=False, g_m=False): - """ Test the calculated value against the algorithm - Parameters: - sr, f, g -> Set values for the mock USRP - reason: Test case string for failure reference - sr_m, f_m, g_m -> Set values to use when calculating the expected value - May differ in from actual set points in edge cases - such as tuning in divisions or uncalibrated sample rate""" + """Test the calculated value against the algorithm + Parameters: + sr, f, g -> Set values for the mock USRP + reason: Test case string for failure reference + sr_m, f_m, g_m -> Set values to use when calculating the expected value + May differ in from actual set points in edge cases + such as tuning in divisions or uncalibrated sample rate""" # Check that the setup was completed assert self.setup_complete, "Setup was not completed" @@ -79,15 +79,17 @@ def run_pytest_point(self, sr, f, g, reason, sr_m=False, f_m=False, g_m=False): msg = "{} Sample Rate: {}({})\r\n".format(msg, sr / 1e6, sr_m / 1e6) msg = "{} Frequency: {}({})\r\n".format(msg, f / 1e6, f_m / 1e6) msg = "{} Gain: {}({})\r\n".format(msg, g, g_m) - msg = "{} Formula: -1 * (Gain - Frequency[GHz] - Sample Rate[MHz])\r\n".format( - msg + msg = ( + "{} Formula: -1 * (Gain - Frequency[GHz] - Sample Rate[MHz])\r\n".format( + msg + ) ) assert is_close(calc_gain_sigan, interp_gain_siggan, tolerance), msg return True @pytest.fixture(autouse=True) def setup_calibration_file(self, tmpdir): - """ Create the dummy calibration file in the pytest temp directory """ + """Create the dummy calibration file in the pytest temp directory""" # Only setup once if self.setup_complete: @@ -220,7 +222,7 @@ def setup_calibration_file(self, tmpdir): self.setup_complete = True def test_sf_bound_points(self): - """ Test SF determination at boundary points """ + """Test SF determination at boundary points""" self.run_pytest_point( self.srs[0], self.frequency_min, self.gain_min, "Testing boundary points" ) @@ -229,7 +231,7 @@ def test_sf_bound_points(self): ) def test_sf_no_interpolation_points(self): - """ Test points without interpolation """ + """Test points without interpolation""" for i in range(4 * self.test_repeat_times): while True: g = self.g_s[self.rand_index(self.g_s)] @@ -240,7 +242,7 @@ def test_sf_no_interpolation_points(self): break def test_sf_f_interpolation_points(self): - """ Test points with frequency interpolation only """ + """Test points with frequency interpolation only""" for i in range(4 * self.test_repeat_times): while True: g = self.g_s[self.rand_index(self.g_s)] @@ -252,7 +254,7 @@ def test_sf_f_interpolation_points(self): break def test_sf_g_interpolation_points(self): - """ Test points with gain interpolation only """ + """Test points with gain interpolation only""" for i in range(4 * self.test_repeat_times): while True: g = self.gi_s[self.rand_index(self.gi_s)] @@ -264,7 +266,7 @@ def test_sf_g_interpolation_points(self): break def test_sf_g_f_interpolation_points(self): - """ Test points with frequency and gain interpolation only """ + """Test points with frequency and gain interpolation only""" for i in range(4 * self.test_repeat_times): while True: g = self.gi_s[self.rand_index(self.gi_s)] @@ -280,7 +282,7 @@ def test_sf_g_f_interpolation_points(self): break def test_g_fudge_points(self): - """ Test points with a gain fudge factor """ + """Test points with a gain fudge factor""" for i in range(2 * self.test_repeat_times): while True: g = self.gain_min @@ -300,7 +302,7 @@ def test_g_fudge_points(self): break def test_g_fudge_f_interpolation_points(self): - """ Test points with a gain fudge factor and frequency interpolation """ + """Test points with a gain fudge factor and frequency interpolation""" for i in range(2 * self.test_repeat_times): while True: g = self.gain_min @@ -328,7 +330,7 @@ def test_g_fudge_f_interpolation_points(self): break def test_g_fudge_f_oob_points(self): - """ Test points with a gain fudge factor and out-of-bound frequencies """ + """Test points with a gain fudge factor and out-of-bound frequencies""" for i in range(self.test_repeat_times): while True: g = self.gain_min @@ -384,7 +386,7 @@ def test_g_fudge_f_oob_points(self): break def test_g_interpolation_f_oob_points(self): - """ Test points with gain interpolation and out-of-bound frequencies """ + """Test points with gain interpolation and out-of-bound frequencies""" for i in range(2 * self.test_repeat_times): while True: g = self.gi_s[self.rand_index(self.gi_s)] @@ -414,7 +416,7 @@ def test_g_interpolation_f_oob_points(self): break def test_f_oob_points(self): - """ Test points with out-of-bound frequencies """ + """Test points with out-of-bound frequencies""" for i in range(2 * self.test_repeat_times): while True: g = self.g_s[self.rand_index(self.g_s)] @@ -442,7 +444,7 @@ def test_f_oob_points(self): break def test_division_f_points(self): - """ Test points with division frequencies """ + """Test points with division frequencies""" for i in range(self.test_repeat_times): for f in self.div_fs: while True: @@ -453,7 +455,7 @@ def test_division_f_points(self): break def test_g_interpolation_division_f_points(self): - """ Test points with gain interpolation and division frequencies """ + """Test points with gain interpolation and division frequencies""" for i in range(self.test_repeat_times): for f in self.div_fs: while True: @@ -468,7 +470,7 @@ def test_g_interpolation_division_f_points(self): break def test_g_fudge_division_f_points(self): - """ Test points with gain fudge and division frequencies """ + """Test points with gain fudge and division frequencies""" for i in range(self.test_repeat_times): for f in self.div_fs: while True: @@ -483,7 +485,7 @@ def test_g_fudge_division_f_points(self): break def test_in_division_f_points(self): - """ Test points with in-division frequencies """ + """Test points with in-division frequencies""" for j in range(self.test_repeat_times): for i in range(0, len(self.div_fs), 2): while True: @@ -499,7 +501,7 @@ def test_in_division_f_points(self): break def test_g_interpolation_in_division_f_points(self): - """ Test points with gain interpolation and in-division frequencies """ + """Test points with gain interpolation and in-division frequencies""" for j in range(self.test_repeat_times): for i in range(0, len(self.div_fs), 2): while True: @@ -516,7 +518,7 @@ def test_g_interpolation_in_division_f_points(self): break def test_g_fudge_in_division_f_points(self): - """ Test points with gain fudge and in-division frequencies """ + """Test points with gain fudge and in-division frequencies""" for j in range(self.test_repeat_times): for i in range(0, len(self.div_fs), 2): while True: @@ -533,7 +535,7 @@ def test_g_fudge_in_division_f_points(self): break def test_sample_rate_points(self): - """ Test points with gain and frequency interpolation at different sample rates """ + """Test points with gain and frequency interpolation at different sample rates""" for j in range(self.test_repeat_times): for i in range(len(self.srs)): while True: @@ -552,7 +554,7 @@ def test_sample_rate_points(self): break def test_uncalibrated_sample_rate_points(self): - """ Test points with gain and frequency interpolation at uncalibrated sample rates """ + """Test points with gain and frequency interpolation at uncalibrated sample rates""" for i in range(4 * self.test_repeat_times): while True: g = self.gi_s[self.rand_index(self.gi_s)] diff --git a/scos_usrp/hardware/tests/test_gps.py b/scos_usrp/hardware/tests/test_gps.py index 8d78bf9..9489d5c 100644 --- a/scos_usrp/hardware/tests/test_gps.py +++ b/scos_usrp/hardware/tests/test_gps.py @@ -15,9 +15,7 @@ def test_get_lat_long_returns_location(self, mock_usrp, caplog): def side_effect(value): if value == "gps_gpgga": gps_gpgga_mock = MagicMock() - gps_gpgga_mock.value = ( - "$GPGGA,164747.933,3959.707,N,10515.695,W,1,12,1.0,0.0,M,0.0,M,,*7E" - ) + gps_gpgga_mock.value = "$GPGGA,164747.933,3959.707,N,10515.695,W,1,12,1.0,10.0,M,0.0,M,,*7E" return gps_gpgga_mock elif value == "gps_time": return MagicMock(return_value=1587746867) @@ -35,9 +33,10 @@ def side_effect(value): radio.uhd.types = MagicMock() radio.uhd.types.TimeSpec = MagicMock() gps = USRPLocation(radio) - latitude, longitude = gps.get_lat_long() + latitude, longitude, height = gps.get_location() assert latitude == approx(39.99511463) assert longitude == approx(-105.26158690) + assert height == approx(10.0) @patch("uhd.usrp.MultiUSRP") def test_get_lat_long_no_gps(self, mock_usrp, caplog): @@ -67,5 +66,5 @@ def side_effect(value): radio.uhd.types = MagicMock() radio.uhd.types.TimeSpec = MagicMock() gps = USRPLocation(radio) - ret = gps.get_lat_long() + ret = gps.get_location() assert ret == None diff --git a/scos_usrp/hardware/tests/test_usrp.py b/scos_usrp/hardware/tests/test_usrp.py index 3e7a86b..023c328 100644 --- a/scos_usrp/hardware/tests/test_usrp.py +++ b/scos_usrp/hardware/tests/test_usrp.py @@ -16,7 +16,7 @@ class TestUSRP: @pytest.fixture(autouse=True) def setup_mock_usrp(self): - """ Create the mock USRP """ + """Create the mock USRP""" # Only setup once if self.setup_complete: diff --git a/scos_usrp/hardware/usrp_radio.py b/scos_usrp/hardware/usrp_radio.py index 0c16b85..1122ece 100644 --- a/scos_usrp/hardware/usrp_radio.py +++ b/scos_usrp/hardware/usrp_radio.py @@ -16,7 +16,7 @@ import numpy as np from scos_actions import utils -from scos_actions.hardware.radio_iface import RadioInterface +from scos_actions.hardware.sigan_iface import SignalAnalyzerInterface from scos_usrp import settings from scos_usrp.hardware import calibration @@ -49,10 +49,10 @@ } -class USRPRadio(RadioInterface): +class USRPRadio(SignalAnalyzerInterface): @property def last_calibration_time(self): - """ Returns the last calibration time from calibration data. """ + """Returns the last calibration time from calibration data.""" if self.sensor_calibration: return utils.convert_string_to_millisecond_iso_format( self.sensor_calibration.calibration_datetime @@ -61,7 +61,7 @@ def last_calibration_time(self): @property def overload(self): - """ Returns True if overload occurred, otherwise returns False. """ + """Returns True if overload occurred, otherwise returns False.""" return self._sigan_overload or self._sensor_overload # Define thresholds for determining ADC overload for the sigan @@ -135,11 +135,11 @@ def connect(self): @property def is_available(self): - """ Returns True if initialized and ready to make measurements, otherwise returns False. """ + """Returns True if initialized and ready to make measurements, otherwise returns False.""" return self._is_available def get_calibration(self, sensor_cal_file, sigan_cal_file): - """ Get calibration data from sensor_cal_file and sigan_cal_file. """ + """Get calibration data from sensor_cal_file and sigan_cal_file.""" # Set the default calibration values self.sensor_calibration_data = DEFAULT_SENSOR_CALIBRATION.copy() self.sigan_calibration_data = DEFAULT_SIGAN_CALIBRATION.copy() @@ -167,7 +167,7 @@ def get_calibration(self, sensor_cal_file, sigan_cal_file): @property def sample_rate(self): - """ Returns the currently configured sample rate in samples per second. """ + """Returns the currently configured sample rate in samples per second.""" return self.usrp.get_rx_rate() @sample_rate.setter @@ -193,12 +193,12 @@ def sample_rate(self, rate): @property def clock_rate(self): - """ Returns the currently configured clock rate in hertz. """ + """Returns the currently configured clock rate in hertz.""" return self.usrp.get_master_clock_rate() @clock_rate.setter def clock_rate(self, rate): - """ Sets the signal analyzer clock rate. + """Sets the signal analyzer clock rate. :type rate: float :param rate: Clock rate in hertz @@ -209,12 +209,12 @@ def clock_rate(self, rate): @property def frequency(self): - """ Returns the currently configured center frequency in hertz. """ + """Returns the currently configured center frequency in hertz.""" return self.usrp.get_rx_freq() @frequency.setter def frequency(self, freq): - """ Sets the signal analyzer frequency. + """Sets the signal analyzer frequency. :type freq: float :param freq: Frequency in hertz @@ -222,7 +222,7 @@ def frequency(self, freq): self.tune_frequency(freq) def tune_frequency(self, rf_freq, dsp_freq=0): - """ Tunes the signal analyzer as close as possible to the desired frequency. + """Tunes the signal analyzer as close as possible to the desired frequency. :type rf_freq: float :param rf_freq: Desired frequency in hertz @@ -244,12 +244,12 @@ def tune_frequency(self, rf_freq, dsp_freq=0): @property def gain(self): - """ Returns the currently configured gain setting in dB. """ + """Returns the currently configured gain setting in dB.""" return self.usrp.get_rx_gain() @gain.setter def gain(self, gain): - """ Sets the signal analyzer gain setting. + """Sets the signal analyzer gain setting. :type gain: float :param gain: Gain in dB @@ -315,7 +315,7 @@ def recompute_calibration_data(self): ) def create_calibration_annotation(self): - """ Creates the SigMF calibration annotation. """ + """Creates the SigMF calibration annotation.""" annotation_md = { "ntia-core:annotation_type": "CalibrationAnnotation", "ntia-sensor:gain_sigan": self.sigan_calibration_data["gain_sigan"], @@ -340,7 +340,7 @@ def create_calibration_annotation(self): return annotation_md def check_sensor_overload(self, data): - """ Check for sensor overload in the measurement data. """ + """Check for sensor overload in the measurement data.""" measured_data = data.astype(np.complex64) time_domain_avg_power = 10 * np.log10(np.mean(np.abs(measured_data) ** 2)) @@ -375,7 +375,7 @@ def acquire_time_domain_samples(self, num_samples, num_samples_skip=0, retries=5 sample_rate - (float) Measurement sample rate in samples per second capture_time - (string) Measurement capture time calibration_annotation - (dict) SigMF calibration annotation - """ + """ self._sigan_overload = False self._capture_time = None # Get the calibration data for the acquisition @@ -452,7 +452,7 @@ def acquire_time_domain_samples(self, num_samples, num_samples_skip=0, retries=5 @property def healthy(self): - """ Check for ability to acquire samples from the signal analyzer. """ + """Check for ability to acquire samples from the signal analyzer.""" logger.debug("Performing USRP health check") if not self.is_available: From c3df381de70bd4d4355422b8dc5105ffd23e9e17 Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Thu, 3 Feb 2022 13:53:59 -0700 Subject: [PATCH 04/12] rename 'radio' to 'sigan' or 'SignalAnalyzer' --- README.md | 8 +++--- scos_usrp/discover/__init__.py | 10 +++---- scos_usrp/hardware/__init__.py | 6 ++--- scos_usrp/hardware/gps_iface.py | 14 +++++----- scos_usrp/hardware/tests/test_gps.py | 26 +++++++++---------- scos_usrp/hardware/tests/test_usrp.py | 10 +++---- .../hardware/{usrp_radio.py => usrp_sigan.py} | 22 ++++++++-------- scos_usrp/settings.py | 12 ++++----- 8 files changed, 54 insertions(+), 54 deletions(-) rename scos_usrp/hardware/{usrp_radio.py => usrp_sigan.py} (97%) diff --git a/README.md b/README.md index 9b89954..7bb9b62 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ https://github.com/NTIA/scos-sensor/blob/master/README.md#actions-and-hardware-s ) sections which explain the scos-sensor plugin architecture. This repository includes many 700MHz band actions in [scos_usrp/configs/actions]( -scos_usrp/configs/actions). Action classes, RadioInterface, GPSInterface, and signals -are used from [scos_actions](https://github.com/NTIA/scos-actions). +scos_usrp/configs/actions). Action classes, SignalAnalyzerInterface, GPSInterface, and +signals are used from [scos_actions](https://github.com/NTIA/scos-actions). For information on adding actions, see the [scos_actions documentation]( https://github.com/NTIA/scos-actions/blob/master/README.md#adding-actions). @@ -30,8 +30,8 @@ https://github.com/NTIA/scos-actions/blob/master/README.md#adding-actions). initialize the USRP supported actions and sample calibration files. - scos_usrp/discover: This includes the code to read yaml files and make actions available to scos-sensor. -- scos_usrp/hardware: This includes the USRP implementation of the radio interface and - GPS interface. It also includes supporting calibration and test code. +- scos_usrp/hardware: This includes the USRP implementation of the signal analyzer + interface and GPS interface. It also includes supporting calibration and test code. ## Running in scos-sensor diff --git a/scos_usrp/discover/__init__.py b/scos_usrp/discover/__init__.py index a84c3f0..d33e982 100644 --- a/scos_usrp/discover/__init__.py +++ b/scos_usrp/discover/__init__.py @@ -1,23 +1,23 @@ import logging -from scos_actions.actions.monitor_radio import RadioMonitor +from scos_actions.actions.monitor_sigan import MonitorSignalAnalyzer from scos_actions.actions.sync_gps import SyncGps from scos_actions.discover import init -from scos_usrp.hardware import gps, radio +from scos_usrp.hardware import gps, sigan from scos_usrp.settings import ACTION_DEFINITIONS_DIR logger = logging.getLogger(__name__) actions = { - "monitor_usrp": RadioMonitor(radio), + "monitor_usrp": MonitorSignalAnalyzer(sigan), "sync_gps": SyncGps(gps), } logger.debug("scos_usrp: ACTION_DEFINITIONS_DIR = " + ACTION_DEFINITIONS_DIR) -yaml_actions, yaml_test_actions = init(radio=radio, yaml_dir=ACTION_DEFINITIONS_DIR) +yaml_actions, yaml_test_actions = init(sigan=sigan, yaml_dir=ACTION_DEFINITIONS_DIR) actions.update(yaml_actions) def get_last_calibration_time(): - return radio.last_calibration_time + return sigan.last_calibration_time diff --git a/scos_usrp/hardware/__init__.py b/scos_usrp/hardware/__init__.py index aa015d3..faa1dd0 100644 --- a/scos_usrp/hardware/__init__.py +++ b/scos_usrp/hardware/__init__.py @@ -1,5 +1,5 @@ from scos_usrp.hardware.gps_iface import USRPLocation -from scos_usrp.hardware.usrp_radio import USRPRadio +from scos_usrp.hardware.usrp_sigan import USRPSignalAnalyzer -radio = USRPRadio() -gps = USRPLocation(radio) +sigan = USRPSignalAnalyzer() +gps = USRPLocation(sigan) diff --git a/scos_usrp/hardware/gps_iface.py b/scos_usrp/hardware/gps_iface.py index c41f9ad..7633906 100644 --- a/scos_usrp/hardware/gps_iface.py +++ b/scos_usrp/hardware/gps_iface.py @@ -11,17 +11,17 @@ class USRPLocation(GPSInterface): - def __init__(self, radio): - self.radio = radio + def __init__(self, sigan): + self.sigan = sigan def get_location(self, timeout_s=1): """Use low-level UHD and USRP block methods to sync with GPS.""" - if not self.radio.is_available: + if not self.sigan.is_available: return None - uhd = self.radio.uhd - usrp = self.radio.usrp + uhd = self.sigan.uhd + usrp = self.sigan.usrp logger.debug("Waiting for GPS lock... ") start = time() @@ -127,8 +127,8 @@ def get_location(self, timeout_s=1): return latitude_dd, longitude_dd, height def get_gps_time(self): - uhd = self.radio.uhd - usrp = self.radio.usrp + uhd = self.sigan.uhd + usrp = self.sigan.usrp gps_t = uhd.types.TimeSpec(usrp.get_mboard_sensor("gps_time").to_int() + 1) usrp.set_time_next_pps(gps_t) diff --git a/scos_usrp/hardware/tests/test_gps.py b/scos_usrp/hardware/tests/test_gps.py index 9489d5c..bdfb57e 100644 --- a/scos_usrp/hardware/tests/test_gps.py +++ b/scos_usrp/hardware/tests/test_gps.py @@ -3,7 +3,7 @@ from pytest import approx -from scos_usrp.hardware import USRPLocation, USRPRadio +from scos_usrp.hardware import USRPLocation, USRPSignalAnalyzer class TestGPS: @@ -27,12 +27,12 @@ def side_effect(value): mock_usrp.get_time_source = MagicMock(return_value="gpsdo") mock_usrp.get_clock_sources = MagicMock(return_value=["gpsdo"]) mock_usrp.get_clock_source = MagicMock(return_value="gpsdo") - radio = USRPRadio() - radio.usrp = mock_usrp - radio.uhd = MagicMock() - radio.uhd.types = MagicMock() - radio.uhd.types.TimeSpec = MagicMock() - gps = USRPLocation(radio) + sigan = USRPSignalAnalyzer() + sigan.usrp = mock_usrp + sigan.uhd = MagicMock() + sigan.uhd.types = MagicMock() + sigan.uhd.types.TimeSpec = MagicMock() + gps = USRPLocation(sigan) latitude, longitude, height = gps.get_location() assert latitude == approx(39.99511463) assert longitude == approx(-105.26158690) @@ -60,11 +60,11 @@ def side_effect(value): mock_usrp.get_time_source = MagicMock(return_value="") mock_usrp.get_clock_sources = MagicMock(return_value=[""]) mock_usrp.get_clock_source = MagicMock(return_value="") - radio = USRPRadio() - radio.usrp = mock_usrp - radio.uhd = MagicMock() - radio.uhd.types = MagicMock() - radio.uhd.types.TimeSpec = MagicMock() - gps = USRPLocation(radio) + sigan = USRPSignalAnalyzer() + sigan.usrp = mock_usrp + sigan.uhd = MagicMock() + sigan.uhd.types = MagicMock() + sigan.uhd.types.TimeSpec = MagicMock() + gps = USRPLocation(sigan) ret = gps.get_location() assert ret == None diff --git a/scos_usrp/hardware/tests/test_usrp.py b/scos_usrp/hardware/tests/test_usrp.py index 023c328..8bbd632 100644 --- a/scos_usrp/hardware/tests/test_usrp.py +++ b/scos_usrp/hardware/tests/test_usrp.py @@ -1,8 +1,8 @@ -"""Test aspects of RadioInterface with mocked USRP.""" +"""Test aspects of SignalAnalyzerInterface with mocked USRP.""" import pytest -from scos_usrp.hardware import radio +from scos_usrp.hardware import sigan from scos_usrp.hardware.tests.resources.utils import ( create_dummy_calibration, easy_gain, @@ -22,11 +22,11 @@ def setup_mock_usrp(self): if self.setup_complete: return - # Create the RadioInterface with the mock usrp_block and get the radio + # Create the SignalAnalyzerInterface with the mock usrp_block and get the sigan # usrp_iface.connect() - if not radio.is_available: + if not sigan.is_available: raise RuntimeError("Receiver is not available.") - self.rx = radio + self.rx = sigan # Alert that the setup was complete self.setup_complete = True diff --git a/scos_usrp/hardware/usrp_radio.py b/scos_usrp/hardware/usrp_sigan.py similarity index 97% rename from scos_usrp/hardware/usrp_radio.py rename to scos_usrp/hardware/usrp_sigan.py index 1122ece..03500e3 100644 --- a/scos_usrp/hardware/usrp_radio.py +++ b/scos_usrp/hardware/usrp_sigan.py @@ -1,10 +1,10 @@ """Maintains a persistent connection to the USRP. Example usage: - >>> from scos_usrp.hardware import radio - >>> radio.is_available + >>> from scos_usrp.hardware import sigan + >>> sigan.is_available True - >>> rx = radio + >>> rx = sigan >>> rx.sample_rate = 10e6 >>> rx.frequency = 700e6 >>> rx.gain = 40 @@ -49,7 +49,7 @@ } -class USRPRadio(SignalAnalyzerInterface): +class USRPSignalAnalyzer(SignalAnalyzerInterface): @property def last_calibration_time(self): """Returns the last calibration time from calibration data.""" @@ -97,9 +97,9 @@ def connect(self): if self._is_available: return True - if settings.RUNNING_TESTS or settings.MOCK_RADIO: + if settings.RUNNING_TESTS or settings.MOCK_SIGAN: logger.warning("Using mock USRP.") - random = settings.MOCK_RADIO_RANDOM + random = settings.MOCK_SIGAN_RANDOM self.usrp = MockUsrp(randomize_values=random) self._is_available = True else: @@ -108,7 +108,7 @@ def connect(self): self.uhd = uhd except ImportError: - logger.warning("uhd not available - disabling radio") + logger.warning("uhd not available - disabling signal analyzer") return False usrp_args = ( @@ -145,7 +145,7 @@ def get_calibration(self, sensor_cal_file, sigan_cal_file): self.sigan_calibration_data = DEFAULT_SIGAN_CALIBRATION.copy() # Try and load sensor/sigan calibration data - if not settings.RUNNING_TESTS and not settings.MOCK_RADIO: + if not settings.RUNNING_TESTS and not settings.MOCK_SIGAN: try: self.sensor_calibration = calibration.load_from_json(sensor_cal_file) except Exception as err: @@ -390,8 +390,8 @@ def acquire_time_domain_samples(self, num_samples, num_samples_skip=0, retries=5 # Try to acquire the samples max_retries = retries while True: - # No need to skip initial samples when simulating the radio - if not settings.RUNNING_TESTS and not settings.MOCK_RADIO: + # No need to skip initial samples when simulating the signal analyzer + if not settings.RUNNING_TESTS and not settings.MOCK_SIGAN: nsamps += nskip self._capture_time = utils.get_datetime_str_now() @@ -409,7 +409,7 @@ def acquire_time_domain_samples(self, num_samples, num_samples_skip=0, retries=5 data = samples[0] # isolate data for channel 0 data_len = len(data) - if not settings.RUNNING_TESTS and not settings.MOCK_RADIO: + if not settings.RUNNING_TESTS and not settings.MOCK_SIGAN: data = data[nskip:] if not len(data) == num_samples: diff --git a/scos_usrp/settings.py b/scos_usrp/settings.py index b29b579..8c59ceb 100644 --- a/scos_usrp/settings.py +++ b/scos_usrp/settings.py @@ -22,13 +22,13 @@ __cmd = path.split(sys.argv[0])[-1] RUNNING_TESTS = "test" in __cmd -if not settings.configured or not hasattr(settings, "MOCK_RADIO"): - MOCK_RADIO = env.bool("MOCK_RADIO", default=False) or RUNNING_TESTS +if not settings.configured or not hasattr(settings, "MOCK_SIGAN"): + MOCK_SIGAN = env.bool("MOCK_SIGAN", default=False) or RUNNING_TESTS else: - MOCK_RADIO = settings.MOCK_RADIO -if not settings.configured or not hasattr(settings, "MOCK_RADIO_RANDOM"): - MOCK_RADIO_RANDOM = env.bool("MOCK_RADIO_RANDOM", default=False) + MOCK_SIGAN = settings.MOCK_SIGAN +if not settings.configured or not hasattr(settings, "MOCK_SIGAN_RANDOM"): + MOCK_SIGAN_RANDOM = env.bool("MOCK_SIGAN_RANDOM", default=False) else: - MOCK_RADIO_RANDOM = settings.MOCK_RADIO_RANDOM + MOCK_SIGAN_RANDOM = settings.MOCK_SIGAN_RANDOM USRP_CONNECTION_ARGS = env("USRP_CONNECTION_ARGS", default="num_recv_frames=650") From fc91d1cdf61aa2982b0f29ccde14527aef5b96cf Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Thu, 3 Feb 2022 14:55:47 -0700 Subject: [PATCH 05/12] only use direct dependencies in setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d3ddf48..edfa0ab 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ long_description = fh.read() repo_root = os.path.dirname(os.path.realpath(__file__)) -requirements_path = repo_root + "/requirements.txt" +requirements_path = repo_root + "/requirements.in" install_requires = [] # Examples: ["gunicorn", "docutils>=0.3", "lxml==0.5a7"] if os.path.isfile(requirements_path): with open(requirements_path) as f: From 971aae960e0a583f459536cbe675d3410cd3c861 Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Wed, 2 Mar 2022 15:24:27 -0700 Subject: [PATCH 06/12] refactor to include all direct dependencies in requirements.txt, update pre-commit dependencies, formatting updates --- .pre-commit-config.yaml | 8 ++-- requirements-dev.in | 9 ++-- requirements-dev.txt | 82 ++++++++++++++++++-------------- requirements.in | 6 ++- requirements.txt | 30 +++++++++--- scos_usrp/discover/__init__.py | 5 +- scos_usrp/hardware/usrp_sigan.py | 2 +- 7 files changed, 83 insertions(+), 59 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0662ee9..8c4bb51 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.2.3 + rev: v4.1.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -8,17 +8,17 @@ repos: - id: check-yaml - id: debug-statements - repo: https://github.com/asottile/seed-isort-config - rev: v1.9.1 + rev: v2.2.0 hooks: - id: seed-isort-config language_version: python3.7 - repo: https://github.com/pre-commit/mirrors-isort - rev: v4.3.20 + rev: v5.10.1 hooks: - id: isort language_version: python3.7 - repo: https://github.com/ambv/black - rev: stable + rev: 22.1.0 hooks: - id: black language_version: python3.7 diff --git a/requirements-dev.in b/requirements-dev.in index 4cf7196..fa9e61a 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -1,8 +1,5 @@ -rrequirements.txt -black~=19.10b0 -Django~=3.1.13 -environs~=7.3.1 -packaging==20.4 -pre-commit~=2.17.0 -pytest~=5.4.1 +black>=22.0, <=23.0 +pre-commit>=2.0, <=3.0 +pytest>=7.0, <8.0 diff --git a/requirements-dev.txt b/requirements-dev.txt index 82a77bb..a91f54d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,15 +4,13 @@ # # pip-compile requirements-dev.in # -appdirs==1.4.4 - # via black -asgiref==3.4.1 - # via django -attrs==21.4.0 +asgiref==3.5.0 # via - # black - # pytest -black==19.10b0 + # -r requirements.txt + # django +attrs==21.4.0 + # via pytest +black==22.1.0 # via -r requirements-dev.in cfgv==3.3.1 # via pre-commit @@ -20,10 +18,12 @@ click==8.0.3 # via black distlib==0.3.4 # via virtualenv -django==3.1.14 - # via -r requirements-dev.in -environs==7.3.1 - # via -r requirements-dev.in +django==3.2.12 + # via + # -r requirements.txt + # scos-actions +environs==9.5.0 + # via -r requirements.txt filelock==3.4.1 # via virtualenv identify==2.4.2 @@ -35,24 +35,29 @@ importlib-metadata==4.8.3 # pre-commit # pytest # virtualenv -marshmallow==3.14.1 - # via environs -more-itertools==8.12.0 +iniconfig==1.1.1 # via pytest +marshmallow==3.14.1 + # via + # -r requirements.txt + # environs +mypy-extensions==0.4.3 + # via black nodeenv==1.6.0 # via pre-commit numpy==1.18.5 # via # -r requirements.txt # scipy + # scos-actions packaging==20.4 - # via - # -r requirements-dev.in - # pytest + # via pytest pathspec==0.9.0 # via black platformdirs==2.4.0 - # via virtualenv + # via + # black + # virtualenv pluggy==0.13.1 # via pytest pre-commit==2.17.0 @@ -61,34 +66,35 @@ py==1.11.0 # via pytest pyparsing==3.0.6 # via packaging -pytest==5.4.3 +pytest==7.0.1 # via -r requirements-dev.in python-dateutil==2.8.1 # via # -r requirements.txt # scos-actions python-dotenv==0.19.2 - # via environs -pytz==2020.1 - # via django + # via + # -r requirements.txt + # environs +pytz==2021.3 + # via + # -r requirements.txt + # django pyyaml==6.0 # via pre-commit -regex==2021.11.10 - # via black -ruamel.yaml==0.16.10 +ruamel-yaml==0.16.10 # via # -r requirements.txt # scos-actions -ruamel.yaml.clib==0.2.0 +ruamel-yaml-clib==0.2.0 # via # -r requirements.txt - # ruamel.yaml - # scos-actions + # ruamel-yaml scipy==1.7.3 # via # -r requirements.txt # scos-actions -scos-actions @ git+https://github.com/NTIA/scos-actions@bug_fix +scos_actions @ git+https://github.com/NTIA/scos-actions@refactor_dependencies # via -r requirements.txt sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive # via @@ -100,21 +106,25 @@ six==1.15.0 # packaging # python-dateutil # virtualenv -sqlparse==0.3.1 - # via django +sqlparse==0.4.2 + # via + # -r requirements.txt + # django toml==0.10.2 + # via pre-commit +tomli==2.0.1 # via # black - # pre-commit + # pytest typed-ast==1.5.1 # via black -typing-extensions==4.0.1 +typing-extensions==4.1.1 # via + # -r requirements.txt # asgiref + # black # importlib-metadata virtualenv==20.13.0 # via pre-commit -wcwidth==0.2.5 - # via pytest zipp==3.6.0 # via importlib-metadata diff --git a/requirements.in b/requirements.in index a2c5d84..6811f3f 100644 --- a/requirements.in +++ b/requirements.in @@ -1,2 +1,4 @@ -# for use with scos-sensor -scos_actions @ git+https://github.com/NTIA/scos-actions@bug_fix#egg=scos_actions +django>=3.0, <4.0 +environs>=9.0, <10.0 +numpy>=1.0, <2.0 +scos_actions @ git+https://github.com/NTIA/scos-actions@refactor_dependencies diff --git a/requirements.txt b/requirements.txt index d2a36aa..d562057 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,21 +4,35 @@ # # pip-compile requirements.in # +asgiref==3.5.0 + # via django +django==3.2.12 + # via + # -r requirements.in + # scos-actions +environs==9.5.0 + # via -r requirements.in +marshmallow==3.14.1 + # via environs numpy==1.18.5 # via + # -r requirements.in # scipy + # scos-actions # sigmf python-dateutil==2.8.1 # via scos-actions -ruamel.yaml==0.16.10 +python-dotenv==0.19.2 + # via environs +pytz==2021.3 + # via django +ruamel-yaml==0.16.10 # via scos-actions -ruamel.yaml.clib==0.2.0 - # via - # ruamel.yaml - # scos-actions +ruamel-yaml-clib==0.2.0 + # via ruamel-yaml scipy==1.7.3 # via scos-actions -scos-actions @ git+https://github.com/NTIA/scos-actions@bug_fix +scos_actions @ git+https://github.com/NTIA/scos-actions@refactor_dependencies # via -r requirements.in sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive # via scos-actions @@ -26,3 +40,7 @@ six==1.15.0 # via # python-dateutil # sigmf +sqlparse==0.4.2 + # via django +typing-extensions==4.1.1 + # via asgiref diff --git a/scos_usrp/discover/__init__.py b/scos_usrp/discover/__init__.py index d33e982..69ece28 100644 --- a/scos_usrp/discover/__init__.py +++ b/scos_usrp/discover/__init__.py @@ -9,10 +9,7 @@ logger = logging.getLogger(__name__) -actions = { - "monitor_usrp": MonitorSignalAnalyzer(sigan), - "sync_gps": SyncGps(gps), -} +actions = {"monitor_usrp": MonitorSignalAnalyzer(sigan), "sync_gps": SyncGps(gps)} logger.debug("scos_usrp: ACTION_DEFINITIONS_DIR = " + ACTION_DEFINITIONS_DIR) yaml_actions, yaml_test_actions = init(sigan=sigan, yaml_dir=ACTION_DEFINITIONS_DIR) diff --git a/scos_usrp/hardware/usrp_sigan.py b/scos_usrp/hardware/usrp_sigan.py index 03500e3..95e0561 100644 --- a/scos_usrp/hardware/usrp_sigan.py +++ b/scos_usrp/hardware/usrp_sigan.py @@ -460,7 +460,7 @@ def healthy(self): # arbitrary number of samples to acquire to check health of usrp # keep above ~70k to catch previous errors seen at ~70k - requested_samples = 100000 + requested_samples = 100_000 try: measurement_result = self.acquire_time_domain_samples(requested_samples) From 0ffa8acedcda76433d8fc4b161b097a244f2a342 Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Mon, 7 Mar 2022 12:20:25 -0700 Subject: [PATCH 07/12] update requirements --- requirements-dev.txt | 33 ++++++++++++++++----------------- requirements.txt | 10 +++++----- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index a91f54d..05a5abe 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -14,7 +14,7 @@ black==22.1.0 # via -r requirements-dev.in cfgv==3.3.1 # via pre-commit -click==8.0.3 +click==8.0.4 # via black distlib==0.3.4 # via virtualenv @@ -24,11 +24,11 @@ django==3.2.12 # scos-actions environs==9.5.0 # via -r requirements.txt -filelock==3.4.1 +filelock==3.6.0 # via virtualenv -identify==2.4.2 +identify==2.4.11 # via pre-commit -importlib-metadata==4.8.3 +importlib-metadata==4.11.2 # via # click # pluggy @@ -45,30 +45,30 @@ mypy-extensions==0.4.3 # via black nodeenv==1.6.0 # via pre-commit -numpy==1.18.5 +numpy==1.21.5 # via # -r requirements.txt # scipy # scos-actions -packaging==20.4 +packaging==21.3 # via pytest pathspec==0.9.0 # via black -platformdirs==2.4.0 +platformdirs==2.5.1 # via # black # virtualenv -pluggy==0.13.1 +pluggy==1.0.0 # via pytest pre-commit==2.17.0 # via -r requirements-dev.in py==1.11.0 # via pytest -pyparsing==3.0.6 +pyparsing==3.0.7 # via packaging pytest==7.0.1 # via -r requirements-dev.in -python-dateutil==2.8.1 +python-dateutil==2.8.2 # via # -r requirements.txt # scos-actions @@ -82,11 +82,11 @@ pytz==2021.3 # django pyyaml==6.0 # via pre-commit -ruamel-yaml==0.16.10 +ruamel-yaml==0.17.21 # via # -r requirements.txt # scos-actions -ruamel-yaml-clib==0.2.0 +ruamel-yaml-clib==0.2.6 # via # -r requirements.txt # ruamel-yaml @@ -100,10 +100,9 @@ sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive # via # -r requirements.txt # scos-actions -six==1.15.0 +six==1.16.0 # via # -r requirements.txt - # packaging # python-dateutil # virtualenv sqlparse==0.4.2 @@ -116,7 +115,7 @@ tomli==2.0.1 # via # black # pytest -typed-ast==1.5.1 +typed-ast==1.5.2 # via black typing-extensions==4.1.1 # via @@ -124,7 +123,7 @@ typing-extensions==4.1.1 # asgiref # black # importlib-metadata -virtualenv==20.13.0 +virtualenv==20.13.3 # via pre-commit -zipp==3.6.0 +zipp==3.7.0 # via importlib-metadata diff --git a/requirements.txt b/requirements.txt index d562057..99f87c0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,21 +14,21 @@ environs==9.5.0 # via -r requirements.in marshmallow==3.14.1 # via environs -numpy==1.18.5 +numpy==1.21.5 # via # -r requirements.in # scipy # scos-actions # sigmf -python-dateutil==2.8.1 +python-dateutil==2.8.2 # via scos-actions python-dotenv==0.19.2 # via environs pytz==2021.3 # via django -ruamel-yaml==0.16.10 +ruamel-yaml==0.17.21 # via scos-actions -ruamel-yaml-clib==0.2.0 +ruamel-yaml-clib==0.2.6 # via ruamel-yaml scipy==1.7.3 # via scos-actions @@ -36,7 +36,7 @@ scos_actions @ git+https://github.com/NTIA/scos-actions@refactor_dependencies # via -r requirements.in sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive # via scos-actions -six==1.15.0 +six==1.16.0 # via # python-dateutil # sigmf From 6b5a3a6d3fd62023a6d127576691bf3aac256f86 Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Thu, 24 Mar 2022 10:51:55 -0600 Subject: [PATCH 08/12] update scos-actions to 0.1.0, update setup.py version to 0.1.0 --- requirements-dev.txt | 23 ++++++++++++++--------- requirements.in | 2 +- requirements.txt | 10 +++++++--- setup.py | 2 +- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 05a5abe..bf86c67 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -26,9 +26,9 @@ environs==9.5.0 # via -r requirements.txt filelock==3.6.0 # via virtualenv -identify==2.4.11 +identify==2.4.12 # via pre-commit -importlib-metadata==4.11.2 +importlib-metadata==4.11.3 # via # click # pluggy @@ -37,7 +37,7 @@ importlib-metadata==4.11.2 # virtualenv iniconfig==1.1.1 # via pytest -marshmallow==3.14.1 +marshmallow==3.15.0 # via # -r requirements.txt # environs @@ -51,7 +51,10 @@ numpy==1.21.5 # scipy # scos-actions packaging==21.3 - # via pytest + # via + # -r requirements.txt + # marshmallow + # pytest pathspec==0.9.0 # via black platformdirs==2.5.1 @@ -65,8 +68,10 @@ pre-commit==2.17.0 py==1.11.0 # via pytest pyparsing==3.0.7 - # via packaging -pytest==7.0.1 + # via + # -r requirements.txt + # packaging +pytest==7.1.1 # via -r requirements-dev.in python-dateutil==2.8.2 # via @@ -76,7 +81,7 @@ python-dotenv==0.19.2 # via # -r requirements.txt # environs -pytz==2021.3 +pytz==2022.1 # via # -r requirements.txt # django @@ -94,7 +99,7 @@ scipy==1.7.3 # via # -r requirements.txt # scos-actions -scos_actions @ git+https://github.com/NTIA/scos-actions@refactor_dependencies +scos_actions @ git+https://github.com/NTIA/scos-actions@0.1.0 # via -r requirements.txt sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive # via @@ -123,7 +128,7 @@ typing-extensions==4.1.1 # asgiref # black # importlib-metadata -virtualenv==20.13.3 +virtualenv==20.13.4 # via pre-commit zipp==3.7.0 # via importlib-metadata diff --git a/requirements.in b/requirements.in index 6811f3f..f4d262d 100644 --- a/requirements.in +++ b/requirements.in @@ -1,4 +1,4 @@ django>=3.0, <4.0 environs>=9.0, <10.0 numpy>=1.0, <2.0 -scos_actions @ git+https://github.com/NTIA/scos-actions@refactor_dependencies +scos_actions @ git+https://github.com/NTIA/scos-actions@0.1.0 diff --git a/requirements.txt b/requirements.txt index 99f87c0..b6a7188 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ django==3.2.12 # scos-actions environs==9.5.0 # via -r requirements.in -marshmallow==3.14.1 +marshmallow==3.15.0 # via environs numpy==1.21.5 # via @@ -20,11 +20,15 @@ numpy==1.21.5 # scipy # scos-actions # sigmf +packaging==21.3 + # via marshmallow +pyparsing==3.0.7 + # via packaging python-dateutil==2.8.2 # via scos-actions python-dotenv==0.19.2 # via environs -pytz==2021.3 +pytz==2022.1 # via django ruamel-yaml==0.17.21 # via scos-actions @@ -32,7 +36,7 @@ ruamel-yaml-clib==0.2.6 # via ruamel-yaml scipy==1.7.3 # via scos-actions -scos_actions @ git+https://github.com/NTIA/scos-actions@refactor_dependencies +scos_actions @ git+https://github.com/NTIA/scos-actions@0.1.0 # via -r requirements.in sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive # via scos-actions diff --git a/setup.py b/setup.py index edfa0ab..6c79bd5 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setuptools.setup( name="scos_usrp", - version="0.0.0", + version="0.1.0", author="The Institute for Telecommunication Sciences", # author_email="author@example.com", description="USRP support for scos-sensor", From 824d8aa4f185639f500233e2c649b5e738e9622c Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Wed, 6 Apr 2022 14:52:19 -0600 Subject: [PATCH 09/12] update requirements, fix dependabot alerts --- requirements-dev.txt | 12 ++++++------ requirements.in | 2 +- requirements.txt | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index bf86c67..5e73531 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -10,11 +10,11 @@ asgiref==3.5.0 # django attrs==21.4.0 # via pytest -black==22.1.0 +black==22.3.0 # via -r requirements-dev.in cfgv==3.3.1 # via pre-commit -click==8.0.4 +click==8.1.2 # via black distlib==0.3.4 # via virtualenv @@ -63,7 +63,7 @@ platformdirs==2.5.1 # virtualenv pluggy==1.0.0 # via pytest -pre-commit==2.17.0 +pre-commit==2.18.1 # via -r requirements-dev.in py==1.11.0 # via pytest @@ -77,7 +77,7 @@ python-dateutil==2.8.2 # via # -r requirements.txt # scos-actions -python-dotenv==0.19.2 +python-dotenv==0.20.0 # via # -r requirements.txt # environs @@ -128,7 +128,7 @@ typing-extensions==4.1.1 # asgiref # black # importlib-metadata -virtualenv==20.13.4 +virtualenv==20.14.0 # via pre-commit -zipp==3.7.0 +zipp==3.8.0 # via importlib-metadata diff --git a/requirements.in b/requirements.in index f4d262d..af6ed8f 100644 --- a/requirements.in +++ b/requirements.in @@ -1,4 +1,4 @@ -django>=3.0, <4.0 +django>=3.1.13, <4.0 environs>=9.0, <10.0 numpy>=1.0, <2.0 scos_actions @ git+https://github.com/NTIA/scos-actions@0.1.0 diff --git a/requirements.txt b/requirements.txt index b6a7188..5b3b2a6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,7 +26,7 @@ pyparsing==3.0.7 # via packaging python-dateutil==2.8.2 # via scos-actions -python-dotenv==0.19.2 +python-dotenv==0.20.0 # via environs pytz==2022.1 # via django From d6e134f1e7647521b8e1ccf2a2b76fec61b3613f Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Thu, 7 Apr 2022 10:47:57 -0600 Subject: [PATCH 10/12] update scos-actions version to 1.0.0 --- requirements-dev.txt | 24 +++++++++++++++++++++++- requirements.in | 2 +- requirements.txt | 14 +++++++++++++- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 5e73531..4ed043d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -12,8 +12,16 @@ attrs==21.4.0 # via pytest black==22.3.0 # via -r requirements-dev.in +certifi==2021.10.8 + # via + # -r requirements.txt + # requests cfgv==3.3.1 # via pre-commit +charset-normalizer==2.0.12 + # via + # -r requirements.txt + # requests click==8.1.2 # via black distlib==0.3.4 @@ -28,6 +36,10 @@ filelock==3.6.0 # via virtualenv identify==2.4.12 # via pre-commit +idna==3.3 + # via + # -r requirements.txt + # requests importlib-metadata==4.11.3 # via # click @@ -37,6 +49,10 @@ importlib-metadata==4.11.3 # virtualenv iniconfig==1.1.1 # via pytest +its-preselector @ git+https://github.com/NTIA/Preselector@0.0.1 + # via + # -r requirements.txt + # scos-actions marshmallow==3.15.0 # via # -r requirements.txt @@ -87,6 +103,8 @@ pytz==2022.1 # django pyyaml==6.0 # via pre-commit +requests==2.27.1 + # via -r requirements.txt ruamel-yaml==0.17.21 # via # -r requirements.txt @@ -99,7 +117,7 @@ scipy==1.7.3 # via # -r requirements.txt # scos-actions -scos_actions @ git+https://github.com/NTIA/scos-actions@0.1.0 +scos_actions @ git+https://github.com/NTIA/scos-actions@1.0.0 # via -r requirements.txt sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive # via @@ -128,6 +146,10 @@ typing-extensions==4.1.1 # asgiref # black # importlib-metadata +urllib3==1.26.9 + # via + # -r requirements.txt + # requests virtualenv==20.14.0 # via pre-commit zipp==3.8.0 diff --git a/requirements.in b/requirements.in index af6ed8f..1dfcf0d 100644 --- a/requirements.in +++ b/requirements.in @@ -1,4 +1,4 @@ django>=3.1.13, <4.0 environs>=9.0, <10.0 numpy>=1.0, <2.0 -scos_actions @ git+https://github.com/NTIA/scos-actions@0.1.0 +scos_actions @ git+https://github.com/NTIA/scos-actions@1.0.0 diff --git a/requirements.txt b/requirements.txt index 5b3b2a6..9e0d1b2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,12 +6,20 @@ # asgiref==3.5.0 # via django +certifi==2021.10.8 + # via requests +charset-normalizer==2.0.12 + # via requests django==3.2.12 # via # -r requirements.in # scos-actions environs==9.5.0 # via -r requirements.in +idna==3.3 + # via requests +its-preselector @ git+https://github.com/NTIA/Preselector@0.0.1 + # via scos-actions marshmallow==3.15.0 # via environs numpy==1.21.5 @@ -30,13 +38,15 @@ python-dotenv==0.20.0 # via environs pytz==2022.1 # via django +requests==2.27.1 + # via its-preselector ruamel-yaml==0.17.21 # via scos-actions ruamel-yaml-clib==0.2.6 # via ruamel-yaml scipy==1.7.3 # via scos-actions -scos_actions @ git+https://github.com/NTIA/scos-actions@0.1.0 +scos_actions @ git+https://github.com/NTIA/scos-actions@1.0.0 # via -r requirements.in sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive # via scos-actions @@ -48,3 +58,5 @@ sqlparse==0.4.2 # via django typing-extensions==4.1.1 # via asgiref +urllib3==1.26.9 + # via requests From 2a5a950015044b9b729cd12c449bab4549b7e1e7 Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Tue, 12 Apr 2022 15:33:01 -0600 Subject: [PATCH 11/12] fix readme --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 7bb9b62..3893e8d 100644 --- a/README.md +++ b/README.md @@ -70,9 +70,6 @@ python3 -m pip install --upgrade pip # upgrade to pip>=18.1 python3 -m pip install -r requirements-dev.txt ``` -The requirements.txt file is intended for dependencies needed for installation into -scos-sensor. It does not include dependencies already in scos-sensor. - #### Using pip-tools It is recommended to keep direct dependencies in a separate file. The direct From 4c6821eae1c373562773c837bada6aeb26822c43 Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Thu, 14 Apr 2022 14:01:39 -0600 Subject: [PATCH 12/12] add gps to init call --- scos_usrp/discover/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scos_usrp/discover/__init__.py b/scos_usrp/discover/__init__.py index 69ece28..53bc3f6 100644 --- a/scos_usrp/discover/__init__.py +++ b/scos_usrp/discover/__init__.py @@ -12,7 +12,9 @@ actions = {"monitor_usrp": MonitorSignalAnalyzer(sigan), "sync_gps": SyncGps(gps)} logger.debug("scos_usrp: ACTION_DEFINITIONS_DIR = " + ACTION_DEFINITIONS_DIR) -yaml_actions, yaml_test_actions = init(sigan=sigan, yaml_dir=ACTION_DEFINITIONS_DIR) +yaml_actions, yaml_test_actions = init( + sigan=sigan, gps=gps, yaml_dir=ACTION_DEFINITIONS_DIR +) actions.update(yaml_actions)