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

🔧 Refactor code base to be modular for additional entities #26

Merged
merged 8 commits into from
Jan 16, 2018

Conversation

znatty22
Copy link
Member

No description provided.

Create common module for common code among resources

Separate out model code, resource code, serialization code for Person
resources

Create new folder for person tests, move all person tests into it
@znatty22 znatty22 requested a review from dankolbman January 16, 2018 15:12
from flask_restplus import Api
from .person import person_api

api = Api(title='Kids First Data Service',
api_v1 = Blueprint('api', __name__, url_prefix='/api/v1')
Copy link
Contributor

Choose a reason for hiding this comment

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

We'll probably host under api.kids-first.io. We can use /v1 for versioning, but let's drop the /api for now.

@@ -1,9 +1,9 @@
from sqlalchemy.ext.declarative import declared_attr

from datetime import datetime
from . import db
from dataservice import db
Copy link
Contributor

Choose a reason for hiding this comment

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

why the change from relative to absolute imports? Should probably stay consistent throughout the code base.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok as just discussed, we're going with absolute imports. Will make the necessary changes


HERE = os.path.abspath(os.path.dirname(__file__))
PROJECT_ROOT = os.path.join(HERE, os.pardir)
TEST_PATH = os.path.join(PROJECT_ROOT, 'tests')
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these used anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, I'll remove them

@dankolbman
Copy link
Contributor

We can also remove flask-script from requirements.txt if it's being removed.

Remove unused constants in commands.py
Remove deploy command - it is obsolete since flask CLI has a way to run
db upgrade
Copy link
Contributor

@dankolbman dankolbman left a comment

Choose a reason for hiding this comment

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

lgtm

@znatty22 znatty22 changed the title WIP: Refactor code base to be modular for additional entities ✨ Refactor code base to be modular for additional entities Jan 16, 2018
@znatty22 znatty22 changed the title ✨ Refactor code base to be modular for additional entities 🔧 Refactor code base to be modular for additional entities Jan 16, 2018
@znatty22 znatty22 merged commit a16f4d1 into person-entity Jan 16, 2018
@znatty22 znatty22 deleted the experiment/refactor branch January 17, 2018 14:02
@dankolbman dankolbman mentioned this pull request Apr 2, 2018
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.

2 participants