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

Conversion to Graph Database #407

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

Conversion to Graph Database #407

wants to merge 46 commits into from

Conversation

DMalone87
Copy link
Collaborator

@DMalone87 DMalone87 commented Aug 14, 2024

  • Done: Convert to graph database
  • Done: Update requirements
  • Done: Remove SQLAlchemy
  • Done: Update API to support db changes
  • Done: Complete the data model conversion
  • Done: Update tests to use the new DB
  • Pass: Add database migration
    • This will be handled in a future update.

- Convert to graph-based data model
- Update requirements
- Todo: Update API to support db changes
- Todo: Complete the data model conversion
- Todo: remove SQLAlchemy
@DMalone87 DMalone87 added enhancement New feature or request backend labels Aug 21, 2024
@DMalone87 DMalone87 self-assigned this Aug 21, 2024
Convert routes to use neomodel instead of SQLAlchemy
- Update docker-compose.yml to use the new neo4j container
- Make additional corrections to the db models
Additionally: Change env variable w/PDT to NPDI
Our env vars will be changing anyway, so we might
as well make this change now.
@DMalone87
Copy link
Collaborator Author

Most recent update finally has the Graph DB image replacing the PGSQL one. I'm using version 5.23-community

@DMalone87 DMalone87 changed the title Conversion to graph-based data model: Stage 1 Conversion to Graph Database Sep 18, 2024
- Add suffix to officer names
- Add type and subtype to allegations
- Add record ID to allegation and complaint
- Allow for multiple agencies with the same name
Implement hidden fields
Implement serialization of Node properties
- Note: This is a WIP
- Get all partners
- Get partner by ID
- Create partner
- Get officer by ID
- Get all officers
- Create officer

Fix error in officer model
Add enum property for Partner MemberRole
- officers
- agencies
- partners
Fix temporary pydantic schema for agencies
@DMalone87
Copy link
Collaborator Author

With the most recent update, the API works for most endpoints. Core CRUD functions are there. I'll most likely move on to getting the testing and migration infrastructure settled and handle the rest of the API function in a future PR. There will be some big changes coming to the API to bring it in line with the new API spec, so it's best to handle that at all at once.

@DMalone87 DMalone87 marked this pull request as ready for review October 14, 2024 21:20
Copy link
Collaborator

@zganger zganger left a comment

Choose a reason for hiding this comment

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

A few code style failures in test- will prevent this from being deployed. Though without db migration that may not matter.


- name: Types
if: always()
run: npm run check-types
Copy link
Collaborator

Choose a reason for hiding this comment

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

why remove frontend tests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The front end is going to change significantly pretty soon so I didn't think it was that big of a priority.

That and I didn't really understand the test that was failing at the time. It was something to do with the registration page... The page runs and completes registration successfully though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

2 participants