-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add to_vote.py and pixi.toml * add additional files
- Loading branch information
Showing
5 changed files
with
266 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# GitHub syntax highlighting | ||
pixi.lock linguist-language=YAML linguist-generated=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# pixi environments | ||
.pixi | ||
*.egg-info |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[project] | ||
name = "governance" | ||
version = "0.1.0" | ||
description = "Add a short description here" | ||
authors = ["Wolf Vollprecht <w.vollprecht@gmail.com>"] | ||
channels = ["conda-forge"] | ||
platforms = ["osx-arm64"] | ||
|
||
[tasks] | ||
vote_markdown = "python to_vote.py" | ||
|
||
[dependencies] | ||
python = ">=3.12.4,<3.13" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import csv | ||
import io | ||
from pathlib import Path | ||
|
||
def csv_to_markdown(csv_data): | ||
# Create a StringIO object to simulate a file | ||
csv_file = io.StringIO(csv_data) | ||
|
||
# Read the CSV data | ||
csv_reader = csv.DictReader(csv_file) | ||
|
||
# Start the Markdown output | ||
markdown_output = "# GitHub Users Selection List\n\n" | ||
|
||
# Process each row | ||
for row in csv_reader: | ||
github_username = row['github_username'] | ||
name = row['name'] | ||
|
||
# Build the Markdown line | ||
line = f"@{github_username} ({name})\n" | ||
line += "- [ ] yes\n" | ||
line += "- [ ] no\n" | ||
line += "- [ ] abstain\n" | ||
|
||
markdown_output += line + "\n" | ||
|
||
return markdown_output | ||
|
||
if __name__ == "__main__": | ||
# Read the CSV file | ||
csv_data = Path("steering.csv").read_text() | ||
|
||
# Convert the CSV data to Markdown | ||
markdown_output = csv_to_markdown(csv_data) | ||
|
||
print(markdown_output) |