Skip to content
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

Order labels into categories #742

Merged
merged 2 commits into from
Jul 3, 2024
Merged

Order labels into categories #742

merged 2 commits into from
Jul 3, 2024

Conversation

frankharkins
Copy link
Member

Summary

This PR orders labels into categories, which is needed for the new ecosystem page. It does not remove or edit any labels, that's work for a future PR.

ecosystem/cli/website.py Outdated Show resolved Hide resolved
ecosystem/cli/website.py Outdated Show resolved Hide resolved
ecosystem/cli/website.py Outdated Show resolved Hide resolved
@frankharkins frankharkins enabled auto-merge (squash) July 3, 2024 16:41
@frankharkins frankharkins merged commit ac7acc5 into main Jul 3, 2024
4 checks passed
@frankharkins frankharkins deleted the FH/labels-categories branch July 3, 2024 16:42
@frankharkins frankharkins mentioned this pull request Jul 4, 2024
frankharkins added a commit that referenced this pull request Jul 4, 2024
### Summary

This PR updates the labels to the new list for the new ecosystem page.
There are a few changes here but it's not easy to split them into PRs as
many rely on eachother. To make reviewing easier, you can instead view
each commit.

1. cdad7f6 updates `labels.json` with
the new list of labels.
2. 8a0249a uses a short script to
automatically remove and update labels. This commit also adds the
`ibm_maintained` attribute to the repository model, which will be
required for the new page.
  
   <details><summary>Show script</summary>

   ```python
   from ecosystem.daos import DAO

   REMOVED_LABELS = [
       "Advocate mentorship project",
       "Circuit",
       "IBM maintained",
       "Julia",
       "Jupyter notebook",
       "Partner",
       "Education",
       "Hardware",
       "OpenQASM",
       "Productivity",
       "Prototype",
       "Quantum information",
       "Rust",
       "Visualization",
   ]

   dao = DAO("ecosystem/resources/")

   for repo in dao.get_all():
       # Pull IBM maintenance status into attribute
       if "IBM maintained" in repo.labels:
           repo.ibm_maintained = True

       # Update labels
       if "Circuit" in repo.labels:
           repo.labels.append("Circuit building tool")
       repo.labels = [l for l in repo.labels if l not in REMOVED_LABELS]
       repo.labels.sort()

       # Turn group attribute into label
       if repo.group == "transpiler_plugin":
           repo.labels.append("Transpiler plugin")
       if repo.group == "applications":
           repo.labels.append("Application package")
       if repo.group == "provider":
           repo.labels.append("Compute provider")

       dao.write(repo)
   ```
   </details>

The `group` attribute can be ignored by the new ecosystem page, so it
will remain until the current page it taken down.

3. 26e1594 manually reviews each member
again to make sure labels are still relevant.
4. 84061e3 adds some logic to have the
`ibm_maintained` attribute appear as a label on the current webpage.
Like #742, this makes the current website generation script a bit more
brittle. This is ok as it's a temporary trade-off; the current page will
not be online much longer.
5. 71e13b7 updates the issue template
with the new labels and `ibm_maintained` attribute. It also updates the
parser to handle the new attribute. See
https://github.com/frankharkins/ecosystem/pull/95/files for an example
of the parser working correctly.
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.

2 participants