Revise Import. Add ZIP import - Part 1.#1841
Merged
Merged
Conversation
Add eval_FindFile and eval_FileFormat. Use these instead of Expression().evaluate
Import[xxx, "Elements"] now gets field names from RegisterImport's AvailableElements field.
Eventually, though, we'll remove all of these autoloaded files.
And isolate Import[xxx, Elements] tests
AvailableElements is what WMA uses.
This is where it is in WMA. Also, some administriva. File locations have been adjusted.
Member
Author
|
@mmatera this is starting to get large. Should I finish this off and leave more stuff for another PR. Split this into smaller pieces? Or continue in this PR? |
mmatera
approved these changes
Jun 16, 2026
| return eval_ZIPImport(path.value) | ||
|
|
||
| def eval_elements(self, path: String, evaluation: Evaluation): | ||
| """%(name)s[path_String]["Elements"]""" |
Contributor
There was a problem hiding this comment.
I wonder if this get applied... My guess is that once the head of the expression get evaluated, it produce a different expression, which does not match with this rule.
Member
Author
There was a problem hiding this comment.
You are correct. It does nothing. It also appears elsewhere. Magically, though, we can extract elements.
I will investigate later and revise.
Member
Author
There was a problem hiding this comment.
I see what was up that should have been
"""%(name)s[path_String, "Elements"]"""I've tested that the this pattern matches. Good catch!
But more will come, and more tests for this later.
Import. Add ZIP import.Import. Add ZIP import - Part 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Start redoing
Importeval_FindFileandeval_FileFormat. Use these instead ofExpression(...).evaluate.ZIPimports.FormatsunderSystemFileswhich is where WMA put this. Start reducing differences in these files; but the files are renamed to.wlto avoid confusion with Objective C's.mfiles.