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

Vocab refresh: Update networkx graphs #856

Open
3 tasks
joeflack4 opened this issue Aug 27, 2024 · 0 comments · May be fixed by #883
Open
3 tasks

Vocab refresh: Update networkx graphs #856

joeflack4 opened this issue Aug 27, 2024 · 0 comments · May be fixed by #883
Assignees
Labels
bug Something isn't working

Comments

@joeflack4
Copy link
Member

joeflack4 commented Aug 27, 2024

Overview

I am just now realizing that we need to refresh the networkx graphs when vocab updates happen.

Sub-tasks

  • 1. SOP or automation for updating deployments
    • Special consideration for post-funding
  • 2. SOP or automation for what to do locally
  • May also need to fix this issue before doing automation: Bug: Vocab/Counts refresh: updating DB vars with _new #857
    • Else need to also check the dates on these _new variables as well

Solution

We may be able to solve (1) & (2) simultaneously with something clever. I suggest that we have the application check if these graphs need to be regenerated at specific times, and that it should do so without needing to redeploy.

When to check:

  1. When backend is starting up
  2. Whenever a user does a GET on the home page

What happens:
The app will check when the vocab tables were last updated (ideally this should be 1 var, but right now each vocab table has its own separate var, e.g. last_updated_concept for concept table). It will compare that to the date of the graphs (e.g. relationship_graph.pickle). If the graph is outdated, it will regenerate.

Additional info

How often this will happen
The vocab tables have been updating, I think, more often than what N3C staff have told us would be expected. They say every 6 mon, but the GitHub actions reflect something like once every month or few.

@joeflack4 joeflack4 self-assigned this Aug 27, 2024
@joeflack4 joeflack4 added the bug Something isn't working label Aug 27, 2024
@joeflack4 joeflack4 changed the title Vocab refresh routine: Redeploy & regen locally Vocab refresh: Update networkx graphs Aug 27, 2024
@joeflack4 joeflack4 linked a pull request Sep 18, 2024 that will close this issue
@joeflack4 joeflack4 linked a pull request Sep 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 1. In progress / sprint
Development

Successfully merging a pull request may close this issue.

1 participant