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

Sensor edition should protect min/max battery #15

Open
myddrin opened this issue Apr 30, 2022 · 0 comments
Open

Sensor edition should protect min/max battery #15

myddrin opened this issue Apr 30, 2022 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@myddrin
Copy link
Collaborator

myddrin commented Apr 30, 2022

Currently on a new sensor it is "None" and when editing as is it will crash instead of returning a BAD_REQUEST

We should also try to validate it in JS or have a default at creation that would allow us to have floats directly

@myddrin myddrin added bug Something isn't working enhancement New feature or request labels Apr 30, 2022
jordanpenard added a commit that referenced this issue May 5, 2022
… value and editing is now allowing for float (Issue #15)
jordanpenard added a commit that referenced this issue Jun 1, 2022
* Updates to the documentation and move to py3.9.

- Update documentation to link the readme together.
- Update to python 3.9

* Remove battery graph, add sensor name and back-end changes.

- Extract sensor name from the table when creating the view data.
  This is to simplify how we create plotly traces.
- Remove the battery plot, it's usually not very interesting.
- Add an __init__ file for the admin views. But they should probably
  not be in their own flask app but in the accessor one with a need
  for an admin to be logged-in.
- The schema is now built from the storage.access classes so that the
  fields can't be different in SQL and in the back-end.
  This made me rename DataPoints to Datapoint.
- Unify object creation to `create` that returns the new object as well
  as creating it in the db.

* Start implementing unit tests with pytest

- Test the db initialisation on an empty file.
- Move the main table objects to table.py and write tests to ensure
  their get_all() method returns them all.
- Fix axis overlay when battery trace was removed.
- Start writing unit tests for the table classes and the utils.

* Update based on review

* Fix bug in template as admin.users is now admin.all_users

* Changed admin.admin_sensors for admin.all_sensors

* Started fixing the admin/projects/ view error, but there's still something to fix

* Add tests for admin views.

Refactor the row_factory to use metadata information.

* When creating a sensor, min and max battery are now getting a default value and editing is now allowing for float (Issue #15)

* Added the ability to add new sensors for the admin sensor page (Issue #14)

* Edited the test based on the new default values for min and max battery on sensor creation

* Add more unit tests for views.

Add setup.cfg to have random order of tests.

* Fix sensor default

* Added ci/cd setup for github

* Turned the add sensor view into a mako function

* Revert add sensor

* Add tests for project views

* Introduce makefile to simplify CI steps

* Fix style and introduce subquery in the metadata to simplify request creations

* Move help method out of conftest and add tests for subqueries

* Minor modification to CI and update readme

Co-authored-by: Jordan Penard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant