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

Autogenerate image documentation #375

Closed
hunterowens opened this issue Oct 11, 2019 · 8 comments
Closed

Autogenerate image documentation #375

hunterowens opened this issue Oct 11, 2019 · 8 comments
Labels
admin Administrative chores etc. Agency Specific to the Agency API State Machine Changes in the vehicle state events and state machine diagram

Comments

@hunterowens
Copy link
Collaborator

Describe the bug
The agency state machine diagram often goes out of sync with the actual state machine. Let's have this diagram be auto generated by a script and inherit from the JSON schema. @Karcass volunteered to tackle this.

To Reproduce
Steps to reproduce the behavior:

Expected behavior
Update the releaseProcess doc to make sure we regenerate the image.

Additional context
Add any other context about the problem here.

@hunterowens hunterowens added admin Administrative chores etc. Agency Specific to the Agency API labels Oct 11, 2019
@hunterowens hunterowens added this to the 0.4.1 milestone Oct 11, 2019
@HenriJ
Copy link

HenriJ commented Jan 3, 2020

@Karcass are you still volunteering to do that ? (I see @hunterowens unassigned you a couple of days later) ?
If not, how did you generate the image ?

@hunterowens Are you sure we have enough information inside the JSON schema to generate the transition diagram ?

@marie-x
Copy link
Collaborator

marie-x commented Jan 3, 2020

Yes, I have someone working on the generator app. ETA uncertain but it'll definitely be done for 0.4.1.

@Retzoh
Copy link
Contributor

Retzoh commented Feb 26, 2020

@sarob as discussed in the city-services meeting, this issue should be moved to the 0.5.0 milestone.

@Retzoh
Copy link
Contributor

Retzoh commented Feb 26, 2020

We are waiting for #271 to be solved.

@thekaveman thekaveman modified the milestones: 0.4.1, Future Feb 26, 2020
@schnuerle
Copy link
Member

#271 is now solved. And we have a new State Machine Diagram. Right now it's being managed in Slides and is pretty easy to edit and save as an SVG to the repo.

@thekaveman made an auto generator, but the results were not as clear or intuitive. I think we should keep this manual process in place for now since the diagram doesn't change much and readability is more important that autogeneration.

@schnuerle
Copy link
Member

@janedotx autogenerated an image, and it was also very complex and not easy to read. I like the idea of autogenerating not only this, but the schemas as well. But given the current complexity of the vehicle state events and the state machine diagram, I can't think of a good way to autogenerate the diagram and have it readable, presentable as an image, editable at no cost, and visually appealing.

If anyone wants to tackle this still, and has ideas on a solution, please leave a comment here.

@schnuerle
Copy link
Member

Have you all seen how complex these state machines are!? I don't think they could be auto generated easily from the table. I'm giving up the dream and closing this down...

@schnuerle schnuerle removed this from the Future milestone Feb 14, 2023
@schnuerle schnuerle added the State Machine Changes in the vehicle state events and state machine diagram label Feb 14, 2023
@schnuerle
Copy link
Member

I know this is closed, but adding that GitHub now has a way to generate state machine diagrams in the spec with Mermaid. I don't think it can be auto generated like we hoped, but the code to make the diagram may be easier to write than doing it in Google Sheets. Much of it can be pulled from the table we have showing the states and event transitions.

https://mermaid.js.org/syntax/stateDiagram.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin Administrative chores etc. Agency Specific to the Agency API State Machine Changes in the vehicle state events and state machine diagram
Projects
None yet
Development

No branches or pull requests

6 participants