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

SCOS Actions 6.2.1 #230

Merged
merged 9 commits into from
Apr 11, 2023
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
61 changes: 49 additions & 12 deletions configs/sensor_definition.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,66 @@
{
"id": "seadog",
"id": "OVERWRITTEN BY FQDN ENVIRONMENT VARIABLE",
"location": {
"x": -105.26208,
"y": 39.99473,
"z": 1700.0,
"description": "SENSOR LOCATION, X=LON, Y=LAT, Z=ALTITUDE"
},
"sensor_spec": {
"id": "seadog",
"model": "seadog"
"id": "UNIQUE SENSOR ID",
"model": "SENSOR MODEL",
"version": "SENSOR VERSION"
},
"antenna": {
"antenna_spec": {
"id": "",
"model": "None"
"id": "UNIQUE ANTENNA ID",
"model": "ANTENNA MODEL"
}
},
"preselector" : {
"preselector_spec" : {
"supplemental_information" : "Oldest rev preselector with no enclosure"
"id": "UNIQUE PRESELECTOR ID",
"model": "PRESELECTOR MODEL",
"version": "PRESELECTOR VERSION"
},
"cal_sources" : [ { "enr": 14.53 } ]
"cal_sources" : [
{
"cal_source_spec": {
"id": "UNIQUE NOISE SOURCE ID",
"model": "NOISE SOURCE MODEL"
},
"type": "NOISE SOURCE TYPE",
"enr": -999.9
}
],
"amplifiers": [
{
"amplifier_spec": {
"id": "UNIQUE AMPLIFIER ID",
"model": "AMPLIFIER MODEL"
},
"gain": 1.0,
"noise_figure": 0.0
}
],
"filters": [
{
"filter_spec": {
"id": "UNIQUE FILTER ID",
"model": "FILTER MODEL"
}
}
]
},
"signal_analyzer": {
"sigan_spec": {
"id": "",
"model": "Tektronix RSA 507A"
"id": "UNIQUE SIGNAL ANALYZER ID",
"model": "SIGNAL ANALYZER MODEL"
}
},
"computer_spec": {
"id": "",
"model": "Intel NUC"
}
"id": "UNIQUE COMPUTER ID",
"model": "COMPUTER MODEL"
},
"mobile": false
}
2 changes: 1 addition & 1 deletion src/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def cleanup_db(db):
shutil.rmtree(settings.MEDIA_ROOT, ignore_errors=True)


@pytest.yield_fixture
@pytest.fixture
def testclock():
"""Replace scheduler's timefn with manually steppable test timefn."""
# Setup test clock
Expand Down
4 changes: 2 additions & 2 deletions src/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ scipy==1.10.1
# via
# -r requirements.txt
# scos-actions
scos_actions @ git+https://github.com/NTIA/scos-actions@6.2.0
scos_actions @ git+https://github.com/NTIA/scos-actions@6.2.1
# via
# -r requirements.txt
# scos-tekrsa
scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@3.0.2
scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@3.0.3
# via -r requirements.txt
sigmf @ git+https://github.com/NTIA/SigMF@multi-recording-archive
# via
Expand Down
4 changes: 2 additions & 2 deletions src/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ psycopg2-binary>=2.0, <3.0
pyjwt>=2.4.0, <3.0
requests-mock>=1.0, <2.0
requests_oauthlib>=1.0, <2.0
scos_actions @ git+https://github.com/NTIA/scos-actions@6.2.0
scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@3.0.2
scos_actions @ git+https://github.com/NTIA/scos-actions@6.2.1
scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@3.0.3
4 changes: 2 additions & 2 deletions src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@ ruamel-yaml-clib==0.2.7
# via ruamel-yaml
scipy==1.10.1
# via scos-actions
scos_actions @ git+https://github.com/NTIA/scos-actions@6.2.0
scos_actions @ git+https://github.com/NTIA/scos-actions@6.2.1
# via
# -r requirements.in
# scos-tekrsa
scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@3.0.2
scos_tekrsa @ git+https://github.com/NTIA/scos-tekrsa@3.0.3
# via -r requirements.in
sigmf @ git+https://github.com/NTIA/SigMF@multi-recording-archive
# via scos-actions
Expand Down
4 changes: 2 additions & 2 deletions src/sensor/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ def get_datetime_from_timestamp(ts):
return datetime.fromtimestamp(ts)


def get_timestamp_from_datetime(dt):
def get_timestamp_from_datetime(dt: datetime):
"""Assumes UTC datetime."""
return int(dt.strftime("%s"))
return int(dt.strftime("%S"))


def parse_datetime_str(d):
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/tests/test_list_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_user_cannot_view_result_list(admin_client, user_client):
url = reverse_result_list(entry_name)
response = user_client.get(url, **HTTPS_KWARG)
rjson = validate_response(response, status.HTTP_403_FORBIDDEN)
return "results" not in rjson
assert "results" not in rjson


@pytest.mark.django_db
Expand Down