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

Epic: Audit differences between code and documented field names #432

Open
5 tasks
Tracked by #150
Neecolaa opened this issue Nov 8, 2024 · 7 comments
Open
5 tasks
Tracked by #150

Epic: Audit differences between code and documented field names #432

Neecolaa opened this issue Nov 8, 2024 · 7 comments
Assignees
Labels
complexity: large Very free-form with vague requirements that need to be worked out; will take many hours feature: ERD/SS adjustment Requires adjustments to be made to the ERD & Spreadsheet feature: update table role: db architect role: product s: PD team stakeholder: People Depot Team size: 2pt Can be done in 7-12 hours

Comments

@Neecolaa
Copy link
Member

Neecolaa commented Nov 8, 2024

Overview

There are field names in the code that do not currently match our documentation. We need to go through the existing django models, identify the mismatches, and update the code or documentation to comply with our desired naming conventions.

Action Items

Resources/Instructions

1.01 Code locations

1.02 People Depot Resources wiki page for links

@Neecolaa Neecolaa added role: missing size: missing s: PD team stakeholder: People Depot Team draft This issue is not fully-written feature: ERD/SS adjustment Requires adjustments to be made to the ERD & Spreadsheet feature: update table complexity: missing labels Nov 8, 2024
@Neecolaa Neecolaa added this to the v0.01. Initial Setup milestone Nov 8, 2024
@github-project-automation github-project-automation bot moved this to 🆕New Issue Review in P: PD: Project Board Nov 8, 2024
@fyliu
Copy link
Member

fyliu commented Nov 8, 2024

[name of concern]

Action Item recommended

Details

Details

I want to note that when we name a ForeignKey field something like "user", Django will create a database column called "user_id". It's Django's convention to drop the "_id" from the end when converting from db to Django code.

These screenshots illustrate how ForeignKey fields in Django actually turn into db columns with "_id" endings
Image
Image

I can find a link to a better description of this when I'm on a computer.

@shmonks shmonks moved this from 🆕New Issue Review to 🏗In progress-actively working in P: PD: Project Board Nov 15, 2024
@shmonks shmonks removed the draft This issue is not fully-written label Nov 15, 2024
@shmonks shmonks added complexity: large Very free-form with vague requirements that need to be worked out; will take many hours role: db architect role: product size: 2pt Can be done in 7-12 hours and removed complexity: missing role: missing size: missing labels Nov 15, 2024
@Neecolaa
Copy link
Member Author

Neecolaa commented Nov 18, 2024

When we get to documenting the Events tables, see the following note

event has a field called brigade_id that's commented out, but will need to be changed to org_id

@shmonks

This comment has been minimized.

@ExperimentsInHonesty
Copy link
Member

ExperimentsInHonesty commented Jan 27, 2025

Instructions
  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (if necessary): "Add any pictures that will help illustrate what you are working on."
  1. Progress: We discussed the need to get clarification from Fang on what we need to do next re the FK id in the comment above. Epic: Audit differences between code and documented field names #432 (comment) @Neecolaa will follow up with him.
  2. Blockers: time
  3. Availability: Monday meetings
  4. ETA: we will never finish this 💀💀💀💀

@ExperimentsInHonesty
Copy link
Member

ExperimentsInHonesty commented Jan 27, 2025

@Neecolaa will look for an epic and if there isn't one, make one

The issues may need to be redone to deal with any guidance we get from Fang re field names with "id" in them

@fyliu
Copy link
Member

fyliu commented Jan 27, 2025

I think we should change that name (brigade_id to org_id) in the comment. Those are supposed to be placeholders for relationships with models that don't exist yet. The code should be in the completed model, but we can't add them yet. But we also want to close the issue as complete, so we add them as comments.

These comments should only exist in models that we decided to have initially even though they depended on other models that didn't exist. So User, Project, Event I believe. Later create table issues used dependencies.

I see a couple of commented lines are probably safe to delete as well, like day_of_week, but we can also leave them for some audit issue before we release.

@ExperimentsInHonesty
Copy link
Member

ExperimentsInHonesty commented Feb 10, 2025

We decided the way to handle if a table creation has a FK, then add this text to the issue, and that will provide instructions on what the developer should do, to clear the error and make sure that their comments get uncommented when the FK table is created.

Action Items

Add links to issues

  • Go to this link: Issues tab, label: needs FK text
  • Find the FK references.
  • Find the related table issues (using issue tab, spreadsheet)
  • If the issue has a table format, we will need to add 2 extra columns for the FK designation and the issue link. See example of table issue
  • Add the links to the issues next to the FK item
  • If the issues found are all closed, then remove the label
  • if any of the issues are open, add the text below.

Update issue templates

Resources

Example

Data Fields

For each of the FK below if the FK table has not yet been created (i.e, the issue is still open), you will need to

  • comment out the code after you create it
  • add an action item on the open issue to uncomment the code line you commented out when that issue's table is created.
  • Provide your file and line number as a permalink under resources in that issue
  1. New fields

Copy text

For each of the FK below if the FK table has not yet been created (i.e, the issue is still open), you will need to
 - comment out the code after you create it 
 - add an action item on the open issue to uncomment the code line you commented out when that issue's table is created. 
 - Provide your file and line number as a permalink under resources in that issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: large Very free-form with vague requirements that need to be worked out; will take many hours feature: ERD/SS adjustment Requires adjustments to be made to the ERD & Spreadsheet feature: update table role: db architect role: product s: PD team stakeholder: People Depot Team size: 2pt Can be done in 7-12 hours
Projects
Status: 🏗In progress-actively working
Development

No branches or pull requests

4 participants