8000 Only copy the static/theme files once by dsschult · Pull Request #510 · saimn/sigal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Only copy the static/theme files once #510

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

Merged
merged 3 commits into from
Feb 28, 2024
Merged

Conversation

dsschult
Copy link
Contributor

The static/theme files were being copied multiple times, every time a Writer was instantiated. This PR makes only a single instance copy the files.

Copy link
codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (27e10d4) 88.72% compared to head (4517e8e) 88.73%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #510      +/-   ##
==========================================
+ Coverage   88.72%   88.73%   +0.01%     
==========================================
  Files          25       25              
  Lines        2066     2069       +3     
==========================================
+ Hits         1833     1836       +3     
  Misses        233      233              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@saimn
Copy link
Owner
saimn commented Feb 22, 2024

Nice finding, thanks!
Maybe instead of using an argument to trigger the copy, this could go in a method that would be called on the first instantiation ?

@dsschult
Copy link
Contributor Author
dsschult commented Feb 22, 2024

I moved it to a method, but it needs to be an explicit call from the gallery build step or several tests fail (because only the first gallery instance in the tests will copy the files, and all others would not).

@saimn saimn added this to the 2.5 milestone Feb 28, 2024
@saimn saimn merged commit 9eead93 into saimn:main Feb 28, 2024
@saimn
Copy link
Owner
saimn commented Feb 28, 2024

Thanks!

@dsschult dsschult deleted the write-static-once branch February 28, 2024 17:01
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
0