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

Data architecture #49

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Data architecture #49

wants to merge 4 commits into from

Conversation

jonodrew
Copy link
Owner

@jonodrew jonodrew commented Oct 3, 2020

This is an initial attempt to form a working data architecture for this project. The aim is:

  • for candidates to be assessed at regular points
  • for those assessments to be against a set of skills, both core and specialist
  • that assessments be against a Posting, which is a combination of a specific Role, Candidate, and point in time

v0 1 0

Copy link

@mforner13 mforner13 left a comment

Choose a reason for hiding this comment

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

Looks good to me! just a couple of questions and suggestions :)

date = db.Column(db.Date())
overall_mark = db.Column(db.String(56))

posting = db.relationship("Posting")
Copy link

@mforner13 mforner13 Oct 6, 2020

Choose a reason for hiding this comment

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

Why do you need the relationship and the foreign key?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Good question! The relationship gives me access to the related objects pythonically, while the foreign key is necessary for the database architecture

app/models.py Outdated
email_address = db.Column(db.String(120), unique=True)
secondary_email_address = db.Column(db.String(120), unique=True)
joining_date = db.Column(db.Date())
completed_fast_stream = db.Column(db.Boolean())

Choose a reason for hiding this comment

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

You don't seem to refer overtly to the fast stream anywhere else e.g. calling the repo Graduate Rotator not 'Fast Stream rotator.

If you want the app to be a blueprint which can be used for other graduate schemes, then maybe calling the field completed_graduate_scheme or completed_scheme would be more appropriate?

If not, maybe calling the app 'Fast stream rotator' and being more explicit that it's only for the fast stream would make it clearer?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Good spot - I'll drop this column

@@ -0,0 +1 @@
Generic single-database configuration.

Choose a reason for hiding this comment

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

Do readmes also need new lines at the end?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Don't know 🤔

app/models.py Outdated
Comment on lines 83 to 88
first_name = db.Column(db.String(128))
last_name = db.Column(db.String(128))
email_address = db.Column(db.String(120), unique=True)
secondary_email_address = db.Column(db.String(120), unique=True)
joining_date = db.Column(db.Date())
completed_fast_stream = db.Column(db.Boolean())

Choose a reason for hiding this comment

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

Would any of these need to be not Nullable? e.g. it seems you wouldn't want to initialise a candidate without a name and email?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Both good catches!

requirements.txt Outdated
gunicorn==20.0.4
identify==1.5.5
identify==1.5.2

Choose a reason for hiding this comment

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

Just curious - why have some of the packages been brought down in version number?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I suspect it's because another package relies on earlier versions of these packages

app/models.py Outdated
description = db.Column(db.Text())


class SkillsMixin(object):

Choose a reason for hiding this comment

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

How will this be used?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Good catch - I think I had a very over-complicated plan for this but since I don't currently use it I'll bin it and bring it back if necessary

migrate = Migrate()


class IdModel(object):

Choose a reason for hiding this comment

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

Didn't know you could do this! Just read the docs though and v cool :)

Copy link
Owner Author

Choose a reason for hiding this comment

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

Isn't it! Saves on some boilerplating

@jonodrew jonodrew force-pushed the data-architecture branch 3 times, most recently from 73cf4b0 to 5f0da03 Compare October 11, 2020 14:52
This is still only an alpha so for the moment I'm only using an SQLite database. It may be a bit annoying later, but it should be enough to get the architecture done.
This commit is the initial design and migration for the data architecture
A diagram, both as a png and UML, of the proposed database structure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants