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

chore: refactor "installing" resources to ~/.ptx #758

Merged
merged 22 commits into from
Jun 21, 2024

Conversation

StevenClontz
Copy link
Member

No description provided.

@StevenClontz StevenClontz marked this pull request as ready for review June 20, 2024 22:09
@StevenClontz
Copy link
Member Author

Now all static files are installed to the disk at $HOME / .ptx / PTX_VERSION / core|templates|whatever in the same manner, making getting at these things much easier using a unified resources module.

@StevenClontz
Copy link
Member Author

implemented to make #745 less of headache

@StevenClontz
Copy link
Member Author

Also we just dump everything from the core pretext repo into that folder. That means we have access to things like the sample article, which I might write a test for...

@StevenClontz StevenClontz mentioned this pull request Jun 20, 2024
@StevenClontz
Copy link
Member Author

It appears that the sample article uses https://github.com/PreTeXtBook/pretext/blob/ac1ca3ca67c9512059afd6fd37a714a7fc988a5d/pretext/pretext.py#L1034 but we haven't implemented it. @rbeezer which part of the sample article uses this feature?

@StevenClontz
Copy link
Member Author

StevenClontz commented Jun 20, 2024

Ah I see this is reverted at ac1ca3ca67c9512059afd6fd37a714a7fc988a5d

@StevenClontz
Copy link
Member Author

@dbrianwalton we'll need an update to this repo to get your dynamic exercises working

Copy link
Member

@oscarlevin oscarlevin left a comment

Choose a reason for hiding this comment

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

I did not read all of the code carefully, but I mostly agree with what you are trying to do here and trust that you have tested this sufficiently.

My only concern is that if we keep multiple versions of the .ptx resources (for different versions), then we will have lots of copies of the sample article. Just a little worried about filesize.

Okay, also one more thing: there should be an easy way to refresh the resources in case they get corrupted some how.

@StevenClontz
Copy link
Member Author

My only concern is that if we keep multiple versions of the .ptx resources (for different versions), then we will have lots of copies of the sample article. Just a little worried about filesize.

Okay, also one more thing: there should be an easy way to refresh the resources in case they get corrupted some how.

rm -rf ~/.ptx is a fix for both. I thought about adding a command like pretext clear cache but I don't think it's super important as folks don't upgrade that often (and if they do that's not a hard command).

@StevenClontz StevenClontz merged commit 1b7e8f5 into main Jun 21, 2024
1 check passed
@StevenClontz
Copy link
Member Author

An issue with packaging this: the relocated zip files aren't being grabbed...

@oscarlevin oscarlevin deleted the StevenClontz/resource-refactor branch September 10, 2024 19:51
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.

2 participants