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

[pull] master from Slicer:master #376

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

[pull] master from Slicer:master #376

wants to merge 15 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 21, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

slicerbot and others added 15 commits June 21, 2022 09:10
This commit is a follow up of 192af07 (DOC: Update build
instructions to include CentOS 7).

There were two lines having a similar meaning.
QSignalSpy is intended for testing, therefore use qRestAPI's synchronous query instead to get extensions metadata from the server.

To simplify the implementation of synchronous query, extension metadata is now always downloaded using a single query (by specifying `limit=0` query parameter).

see #6437

Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]>
Basic extension metadata was passed to extension download task (instead of files metadata), which did not contain archivename.
"Batch processing" mode is activated automatically when a large (10+ children) branch visibility is changed.
In batch mode, item visibility change requests were mistakenly ignored.

fixes #6445
This fixes all remaining pycodestyle E2 whitespace error codes.

Bulk of updates performed using autopep8 CLI
with the following command:

  autopep8 --in-place --select E201,E202,E203,E211,E221,E222,E225,E226,E227,E228,E231,E241,E251,E261,E262,E265,E266,E271 $(git ls-files '*.py')

See https://github.com/hhatto/autopep8#readme

References:

* Whitespace after '('
  See https://www.flake8rules.com/rules/E201.html

* Whitespace before ')'
  See https://www.flake8rules.com/rules/E202.html

* Whitespace before ':'
  See https://www.flake8rules.com/rules/E203.html

* Whitespace before '('
  See https://www.flake8rules.com/rules/E211.html

* Multiple spaces before operator
  See https://www.flake8rules.com/rules/E221.html

* Multiple spaces after operator
  See https://www.flake8rules.com/rules/E222.html

* Missing whitespace around operator
  See https://www.flake8rules.com/rules/E225.html

* Missing whitespace around arithmetic operator
  See https://www.flake8rules.com/rules/E226.html

* Missing whitespace around bitwise or shift operator
  See https://www.flake8rules.com/rules/E227.html

* Missing whitespace around modulo operator
  See https://www.flake8rules.com/rules/E228.html

* Missing whitespace after ',', ';', or ':'
  See https://www.flake8rules.com/rules/E231.html

* Multiple spaces after ','
  See https://www.flake8rules.com/rules/E241.html

* Unexpected spaces around keyword / parameter equals
  See https://www.flake8rules.com/rules/E251.html

* At least two spaces before inline comment
  See https://www.flake8rules.com/rules/E261.html

* Inline comment should start with '# '
  See https://www.flake8rules.com/rules/E262.html

* Block comment should start with '# '
  See https://www.flake8rules.com/rules/E265.html

* Too many leading '#' for block comment
  See https://www.flake8rules.com/rules/E266.html

* Multiple spaces after keyword
  See https://www.flake8rules.com/rules/E271.html
This fixes all remaining pycodestyle E1 indentation error codes.

Bulk of updates performed using autopep8 CLI
with the following command:

  autopep8 --in-place --select E111,E114,E115,E116,E117,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131 $(git ls-files '*.py')

See https://github.com/hhatto/autopep8#readme

References:

* Indentation is not a multiple of four
  See https://www.flake8rules.com/rules/E111.html

* Indentation is not a multiple of four (comment)
  See https://www.flake8rules.com/rules/E114.html

* Expected an indented block (comment)
  See https://www.flake8rules.com/rules/E115.html

* Unexpected indentation (comment)
  See https://www.flake8rules.com/rules/E116.html

* Over-indented
  See https://www.flake8rules.com/rules/E117.html

* Continuation line under-indented for hanging indent
  See https://www.flake8rules.com/rules/E121.html

* Continuation line missing indentation or outdented
  See https://www.flake8rules.com/rules/E122.html

* Closing bracket does not match indentation of opening bracket's line
  See https://www.flake8rules.com/rules/E123.html

