-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* tweaked typing info for settings type[A] is the correct way to indicate A or a subclass thereof * fixes #138 settings are immutable once inside a Protocol * fixup mypy woes * make benzene_variants fixture use Settings * more test fixups, but this isn't right currently * fixes #138 settings are immutable once inside a Protocol * another test fix up must use Settings now * new plan on readonly settings setting __config__.allow_mutation was giving bizarre behaviour temporarily retreat from that madness and instead `Protocol.settings` returns a deepcopy it ain't perfect but it'll stop some things * revert trying to be clever about type annotations * Improved readonly settings * don't need special-casing for _is_frozen * Update models.py * fix type annotations on settings * update AlchemicalNetwork hashes * adds Settings.unfrozen_copy tests for freezing behaviour * copy of test fixups * make Protocol.settings return read-only view avoids copy on each access, probably saves some time in a `Protocol.settings` heavy access pattern * added test for setting subsection of frozen settings fails as expected --------- Co-authored-by: David W.H. Swenson <[email protected]>
- Loading branch information
1 parent
c12bba6
commit 51e6812
Showing
7 changed files
with
158 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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