Skip to content

Conversation

@EliuX
Copy link
Contributor

@EliuX EliuX commented Mar 25, 2020

This PR:

  • Creates the implementation for the API namespace for time entries
  • Creates the tests for the API namespace for time entries
  • Replaces the status codes for constants
  • Improves documentation of expected status codes for the API namespace for projects and time entries

@EliuX EliuX requested a review from Angeluz-07 March 25, 2020 22:07
@EliuX EliuX changed the title Feature/persist api ns for time entries#13 Implementation and test of api namespaces for time entries #13 Mar 25, 2020
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
Copy link
Contributor

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.

Copy link
Contributor Author

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

return self

SQLModel = SQLModelClass
SQLModel = DatabaseModel
Copy link
Contributor

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.

Copy link
Contributor Author

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.

self.run() # pragma: no cover


class DatabaseModel:
Copy link
Contributor

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.

Copy link
Contributor Author

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 ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@EliuX EliuX force-pushed the feature/Persist-api-ns-for-time-entries#13 branch from 6a9c18e to b4d11ac Compare March 25, 2020 23:10
Copy link
Contributor

@Angeluz-07 Angeluz-07 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Angeluz-07 Angeluz-07 merged commit 8843766 into master Mar 25, 2020
@EliuX EliuX self-assigned this Apr 17, 2020
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.

3 participants