* Closing bracket does not match visual indentation
  See https://www.flake8rules.com/rules/E124.html

* Continuation line with same indent as next logical line
  See https://www.flake8rules.com/rules/E125.html

* Continuation line over-indented for hanging indent
  See https://www.flake8rules.com/rules/E126.html

* Continuation line over-indented for visual indent
  See https://www.flake8rules.com/rules/E127.html

* Continuation line under-indented for visual indent
  See https://www.flake8rules.com/rules/E128.html

* Visually indented line with same indent as next logical line
  See https://www.flake8rules.com/rules/E129.html

* Continuation line unaligned for hanging indent
  See https://www.flake8rules.com/rules/E131.html
This fixes many of the pycodestyle E7 statement error codes.

Bulk of updates performed using autopep8 CLI
with the following command:

  autopep8 --in-place --select E701,E703,E712,E713,E714,E741 $(git ls-files '*.py')

See https://github.com/hhatto/autopep8#readme

References:

* Multiple statements on one line (colon)
  See https://www.flake8rules.com/rules/E701.html

* Statement ends with a semicolon
  See https://www.flake8rules.com/rules/E703.html

* Comparison to true should be 'if cond is true:' or 'if cond:'
  See https://www.flake8rules.com/rules/E712.html

* Test for membership should be 'not in'
  See https://www.flake8rules.com/rules/E713.html

* Test for object identity should be 'is not'
  See https://www.flake8rules.com/rules/E714.html

* Do not use variables named 'I', 'O', or 'l'
  See https://www.flake8rules.com/rules/E741.html
…utation

itkDCMTKFileReader was added in 2012 but it seems that current itkDCMTKFileReader in ITK works just as well.
The 2012 version has a bug (it should use (0x5200, 0x9230) instead of (0x5200, 0x9239) tag - see https://discourse.slicer.org/t/image-position-patient-attribute-0020-0032-in-dicom-file-not-handled/23950/3) therefore it makes sense to switch to the ITK implementation.
Example:

>>> loadModel(r'c:\Users\andra\OneDrive\Projects\SlicerTesting2022\20220622-EmptyPolyData\slicer5-fail-T_Sup-O_right.vtp')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\D\S4D\Slicer-build\bin\Python\slicer\util.py", line 820, in loadModel
    return loadNodeFromFile(filename, 'ModelFile', {}, returnNode)
  File "C:\D\S4D\Slicer-build\bin\Python\slicer\util.py", line 685, in loadNodeFromFile
    raise RuntimeError(errorMessage)
RuntimeError: Failed to load node from file: c:\Users\andra\OneDrive\Projects\SlicerTesting2022\20220622-EmptyPolyData\slicer5-fail-T_Sup-O_right.vtp
- Error: Loading c:\Users\andra\OneDrive\Projects\SlicerTesting2022\20220622-EmptyPolyData\slicer5-fail-T_Sup-O_right.vtp - ERROR: In C:\D\S4D\VTK\IO\XML\vtkXMLUnstructuredDataReader.cxx, line 393
vtkXMLPolyDataReader (00000254994D0CC0): No Points element available in first piece found in file. Reading file may fail.
- Error: Loading c:\Users\andra\OneDrive\Projects\SlicerTesting2022\20220622-EmptyPolyData\slicer5-fail-T_Sup-O_right.vtp - Failed to read node slicer5-fail-T_Sup-O_right (vtkMRMLModelNode4) from filename='c:\Users\andra\OneDrive\Projects\SlicerTesting2022\20220622-EmptyPolyData\slicer5-fail-T_Sup-O_right.vtp'

see #6447
Detailed file IO error/warning messages were displayed to the user but not logged.
Now the messages are also added to the application log.

see #6447
@jcfr jcfr deleted the branch pieper:master June 23, 2022 15:50
@jcfr jcfr deleted the master branch June 23, 2022 15:50
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.

4 participants