-
Notifications
You must be signed in to change notification settings - Fork 13
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
[ISSUE 7] Automated diagram generation #11
Conversation
These schemas will be used to parse the yaml file which contains the milestone summary as well as to generate the diagram and markdown files
This function loads a yaml file and returns a MilestoneSummary object
This function accepts a path to a jinja template and returns a string that has been populated with a series of parameters
Typer supports building simple but powerful CLI tools
This provides a single source of truth for milestones in the repo
This is great! I got caught up on an issue with type annotations in python 11, which begs the question which versions of Python we should support 🤔 . When I run in a env with 3.11, I get the following error: poetry run milestones validate hello
Traceback (most recent call last):
File "<string>", line 1, in <module>
RuntimeError: Type not yet supported: str | None Will continue reviewing ASAP. |
@acouch @lucasmbrown-usds I might close this PR so it's not pulling us away from some of the higher priority WIP we have in other PRs. Additionally I think we wanted to avoid moving milestone details into a format that is harder for non-technical users to access (e.g. yaml). As I mentioned to you both, there might be another way to repurpose some of this code and achieve the underlying goals of:
The TL;DR for this strategy is a potential shift to using GitHub issues as the canonical source source for Milestone summary level details and then using the GitHub API to generate and update the diagram and summary doc. If we do move in that direction though I'll open a separate PR with the updated code. |
Thanks @widal001 , sounds like a reasonable call. This was a very cool and exciting prototype! |
Overview
Description
This PR changes the approach to populating both the
milestone_short_descriptions.md
and themilestone_dependencies_diagram.mmd
files by having the summary-level details about each milestone defined in a centralized YAML file then providing a CLI tool that automates the creation of these two files based on the data in that YAML file.Fixes: #7
Motivation
There are three primary goals associated for this proposed shift:
Hackathon
milestones.Changes Proposed
documenation/milestones/mileston-summaries.md
milestone-cli/milestone_cli
python package which contains the following sections:templates/
Jinja templates for rendering the diagram and the markdown filesschemas.py
Defines pydantic models used to deserialize and validate the milestones from in the yaml fileutils.py
Defines a set of utility functions used to populate the output files from the templatescli.py
Defines the CLI entry points that developers can use to validate the yaml file and populate the templatesPR Details
Instructions to Review
git checkout widal001:ISSUE-7-automated-diagram-generation
git pull
cd milestone-cli
python --version
poetry --version
poetry install
poetry shell
pytest
milestones validate
description:
lines and runmilestones validate
again, it should raise an error.milestones populate diagram ./diagram.mmd
milestones populate summary ./summary.md
exit
TODO
milestone-summaries.yaml
tox.ini
and GitHub actions to enforce checks