Skip to content

Commit

Permalink
Host labels information (#743)
Browse files Browse the repository at this point in the history
### Summary

This PR adds the labels information to the JSON we host for the new
ecosystem page. It also changes the name of the file accordingly.
  • Loading branch information
frankharkins authored Jul 3, 2024
1 parent ac7acc5 commit 4ae8c3a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ dmypy.json
# Generated files
/website/index.html
/website/style.css
/website/members-data.json
/website/ecosystem.json
5 changes: 4 additions & 1 deletion ecosystem/cli/members.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,8 @@ def update_stars(self):

def compile_json(self, output_file: str):
"""Compile JSON file for consumption by ibm.com"""
data = {"members": [repo.to_dict() for repo in self.dao.get_all()]}
data = {
"members": [repo.to_dict() for repo in self.dao.get_all()],
"labels": json.loads(Path(self.resources_dir, "labels.json").read_text()),
}
Path(output_file).write_text(json.dumps(data))
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ allowlist_externals = bash
basepython = python3
commands =
bash -ec "python manager.py build --resources ecosystem/resources --output website/index.html"
bash -ec "python manager.py members compile_json 'website/members-data.json'"
bash -ec "python manager.py members compile_json 'website/ecosystem.json'"

0 comments on commit 4ae8c3a

Please sign in to comment.