Skip to content

Fixes for TravisCI on dev#1743

Merged
Lestropie merged 7 commits intodevfrom
ci_fix_dev
Sep 30, 2019
Merged

Fixes for TravisCI on dev#1743
Lestropie merged 7 commits intodevfrom
ci_fix_dev

Conversation

@Lestropie
Copy link
Copy Markdown
Member

Mirrors #1742, but some aspects of solution are different: keeping #1742 to a simple solution in order to fix master, whereas on dev the code has instead been more extensively modified to conform to the new formatting recommendations as now imposed by pylint.

Mirrors f9d1d54, which was applied to master; doing changes independently due to major Python API alterations in #1449.
- Remove unnecessary comprehensions in dwifslpreproc.
- Move all import statements to outer block at top of file.
- build: Use sys.exit(); remove unnecessary comprehension.
 Python signal handler: Do not use sys.exit() (recommended that signal handlers use os._exit() instead).
- run_pylint: Prevent error messages in case of empty directories in lib/mrtrix3/.
@Lestropie Lestropie self-assigned this Sep 26, 2019
- build: Convert set to list explicitly where previously there was an unnecesasry comprehension.
- Fix module imports in app and run modules.
- Put imports from lib/mrtrix3/__init__.py on their own line separate to the module loads (personal preference).
- Move imports to outer scope for many executable scripts.
- Fix name clash between input argument to app.cleanup() function and mrtrix3.path module.
- build: Ignore supposed unknown keyword "cwd", which is listed in the online Python documentation for all Python versions.
- mrtrix3.app: For mrtrix3 imports, make sure first line is imports from __init__.py and second line is other requisite modules, to see if this fixes an ImportError likely due to circular dependency.
While import of Python modules has been moved to the outer scope, attempting to do so for the import of MRtrix3 Python modules within those modules themselves appears to introduce circular dependencies. This change moves these import statements between MRtrix3 modules into the functions requiring those modules. This should not raise a warning with the latest pylint updates.
@Lestropie Lestropie merged commit cb3eddf into dev Sep 30, 2019
@Lestropie Lestropie deleted the ci_fix_dev branch September 30, 2019 03:06
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.

1 participant