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

Dev #146

Merged
merged 5 commits into from
Oct 18, 2023
Merged

Dev #146

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
Empty file.
3 changes: 1 addition & 2 deletions core/endpoints/thing/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def update_thing_privacy(request, data: ThingPrivacyPatchBody, thing_id: UUID =

@router.get(
'{thing_id}/metadata',
auth=[JWTAuth(), BasicAuth()],
auth=[JWTAuth(), BasicAuth(), anonymous_auth],
response={
200: ThingMetadataGetResponse,
401: str,
Expand All @@ -338,7 +338,6 @@ def get_thing_metadata(request, thing_id: UUID = Path(...)):
thing = get_thing_by_id(
user=request.authenticated_user,
thing_id=thing_id,
require_ownership=True,
raise_http_errors=True
)

Expand Down
2 changes: 1 addition & 1 deletion core/fixtures/tests/miami/miami_10_000.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- model: core.datastream
pk: 02a1c3f0-ae31-41f6-a27a-f3e7a5d8f2a3
fields:
unit: 4064695a-120b-44e8-9b5d-ab0fb5da25ce # Degree Celsius from masterlist
unit: baf27e36-4b49-472d-9e08-1d3d3fcb04fe # Degree Celsius from Paul's list
thing: 9344a3d4-a45a-4529-b731-b51149b4d1b8 # Site in Miami
sensor: 0afabdbd-9257-4e0a-8d47-76c98fe8a513 # YSI: EXO2 Multiparameter Sonde
observed_property: e8d45a2e-3068-4cb6-b9f7-bbc22a40b6c4 # Temperature
Expand Down
2 changes: 1 addition & 1 deletion core/fixtures/tests/miami/miami_50_000.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- model: core.datastream
pk: 6db96e5d-2e50-412c-b64c-06371d63891e
fields:
unit: 4064695a-120b-44e8-9b5d-ab0fb5da25ce # Degree Celsius from masterlist
unit: baf27e36-4b49-472d-9e08-1d3d3fcb04fe # Degree Celsius from Paul's list
thing: 9344a3d4-a45a-4529-b731-b51149b4d1b8 # Site in Miami
sensor: 0afabdbd-9257-4e0a-8d47-76c98fe8a513 # YSI: EXO2 Multiparameter Sonde
observed_property: e8d45a2e-3068-4cb6-b9f7-bbc22a40b6c4 # Temperature
Expand Down
8 changes: 8 additions & 0 deletions core/fixtures/tests/people/paul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@
symbol: T
definition: http://www.example.com/unit4
type: Unit
- model: core.Unit
pk: baf27e36-4b49-472d-9e08-1d3d3fcb04fe
fields:
definition: http://qudt.org/vocab/unit#DegreeCelsius; http://unitsofmeasure.org/ucum.html#para-30; https://www.unidata.ucar.edu/software/udunits/udunits-current/udunits/udunits2-common.xml; http://his.cuahsi.org/mastercvreg/edit_cv11.aspx?tbl=Units&id=1125579048; http://qwwebservices.usgs.gov/service-domains.html
name: Degree Celsius
person: 1_000_000_001
symbol: degC; Cel
type: Temperature
- model: core.resultqualifier
pk: 565b2407-fc55-4e4a-bcd7-6e945860f11b
fields:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_core_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def base_url():
('processing-levels', {}, 200, 3, 4),
('sensors', {}, 200, 3, 4),
('things', {}, 200, 2, 4),
('units', {}, 200, 2, 4),
('units', {}, 200, 3, 4),
('result-qualifiers', {}, 200, 2, 4)
])
@pytest.mark.django_db()
Expand Down