Skip to content

Conversation

@KhadijaMahanga
Copy link
Contributor

@KhadijaMahanga KhadijaMahanga commented Feb 3, 2021

Description

add location object to v1/nodes

Fixes # (issue)

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

esirK and others added 21 commits December 11, 2020 14:09
* Adds Location Serializer

* Allows users to list and create locations

* Adds a basename for sensors_location_router

* Adds Pagination
* Adds Node creation API endpoint

* Remove un used serializer import
* sensors endpoint

* fix serializers

* authentication on post

* sensors type endpoint

* Update sensorsafrica/api/v2/views.py

Co-authored-by: _ Kilemensi <kilemensi@users.noreply.github.com>

* Update sensorsafrica/api/v2/views.py

Co-authored-by: _ Kilemensi <kilemensi@users.noreply.github.com>

* spelling

Co-authored-by: _ Kilemensi <kilemensi@users.noreply.github.com>
* Standardize naming around views, models and routes
* Add tests
* Add SensorDataView using CursorPagination to show all available data

* Make /v2/data return all data, keept /data/<sensortype> for air/water,
etc.

* Switch computation to only work with public data (sensorsAFRICA data for
now)

* Upgrade backward compatible deps
Feinstaub framework doesn't set per view authentication classes and
hence we need default ones
* Introduce SensorTypeSerializer that will handle uid

* Use SensorTypeSerializer
* Recreate feinstaub NowView but with public sensors filter

* Switch to custom NowView
* Add NodeView that checks group ownership + pagination

* Update router to use new NodeView
* Adds endpoint for providing metadata

* Use dynamic database name

* Returns sensors locations and last time database was updated.

* Adds sensor networks to returned metadata

* Adds authentication to the meta endpoint

* Remove a default NETWORKS_OWNER

* Use latest created SensorDataValue to know when the database was last updated.

* Ensure we only return SensorLocations with a country
* Increase Gunicorn timeout to 3 minutes

* Return sorted sensors locations
* Includes country in the sensor data serializer

* Only return location id and country
* Adds a nodes filter using location

* Adds nodes filter for v1 of the API

* Remove filterling on v2 since it's only used for the F.E map

* Use default django filter backend

* Makes country location matching case insensitive.
* update node last_notify

* update nodeserializer

* import from feinstaub

* class naming

* code refactor

* remove repeating line

* comment line

* Update sensorsafrica/api/v1/serializers.py

Co-authored-by: _ Kilemensi <kilemensi@users.noreply.github.com>

* rename verbose to lastnotify

* update only when current notify is less than sensordata timestamp

Co-authored-by: _ Kilemensi <kilemensi@users.noreply.github.com>
* Adds location filter for /data endpoint

* Temporaliry Remove iexact
* add last_notify filter on nodes, sensorfilter

* view class override

* filter ovverides

* add exact to look up exp

* Includes missing import

Co-authored-by: esir <esirkings@gmail.com>
@KhadijaMahanga KhadijaMahanga self-assigned this Feb 3, 2021
@KhadijaMahanga KhadijaMahanga marked this pull request as ready for review February 3, 2021 10:54
@KhadijaMahanga KhadijaMahanga changed the title v1 nodes result structure Add location to v1 nodes Feb 3, 2021
Copy link
Member

@kilemensi kilemensi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KhadijaMahanga and others added 3 commits February 3, 2021 14:33
Co-authored-by: _ Kilemensi <kilemensi@users.noreply.github.com>
@esirK
Copy link
Contributor

esirK commented Feb 3, 2021

@kilemensi should we be merging to develop or master?

@kilemensi
Copy link
Member

@kilemensi should we be merging to develop or master?

Didn't you merge develop to master and hopeful delete develop yesterday @esirK ?

@esirK
Copy link
Contributor

esirK commented Feb 3, 2021

@kilemensi I did merge develop into master but didn't delete it. Updating this PR to point the merge into master.

@esirK esirK changed the base branch from develop to master February 3, 2021 11:44
@esirK esirK changed the base branch from master to develop February 3, 2021 11:44
@KhadijaMahanga
Copy link
Contributor Author

@esirK why did you change back to develop?

@esirK esirK changed the base branch from develop to master February 3, 2021 11:47
@esirK
Copy link
Contributor

esirK commented Feb 3, 2021

@esirK why did you change back to develop?

The number of commits. I'm not sure it's correct

@kilemensi
Copy link
Member

If it's an issue @KhadijaMahanga can you push to a different branch and we then delete both this and develop branches?

@KhadijaMahanga KhadijaMahanga mentioned this pull request Feb 3, 2021
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants