-
Notifications
You must be signed in to change notification settings - Fork 5
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
Creating and updating a theme has many steps #34
Labels
type: enhancement 💅🏼
New feature or request
Comments
yes! I have been wanting to automate a lot of these steps because there is indeed a looooot to do. |
This was referenced Mar 26, 2024
Merged
Carreau
pushed a commit
that referenced
this issue
Mar 28, 2024
This PR is the second PR in a series to address #34. This PR: - Adds a new Python script to the repo under `scripts/` to generate theme READMEs (in particular the contrast table in the README) - Also adds the command to the Hatch "dev" environment - Updates each theme's README with the script - Renames two screenshots for consistency - Adds some color helpers - Excludes the scripts folder from the PyPI distribution and from the "find all themes" function - Updates the docs with instructions about how to run the script
gabalafou
added a commit
that referenced
this issue
Mar 28, 2024
### Purpose This PR is the final PR to fix issue #34. (Although there will probably be some cleanup PRs following this work.) ### Summary of changes - Add Playwright to dev dependencies. (Also added setuptools, which I think should have been there all along, since it is used by the render_html script) - Add Playwright post-install step (`playwright install`) to Hatch "dev" environment config - Run the render_html script when the update_readme_for_theme script is called. (This regenerates the HTML samples of code syntax highlighting for a given theme, which are saved in the `test/results/` directory.) - Use Playwright in the update README script to take a screenshot of the HTML page generated for a particular theme. --------- Co-authored-by: M Bussonnier <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Working on #33, this is the full set of steps I had to do in order to feel like I fully updated the repo when I updated a theme:
style.py
filehatch run dev:create_css
hatch run dev:render_html
git add
, thengit restore
the irrelevant onestest/results/<theme-name>/
in my browser, take a screenshot, save it undera11y_pygments/<theme-name>/images/<theme-name>.png
, and then update the link in the theme's README.Seems to me that more of this could be automated, or at least better documented.
I also get the feeling that some of the file changes could be simplified. It looks like duplicate generated files are getting checked into the repo, for example:
The text was updated successfully, but these errors were encountered: