Skip to content

Commit

Permalink
Use key communities list from team compass (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf authored Feb 7, 2024
1 parent 4e72417 commit bd65cca
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ dmypy.json
# Data files bundled with this tool that we don't want to check in
book/data/github-activity.csv
book/data/hub-activity.csv
book/data/key-communities.toml

# A place to manually store data we use as part of data updating
book/scripts/_data/
Expand Down
20 changes: 18 additions & 2 deletions book/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title = "2i2c KPIs"
extensions = ["myst_nb", "sphinx_design", "sphinx_togglebutton", "sphinx.ext.intersphinx"]

exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints", "data/**"]
only_build_toc_files = True

myst_enable_extensions = [
Expand All @@ -24,4 +24,20 @@
"docs": ("https://docs.2i2c.org/en/latest/", None),
"infra": ("https://infrastructure.2i2c.org/en/latest/", None),
"tc": ("https://compass.2i2c.org/en/latest/", None),
}
}

# Download key communities CSV file if it isn't there
from pathlib import Path
import urllib.request

# URL of the file to download
file_url = 'https://compass.2i2c.org/_downloads/8fa10f7f661246ec4fbe1515e254aa6d/key-communities.toml'
file_local = Path("data/key-communities.toml")

# Open the URL
if not file_local.exists():
with urllib.request.urlopen(file_url) as response:
# Read the content of the response
file_content = response.read()
file_local.write_bytes(file_content)
print(f"Downloaded new key communities file to: {file_local}")
6 changes: 0 additions & 6 deletions book/data/key-communities.yml

This file was deleted.

5 changes: 4 additions & 1 deletion book/upstream.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import json
from ast import literal_eval
from IPython.display import Markdown
from urllib.parse import quote
from tomlkit import parse
```

+++ {"tags": ["remove-cell"]}
Expand All @@ -52,7 +53,8 @@ from urllib.parse import quote
:tags: [remove-cell]
# Load data that we'll use for visualization
communities = safe_load(Path("data/key-communities.yml").read_text())
with Path("data/key-communities.toml").open() as ff:
communities = parse(ff.read())["communities"]
communities = list(filter(lambda a: a != "2i2c-org", communities))
team = safe_load(Path("data/team.yml").read_text())
```
Expand Down Expand Up @@ -168,6 +170,7 @@ def visualize_over_time(df, on="updatedAt", title=""):

Key upstream communities are communities that 2i2c utilizes, empowers, and supports.
We try to use technology from these communities wherever possible, and put additional team resources towards making upstream contributions and providing general support.
See [the 2i2c team compass](inv:tc#open-source/key-communities) for more information about this.

Below are 2i2c's key upstream communities:

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ linkify-it-py
rich
sphinx-design
sphinx-togglebutton
tomlkit

# For developing
itables
Expand Down

0 comments on commit bd65cca

Please sign in to comment.