Merged
Conversation
low-sky
approved these changes
Jun 8, 2023
Collaborator
low-sky
left a comment
There was a problem hiding this comment.
Provided version comparison works as intended, I think this is fine. However, I note that
'6.5.2' > '6.11.4' is True so I think strict string comparison isn't right here.
phangsPipeline/casaStuff.py
Outdated
|
|
||
|
|
||
| # TODO: For now, uvcontsub doesn't work as we want it in newer CASA versions, fall back to old version | ||
| if casa_version_str >= '6.5.2': |
Collaborator
There was a problem hiding this comment.
Does this work? I'd figure it would be something like:
from packaging import version
version.parse(casa_version_str) >= version.parse('6.5.2')
Collaborator
Author
There was a problem hiding this comment.
You're right, pushed this as an update. I've seen it just done in strings before so figured it'd be good, but I guess not
* Add ReleaseHandler to __init__.py * Various import fixes for newer python/CASA versions * uvcontsub -> uvcontsub_old for new CASA versions * Fix 'if' statements for == instead of 'is' * Remove deprecated np.float calls * Replace 'clobber' with 'overwrite' for hdu.writeto() calls if using astropy * Fix version string comparison in casaStuff.py
41af0b0 to
2f5eb2f
Compare
This was referenced Jun 9, 2023
* np.int -> int * np.bool -> bool * Reduce decimation factor for small cubes in ccr.align_to_target
Collaborator
Author
|
I'll note here that the releaseHandler stuff needs some more heavy-duty refactoring, since it's calling keyHandler functions that no longer exist. I've managed to at least sort the other package deprecations but that would need to be another PR |
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.
Some tidy-up to get the pipeline working in the latest pip-installed CASA environment. Retains backwards compatibility for earlier versions. Currently a draft until I've managed to chunk something through successfully, but I have got through imaging at least