-
Notifications
You must be signed in to change notification settings - Fork 1
Addition of the first block of code to implement the registering of new experiments #9
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
base: master
Are you sure you want to change the base?
Conversation
|
A few suggestions:
|
|
Thanks a lot for the feedback, I will be working on all of this and will send another PR as soon as I have it. In regards to this comment:
This is solved later in another commit where I had to change several other things due to that renaming. Sorry, I did not quite understand this last comment:
Thanks again for the feedback, |
Thanks, no problem.
See the "Files" view of the PR, https://github.com/SensibilityTestbed/clearinghouse/pull/9/files Scroll down a bit until you see |
…iment
- Add the new function create_experiment(): The main purpose of this function is
to add a new experiment in the database.
- Add new functions to interface.py:
- register_experiment: This function will add a new experiment to the database
by using the methodcreate_experiment() in maindb.py
- register_sensor: Function that adds a new sensor to the database calling the
create_sensor method in maindb.py
- Add the following classes to models.py:
- Experiment: Class that will save the basic data of a new experiment created
by a researcher
- Sensor: Abstract class where all sensors will inherit from. This saves the
general data from each sensor: experiment_id, frequency, frequency_unit …
- Battery, Bluetooth, Cellular, Location, Settings, ConcretSensor, Signal_strengths,
Wifi: All these classes are the ones that inherit from the Sensor class
and will store their specific values.
- Add new forms RegisterExperimentForm, GeneralSensorAtributesForm and all sensor
forms (BatteryForm, BluetoothForm, …) to the file website/html/forms.py
- Add more django blocks to website/html/templates/control/control_base.html
- Add file website/html/templates/control/registerexperiment.html This file is
currently very improvable. In later commits this one is completely changed
but for the moment it is necessary to have everything working together.
- Minor changes in indentation and spacing in website/html/urls.py
- Add registerexperiment function to website/html/views.py: This function
registers a new experiment including all the sensors that a reasearcher
might have chosen. This function although seems to work is very badly written
and will be changed in the following commits.
- Changes in website/settings.py: Changes in the INSTALLER_BUILDER and addition
of the new model: clearinghouse.website.control.models
- Change indentation in all files inside "website" folder to be two spaces per each indentation level. - Change in user bit rights from 644 to 755 to several files which were previously changed.
|
Here are the new changes in this PR:
Those three last commits have been squashed into c382868 now. The commit message is the same as the last commit of those three.
Indentation has been changed to be 2 spaces per each indentation level and the file access bits are now the same as previously (I don't know why these were changed). This can be seen here Changes that have been made following the suggestions and will come in the next PRs:
Those are now more complete here and here
Done here
In this commit, all byte lengths have been reviewed and changed to the current standards following the second recommendation here
Done in this commit
Corrected here
The comments on "_other" properties of Sensor have been rewritten
I have tried to explain it a little bit better in the docstrings from each class like the Battery one |
This Pull Request is made to add the first block of code that the previous contributor created while working in the functionality of registering of a new experiment.
As a heads up, there are some parts in the PR code that will be changed or erased in the next commits. To see which ones are and all the changes included in this PR, please, look at the last commit message. Finally, this PR may not work "as is" now but I consider it to be the fundamental base code for the future ones.
PS: I had to create a new PR because I had to change the commit messages and also some code, so please disregard the last PR I made.