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

Rework pyTransition README to integrate actual example scripts #1171

Merged

Conversation

greenscientist
Copy link
Collaborator

We add a python script (code-to-readme.py, created by Claude.AI) which will replace marked script sections with actual content of scripts.

This is driven by a configuration files, readme-examples-config.yaml which define name of script file and section of the script to extract.

We need to run the following to update the README file: python3 code-to-readme.py --readme README.md --config readme-examples-config.yaml

Documentation about this script usage and the config file format is in the script header

We extracted 4 scripts from the previous README and put them in the examples directory. Some fixes were applied, but part of the scripts are still broken, we will fix in further commit.

@greenscientist greenscientist force-pushed the validatePythonExampleReadme branch from 5dbfb10 to 92f793a Compare December 19, 2024 16:20
@greenscientist greenscientist force-pushed the validatePythonExampleReadme branch 2 times, most recently from 3701382 to fb1e320 Compare December 19, 2024 16:38
@greenscientist greenscientist changed the title Rework pyTransition README to intregrate actual example script Rework pyTransition README to integrate actual example scripts Dec 19, 2024
@greenscientist
Copy link
Collaborator Author

Updated with fixed routing.py

@greenscientist greenscientist linked an issue Dec 19, 2024 that may be closed by this pull request
@greenscientist greenscientist force-pushed the validatePythonExampleReadme branch from fb1e320 to 633385f Compare December 19, 2024 18:02
# Get the number of alternative paths for the current mode
geojsonPaths = value["pathsGeojson"]
geojsonPath = value["pathsGeojson"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pluralize this variable

We add a python script (code-to-readme.py, created by Claude.AI) which will replace
marked script sections with actual content of scripts.

This is driven by a configuration files, readme-examples-config.yaml which define
name of script file and section of the script to extract.

We need to run the following to update the README file:
python3 code-to-readme.py --readme README.md --config readme-examples-config.yaml

Documentation about this script usage and the config file format is in the script header

We extracted 4 scripts from the previous README and put them in the examples directory.
Scripts errors were fixed
@greenscientist greenscientist force-pushed the validatePythonExampleReadme branch from 633385f to c5dd30e Compare December 19, 2024 18:21
@greenscientist
Copy link
Collaborator Author

@tahini , requesting a review, I've added a CI config

…EADME match

Run the code_to_readme.py to insure that the user have done it when changing
script and README
@greenscientist greenscientist force-pushed the validatePythonExampleReadme branch from b25dacc to 004a90b Compare December 19, 2024 18:28
@tahini tahini merged commit 24d12b9 into chairemobilite:main Dec 19, 2024
7 checks passed
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.

pyTransition : Errors in sample code
3 participants