Skip to content

Conversation

@IsaacMilarky
Copy link

@IsaacMilarky IsaacMilarky commented Jun 5, 2025

Integrate Fetch Scripts

Problem

Currently the scripts don't work well with each other to merge all of our data from various sources.

Solution

Create a super script that calls both scripts and merges the indexes as well as the data itself.

Result

Summary:

  • Create __init__.py file to make python recognize scripts folder as a module
  • add pull-all-assets.py file to make scripts be able to be called from one invocation
  • Move the logic that merges two indexes to a separate file in a function for reuse
  • Use this method in pull_public_assets.py to merge legacy index with the newly generated one
  • Rename files to use underscores since you can't import files with dashes in them in Python
  • Add a function to determine which codejson file is the most up to date and then return the most up to date one
  • Use that function so that only the most up to date codejson file is saved in each script

Test Plan

Run the script locally

… add a util function for merging the data from differant indexes

Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Copy link

@sachin-panayil sachin-panayil left a comment

Choose a reason for hiding this comment

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

LGTM! 🔥

@IsaacMilarky IsaacMilarky merged commit afc3b27 into main Jun 6, 2025
6 of 9 checks passed
@IsaacMilarky IsaacMilarky deleted the integrate-scripts branch June 6, 2025 17:31
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.

3 participants