-
Notifications
You must be signed in to change notification settings - Fork 7
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
Chore/setup update api v2 #138
base: master
Are you sure you want to change the base?
Conversation
@thepsalmist all v2 endpoints passed but a confusion may arise with Check out API endpoints list we have on V2 and V1
The |
Thanks @gideonmaina updating as per above |
🚨🚨 |
The above issues have been resolved |
Resolved |
Observations for
|
@thepsalmist There is also this |
@thepsalmist the endpoints called from the frontend currently are: v1
v2
and this filter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All v2
endpoints are working as expected 🙌🏼.
These observations/ recommendations can be a new issue.
# Install feinstaub from opendata-stuttgart | ||
RUN pip install -q git+https://github.com/opendata-stuttgart/feinstaub-api | ||
# Copy the current directory contents into the container at sensorsafrica | ||
COPY . /src/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thepsalmist a .dockerignore
file will be necessary for local builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a priority at the moment though
RUN pip install -q -U . | ||
# Upgrade pip and setuptools, install dependencies | ||
RUN pip install -q git+https://github.com/opendata-stuttgart/feinstaub-api && \ | ||
pip install -q -U . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thepsalmist let's remove the second pip upgrade attempt && pip install -q -U .
as it is already sorted by RUN python -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip setuptools
sensorsafrica/api/v1/views.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is Django v >=1.10
@@ -18,7 +18,6 @@ | |||
from rest_framework import routers | |||
|
|||
router = routers.DefaultRouter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thepsalmist this router will no longer be used. We can delete it.
@@ -29,6 +29,11 @@ GRANT ALL PRIVILEGES ON DATABASE sensorsafrica TO sensorsafrica; | |||
|
|||
- Migrate the database; `python manage.py migrate` | |||
- Run the server; `python manage.py runserver` | |||
- Create super user for admin login; `python manage.py createsuperuser` | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add that a .env
file is needed that refers to .env.template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh this should be under Docker setup
…sensors.AFRICA-api into chore/setup-update-api-v2
Hey @thepsalmist what is holding us back? |
Description
The PR introduces build fixes and dependency upgrades & patches for implementation of authentication for key endpoints prone to bot crawling. The affected endpoints/views in API
v1
aredata
,now
andnode
. The API endpoints inv2
all useToken
andSession
authentication.Push sensors data endpoint still remains on
v1/push-sensor-data
. Note: This would require firmware upgradeFixes issues #134, #135, #136
Type of change
Please delete options that are not relevant.
Checklist: