-
Notifications
You must be signed in to change notification settings - Fork 0
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
templating #2
templating #2
Conversation
scripts/parse.py
Outdated
def write_repos(dat, config): | ||
dest = os.path.join(config.path, "repos.json") | ||
dest = os.path.join(config.path, "../data/" "repos.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seemed sensible to just write this into the data dir directly, since that's where it will get used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look good - just some comments, none of which necessarily need anything other than clarification
scripts/run_generate_graphs
Outdated
root = os.path.dirname(os.path.realpath(__file__)) | ||
with open('./static/repos.json', 'r') as f: | ||
repos = json.load(f) | ||
generate_graph(repos, "odin", "./static/odin-graph.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think it's worth doing this by the sprawling config object (so that it's easy to add more later etc)?
scripts/parse.py
Outdated
def write_repos(dat, config): | ||
dest = os.path.join(config.path, "repos.json") | ||
dest = os.path.join(config.path, "../data/" "repos.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you create the directory first here, the script errors if it does not exist already.
also can you use something other than Python's creepy implicit string concatenation (either +
explicitly or an fstring)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha, didn't actually notice I'd done this
static/individual-graph.json
Outdated
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why has only this file changed? when I ran things they all looked unprettified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also surprised that we've not picked up/removed any additional links in the graph despite the change in R package dependency parsing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just reformatted it to manually eyeball it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for that, I use cat file | jq .
usually :)
Adding categories, names and emojis into the final json generated, and using hugo templates to render the lists of repos. The same approach can be used to add new views (disease areas etc).
Also update the graph generation to use the same pattern, i.e. have an executable
run_generate_graphs
script, and deleted obsolete files.Next step will be to iterate the homepage layout.