-
Notifications
You must be signed in to change notification settings - Fork 0
Implementation and test of api namespaces for time entries #13 #43
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
Implementation and test of api namespaces for time entries #13 #43
Conversation
time_tracker_api/api.py
Outdated
| from flask_restplus import Api, fields | ||
| from flask_restplus._http import HTTPStatus | ||
| from flask_restplus.fields import Raw, to_marshallable_type, MarshallingError | ||
| from werkzeug.exceptions import Conflict |
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.
I don't see how the two last imports are being used.
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.
Sure, I will remove them
time_tracker_api/sql_repository.py
Outdated
| return self | ||
|
|
||
| SQLModel = SQLModelClass | ||
| SQLModel = DatabaseModel |
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.
Checking at changes of DatabaseModel Class, and tracing use of SQLModel It seems to me that these two classes are not useful anymore.
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.
Whatever particularity that has to be inherited by the SQLModels should be done throw the SQL model. The DatabaseModel is platform-agnostic. Before we had this to_dto function that was required by such models. This is basically an encapsulation.
time_tracker_api/database.py
Outdated
| self.run() # pragma: no cover | ||
|
|
||
|
|
||
| class DatabaseModel: |
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.
As I said in another comment. https://github.com/ioet/time-tracker-api/pull/43/files#r398215021 I think this class is not needed anymore.
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.
Ok, I will remove then ;)
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.
Done
6a9c18e to
b4d11ac
Compare
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.
LGTM!
This PR: