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

fix: only set model name if the model really changes and refactor to cwd #122

Merged
merged 13 commits into from
Feb 16, 2024

Conversation

FWuellhorst
Copy link
Collaborator

@FWuellhorst FWuellhorst commented Feb 6, 2024

Closes #121
Closes #61

@FWuellhorst FWuellhorst changed the title fix: only set model name if the model really changes fix: only set model name if the model really changes and refactor to cwd Feb 6, 2024
@FWuellhorst
Copy link
Collaborator Author

Also, I added the option to only load certain variables from mats, which speeds thinks up by factors and reduces memory usage. Moreover, pathlib.Path is used for working_directory as a default, still allowing strings.

if cd is None:
self._cd = None
if working_directory is None and "cd" in kwargs:
warnings.warn("cd was renamed to working_directory in all classes. Use working_directory instead.", category=DeprecationWarning)
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a hint that cd is still used as working_directory. Unexperienced users might be confused otherwise.

Check other code occurrences as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is just backwards compatibility, cd is converted to workings_directory

@FWuellhorst
Copy link
Collaborator Author

@FelixStege thanks for the comments, I fixed them all!

@FWuellhorst FWuellhorst merged commit 7fa8cc4 into master Feb 16, 2024
1 check passed
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.

Avoid retranslation upon setting the same model Refactor cd to cwd?
2 participants