Skip to content

Bake in relocatable data#351

Open
nhz2 wants to merge 2 commits intoJuliaData:masterfrom
nhz2:nz/bake-in-relocatable-data
Open

Bake in relocatable data#351
nhz2 wants to merge 2 commits intoJuliaData:masterfrom
nhz2:nz/bake-in-relocatable-data

Conversation

@nhz2
Copy link
Contributor

@nhz2 nhz2 commented Mar 21, 2026

Fixes #325 by replacing the artifacts with baked in data.

This makes it easier to change the template xml data.

Relocatability tested with https://gist.github.com/nhz2/fef85cf22bef076348e921f5c46be2d3

@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.63%. Comparing base (4bf7cde) to head (bb085e4).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #351      +/-   ##
==========================================
- Coverage   94.63%   94.63%   -0.01%     
==========================================
  Files          21       21              
  Lines        7052     7046       -6     
==========================================
- Hits         6674     6668       -6     
  Misses        378      378              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TimG1964
Copy link
Collaborator

Thank you for doing this.

I can see the value of moving metadata.xml from a const in the code to a data a file. But I'm not sure I understand the benefit of baking in these three "data" files in /src rather than simply putting them in /data. I'm sure the benefits are real, I just don't understand them.

Are the two files that were in /data now duplicated in both /src and /data? Is that necessary?

@nhz2
Copy link
Contributor Author

nhz2 commented Mar 21, 2026

Good point, I see there is now a slight difference where one file is using "LF" and the other is using "CRLF" I'm adding a .gitattributes https://code.visualstudio.com/docs/remote/troubleshooting#_resolving-git-line-ending-issues-in-wsl-resulting-in-many-modified-files to hopefully avoid that changing in the future.

The idea is to seperate out the files needed for running XLSX.jl and put those is "src" and the files that are used only for testing, which are in "data", but will eventually go in a testing artifact.

@felipenoris
Copy link
Collaborator

felipenoris commented Mar 22, 2026

This is interesting, given that include_dependency makes this kind of solution relocatable.

The Artifact system was introduced in XLSX in #127 to make it relocatable.

I updated the comments on #325 with instructions on how to update artifacts.

I think, intuitively, that the Artifacts solution is better suited for this, given this is not source code content, but static data. But I understand this move if it makes stuff easier to update (if you think you'll be updating XML often).

@nhz2
Copy link
Contributor Author

nhz2 commented Mar 22, 2026

There is also a performance improvement since this PR skips the need to do a file system lookup after pre compilation. Since the files are small I think it is okay for them to sit in memory after using XLSX.

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.

How to add a file to the package artifacts?

4 participants