Closed HannoSpreeuw closed 1 month ago
After discussion at lunch table: we're generating figures locally and have them in version control, because they would take some time to render on the Github servers. It is advised to run examples from a Pluto notebook to get a more interactive experience.
Proposed fix for this immediate issue: create the figures in a different folder and only copy them to the version controlled place just before building the documentation.
Solution by @EmiliaJarochowska : Add all pngs to .gitignore and add exceptions for the git tracked figures.
@EmiliaJarochowska In hindsight, I am not sure that would work since the problems come from git tracked figures being regenerated.
Also, I currently cannot reproduce this issue.
From main
I ran poetry run brei figures
to regenerate figures and git switch -c my-beautiful-new-branch
to see if the problem persists, but it does not, afaik.
Will close this issue before the end of this week unless anyone encounters a similar problem.
Figures will only rebuild if you change some of their direct dependencies. I think this is still an issue.
All right, apologies, I should have formulated this issue more accurately:
git switch my-superduper-feature-branch
may not reproduce this issue, but git switch xy_test
will.
I am contemplating whether this issue is specific to the xy_test
branch in any manner.....
Proposed solution from @jhidding:
docs/src/*.md
matching docs/src/fig
be renamed to docs/src/_fig
pyproject.toml
to copy figures to git tracked directory doc/src/fig
(see https://entangled.github.io/brei)_fig
brei copy-figures
command
I am on the
main
branch and I ran some code without modifying.If I now want to switch to another branch, in my case
xy-test
, usinggit switch xy_test
, I getI am not sure about the
json
file, but why are thepng
files git tracked? They have apparently been reproduced by my run.Perhaps untrack these pictures? And possibly also the
json
file?Obviously
git stash
will do the job, but it is not ideal.