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

Fix various problems - main one was systematic execution of .py scripts, regardless of md5 hash check #27

Merged
merged 6 commits into from
Mar 8, 2022

Conversation

mchaaler
Copy link
Contributor

@mchaaler mchaaler commented Feb 25, 2022

Since I'm not confident enough with tests, I did not add the corresponding non-regression tests. Eager to learn by looking at how you'll implemented them!

EDIT:
Fixes #28
Fixes #29
Fixes #32

@mchaaler mchaaler changed the title Fix various problems - main one was systematic execution of .py scripts, regardles of md5 hash check Fix various problems - main one was systematic execution of .py scripts, regardless of md5 hash check Feb 25, 2022
@smarie
Copy link
Owner

smarie commented Mar 4, 2022

Thanks a lot @mchaaler ! Very nice

I see three things in this PR:

  • developer doc fix and git ignore update
  • the extra .resolve() statements : are these related to a specific platform or use case ? what was not working before this ?
  • the thumbnail resolution when the script is not re-run ([gen_single.py](https://github.com/smarie/mkdocs-gallery/pull/27/files#diff-6c01323da63ab6f1db29efb3284b8ce526bdbe9da4e622f5b19e7d71b090c994))

Can you please create one issue for each of these bullet points, so that we can relate the PR ? We can keep this single PR fixing the 3 at once.

In particular I do not understand how the thumbnail resolution fix I see in the PR, relates to the title in this PR (python scripts being re-run even if the md5 hash is the same). Can you please elaborate ? Thanks in advance !

@mchaaler
Copy link
Contributor Author

mchaaler commented Mar 4, 2022

Hi!
Just created issues #28 & #29 corresponding to 1st and 3rd bullet points. Hope the comments help clarifying things a bit, by the way.

Considering the extra resolve() statements added in 4896676, I need to dig further. I am not able to reproduce the bug at home so far (worked on it from the office), although the platforms are similar (Windows 10/11, PyCharm & Git-bash or fish, conda virtual environment). The use cases are different though: working on mkdocs-gallery itself at home, on a business project at work.

…dir is relative - '.' for instance - project_root2 is inevitably different."

This reverts commit 4896676.
@mchaaler
Copy link
Contributor Author

mchaaler commented Mar 6, 2022

I think I got it.
Since I wanted to disable the "edit URL" link, as MkDocs documentation explains, I tried to set the "edit_uri" parameter to an empty string in mkdocs.yml.
This did not work because of issue #32.
I then decided (don't know exactly why...) to replace the empty string by "." (or "./"), which caused the problem mentioned in 4896676, but actually did not give the expected result (removing the "edit URL" link)...

Just added a commit to the PR that fixes issue #32, and reverted 4896676.

@smarie
Copy link
Owner

smarie commented Mar 8, 2022

All set, thanks @mchaaler !

@smarie smarie merged commit 0c1bcbe into smarie:main Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants