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

add unhashed_package_root and PartialImport #157

Merged
merged 7 commits into from
Sep 11, 2023
Merged

Conversation

JackTemaki
Copy link
Contributor

unhashed_package_root allows to create "movable" configs that do not change their hash when moved to another location, which is problematic behavior of the current "Import" class. Then, this also adds a PartialImport object which allows to import a callable with a set of pre-defined and hashed parameters. This can be used to for passing extra arguments to e.g. get_model or another hook function.

I do not like that unhashed_package_root is Optional, but I also do not see a way around it without breaking already existing things.

@JackTemaki
Copy link
Contributor Author

Prerequisite for #156

common/setups/serialization.py Outdated Show resolved Hide resolved
common/setups/serialization.py Outdated Show resolved Hide resolved
common/setups/serialization.py Outdated Show resolved Hide resolved
common/setups/serialization.py Show resolved Hide resolved
@JackTemaki
Copy link
Contributor Author

Okay somehow a rebase did something wrong here, let me figure it out.

@JackTemaki JackTemaki force-pushed the nick-partial-import branch from 72a345c to f8922bb Compare August 11, 2023 13:18
@JackTemaki
Copy link
Contributor Author

Reviews please!

common/setups/serialization.py Outdated Show resolved Hide resolved
common/setups/serialization.py Show resolved Hide resolved
common/setups/serialization.py Outdated Show resolved Hide resolved
common/setups/serialization.py Show resolved Hide resolved
common/setups/serialization.py Show resolved Hide resolved
common/setups/serialization.py Show resolved Hide resolved
@JackTemaki
Copy link
Contributor Author

As @curufinwe wanted to move it later to i6_core, I will just merge it now. If there are changes requested we can do this as follow-up.

@JackTemaki JackTemaki merged commit 2cdbc4b into main Sep 11, 2023
@christophmluscher christophmluscher deleted the nick-partial-import branch October 19, 2023 09:14
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.

5 participants