Skip to content

Commit

Permalink
Merge branch 'main' into batch_badges_2024_06_27_09_01
Browse files Browse the repository at this point in the history
  • Loading branch information
frankharkins authored Jul 3, 2024
2 parents d806a82 + 706de7d commit c77df18
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,4 @@ dmypy.json
# Generated files
/website/index.html
/website/style.css
/website/members-data.json
7 changes: 7 additions & 0 deletions ecosystem/cli/members.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""CliMembers class for controlling all CLI functions."""

import json
import os
from typing import Optional, Tuple
from pathlib import Path

import requests

Expand Down Expand Up @@ -102,3 +104,8 @@ def update_stars(self):
stars = json_data.get("stargazers_count")
self.dao.update(project.url, stars=stars)
self.logger.info("Updating star count for %s: %d", project.url, stars)

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()]}
Path(output_file).write_text(json.dumps(data))
2 changes: 1 addition & 1 deletion ecosystem/resources/labels.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Advocate mentorship project": "Develped as part of the Qiskit Advocate Mentorship Program (QAMP)",
"Advocate mentorship project": "Developed as part of the Qiskit Advocate Mentorship Program (QAMP)",
"Algorithms": "Implements quantum algorithms",
"Chemistry": "Applies quantum computing to chemistry",
"Circuit": "Builds or modifies quantum circuits",
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +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'"

0 comments on commit c77df18

Please sign in to comment.