-
Notifications
You must be signed in to change notification settings - Fork 60
Type checking and coercion #662
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
142 commits
Select commit
Hold shift + click to select a range
2d7142a
ENH: Add generic object hasher
effigies 1e36d1d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f52bc66
RF: Alternate hashing and serialization
effigies da4a6c7
TEST: Hash dispatcher, dogfood register
effigies dffc10f
FIX: Use typing.Dict until Python 3.9 is minimum
effigies f211d0b
ENH: Support classes registering using a __bytes_repr__ method
effigies 189dadf
FIX: Pull Iterator from typing for now
effigies 4dda520
ENH: Hash frozensets
effigies 29de5aa
ENH: Register byte serializer for None
effigies 94eb216
RF: Implement hash_function() with hash_object()
effigies b4d6125
TEST: Update expected hashes
effigies 7c25bf8
XXX: Temporarily mark test_wf_with_blocked_tasks xfail
effigies 4076ff2
WIP: Start serializing pathlikes
effigies 76f83d1
PY37: Remove walrus operator
effigies abe77f6
RF: Move file_hash to use dispatched hash
effigies ae6a15c
ENH: Flesh out more builtin types, make HasBytesRepr protocol
effigies 1bb05c2
ENH: Add directory path hashing, test pathlikes
effigies a6fd5ca
TEST: Untested types, files with contents, ignore coverage in protocol
effigies e6bf4e9
RF: Always hash pathlike paths, not contents
effigies 6344a98
RF: Make File a PathLike that serializes to file contents
effigies cb01648
ENH: Add MtimeCachingHash to cache hashes for PathLikes with mtime in…
effigies 2ca41e3
implemented TypeCoercer callable class (to be passed to attrs convert…
tclose dc619ff
replaced type validation with TypeCoercer converter, which coerces an…
tclose 4bb8b90
type checking unittests pass
tclose 3ccb372
activated converter/type-checking on setattr
tclose c267b72
renamed gathered to array
tclose feabd1a
renamed array back to gathered
tclose bcf9aea
added bytes_repr for types & typing special forms
tclose 0155960
changed initial values set to output class attrs in generated_output_…
tclose c146370
fixed setting of allowed values validator
tclose 2964ad0
handle case of typing special forms in LazyOut _get_type
tclose c62d728
switched lzoutall unittests to use list version of add2_sub2_res
tclose a15a661
split up type-checking unittests
tclose b655a7c
switched not returned outputs back to None instead of attrs.NOTHING
tclose 1523a5d
reworked MultiInputObj so that it can be coerced to (i.e. it doesn't …
tclose 8d57077
replaced hash_value with hash_function
tclose 007a862
implemented load_and_run functionality for SerialWorker
tclose f967234
removed file_hash reference in checksum_states
tclose 42c8868
moved type_checking to typing in utils
tclose 00e604c
added fileformats to pyproject deps
tclose 291f144
added import from typing_extensions for Python < 3.10
tclose 3740b98
removed Python 3.10 union syntax (i.e. '|')
tclose d163cd9
enclose runtime_checkable in import error catch
tclose b295f96
replaced list|tuple|dict generic types with ty.List, ty.Tuple etc
tclose e667a71
enclosed get_origin, get_args from typing in import error catch
tclose 21f60e9
Added workarounds for Python 3.7 support
tclose 132dc61
replaced deprecated py.path tmpdir with pathlib.Path tmp_path in sing…
tclose 7265a37
added explicit check to see that the return type isn't of type file, …
tclose 79225db
updated python in slurm docker image
tclose 9130c9b
set python version to 3.7.12 in slurm test build
tclose 079deb1
added more descriptive error message in exec_as_coro
tclose c9ac936
encapsulated inputs to workflow in gathered object in test_wf_lzoutal…
tclose 1ca65c7
upped python version in slurm test to 3.7.16
tclose f0a57cf
marked wf_lzoutall_st_2a as xfail on slurm tests
tclose d5979ac
changed audit_shellcommandtask_file expected output to be the filepat…
tclose 79fdea8
replacing copyfile functionality with fileformats
tclose 7aee412
renamed TypeChecker to TypeParser
tclose f8c7007
moved MountIndentifier class in from fileformats (used to be a collec…
tclose b6e0ad7
remove commented code
tclose 15524ab
added ability to type inputs and outputs of workflows
tclose dc4bb8d
adding in support for copy collation
tclose d8dbf8a
renamed collation default from separated to any
tclose 18abe7f
reverted inputs with "output_file_template" to type str|Path from Fil…
tclose 06427c7
reverted inputs with output_file_template needed to be of type File
tclose d2bde99
added "sed" fixture to check for "gsed" and use if installed
tclose cb7dbad
fixed up in-place sed on mac
tclose 93942af
debugged stdout coercion to File
tclose faa0543
commented out incomplete mtime caching to boost coverage
tclose a30a559
added new tests to increase coverage, removed some unused code
tclose 156bb8d
renamed gathered to StateArray
tclose 680d2c3
implementing splitter syntax
tclose 3c8d095
added doc strings and typing
tclose 0cf3b50
reworking wrapping of lazy-field types in StateArrays
tclose 0fd5ef3
debugging typing of split/combine workflows
tclose db55a29
renamed StateArray to SplitArray
tclose 76dc337
renamed SplitArray to Split
tclose b7d1169
finally debugged state_arrays test
tclose 5448e5a
Yet more debugging (probably going around in circles)
tclose 7312b3f
starting to refactor split-combine in lazy-field
tclose f80a89a
another go at debugging splitting/combining with types
tclose 5223677
almost got it working
tclose f052a68
implemented combination over scalar upstream splits
tclose 1d95204
added check for empty states
tclose 611c505
added __bytes_repr__ to lazy field, debugged all unittests I think
tclose b4254a7
supported basic input specs with just names and types
tclose 0775b3f
renamed Split to StateArray
tclose 9f89c7b
removed references to StateArray from unittests
tclose 96e721f
debugged singularity test and reinstated test decorators that were c…
tclose 9a831a6
refactored LazyField into LazyInField and LazyOutField, removed unuse…
tclose c3cb603
added a couple more tests
tclose 1f6fe6c
[skip ci] touched up docs section relating to splitting
tclose ec2b681
removed relative path conversion that is no longer necessary
tclose 5256e26
deleted dummy scripts added to play around with splitting/combining
tclose c225454
reinstated etelemetry
tclose 9849b77
changed submitted from cf to serial in problematic test
tclose a5482cf
switched failing tests to serial plugin
tclose 8ded823
switched serial plugin to the tests that were actually failing
tclose df92bd1
[skip ci] deleted comment that is no longer valid
tclose 0d34855
incorporates Ghisvail's change in https://github.com/nipype/pydra/pul…
tclose 23c33de
deleted exception handling util I didn't end up using
tclose 200c520
Added lazy field cast test, from specific -> general -> specific (wit…
tclose 074ae3b
added check that annotations are types in function task
tclose 7e15285
reverted type assertion in FunctionTask
tclose e4755b7
removed commented out code in combine()
tclose 415d5bd
added test_hash_file back in
tclose 73e4c68
changed test_task_state back to having values set after split
tclose 99bed52
made _unwrap_splitter doc string more explicit
tclose 9b98935
added tests for copy_nested_files
tclose 64347ad
added support for parsing fields of type ty.Type[*]
tclose 7c254b6
added check for unrecognised types with args
tclose e4041a7
fixed up bug I just introduced
tclose 9c1a0d5
fixed up case where type to coerce to is iterable
tclose e53b2ee
fixed up handling of iterables
tclose 0dd8693
[skip ci] touch up exception string
tclose e58edac
fixed up a couple of mypy errors
tclose 72f9a6b
moved validation of output_file_template from application of the temp…
tclose e4e7cb0
More robust coercion of output paths to FileSets handles nested types…
tclose b0c51c1
relaxed restriction on fields with output_file_template to allow str …
tclose 81eded5
applying changes from Chris' review
tclose 62e9523
applied remaining suggestions from Chris' review
tclose 23d5980
actually (I think this time) finished applying all of Chris' suggesti…
tclose 131b18a
applied Chris's suggestions to core.py
tclose b637b33
implemented more of Chris' suggestions
tclose 6009924
reverted submitter plugin
tclose f10bfdb
added back in return statement that was inadvertently removed
tclose 51872bb
fixed up unittests to match slightly more expressive error messages
tclose 01353af
reverted test_shell_cmd_inputspec_11 and test_shell_cmd_outputspec_7a…
tclose 1dc29da
[skip ci] added link to issue for XXX comment
tclose ed8fe28
applied Ghisvail's review suggestions
tclose 9710906
made lzin a cached_property
tclose ef3f7e0
fixed up typing bug that was showing up for Enum types
tclose 4adac59
added handling for hashing attrs slots classes
tclose 8200918
added upper bound on fileformats package
tclose 2a831dc
removed upper bound on fileformats version
tclose b4f49ff
added type var to state array instantiations
tclose 0b8e3e5
added notimplementederror to catch typevar templates in function sign…
tclose d2ed9a0
relaxed type-checking to allow parent->child matching when connecting…
tclose 6397e85
reverted relaxation of parent->child type checking as it will be a bi…
tclose 8ec38dd
attempting to upgrade the python version within the slurm container t…
tclose 03c1286
added a couple of hashing tests
tclose 9a28917
[skip ci] froze sphinx version
tclose 292fd3f
[skip ci] pin sphinx to 6.2.1
tclose File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
reverted test_shell_cmd_inputspec_11 and test_shell_cmd_outputspec_7a…
… to use serial plugin
- Loading branch information
commit 01353af88b9fa1198076082ebdf86364e0880462
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ cov.xml | |
.*.swp | ||
*~ | ||
.idea | ||
*.venv | ||
|
||
.DS_Store | ||
|
||
|
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
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.
Uh oh!
There was an error while loading. Please reload this page.