Host labels information (#743)
### 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.
This commit is contained in:
parent
ac7acc5c40
commit
4ae8c3ac55
|
@ -141,4 +141,4 @@ dmypy.json
|
||||||
# Generated files
|
# Generated files
|
||||||
/website/index.html
|
/website/index.html
|
||||||
/website/style.css
|
/website/style.css
|
||||||
/website/members-data.json
|
/website/ecosystem.json
|
||||||
|
|
|
@ -107,5 +107,8 @@ class CliMembers:
|
||||||
|
|
||||||
def compile_json(self, output_file: str):
|
def compile_json(self, output_file: str):
|
||||||
"""Compile JSON file for consumption by ibm.com"""
|
"""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))
|
Path(output_file).write_text(json.dumps(data))
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -39,4 +39,4 @@ allowlist_externals = bash
|
||||||
basepython = python3
|
basepython = python3
|
||||||
commands =
|
commands =
|
||||||
bash -ec "python manager.py build --resources ecosystem/resources --output website/index.html"
|
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'"
|
||||||
|
|
Loading…
Reference in New Issue