Skip to content

Commit

Permalink
Update pre-commit configuration
Browse files Browse the repository at this point in the history
... and fix issues reported by the new checks
  • Loading branch information
ylep committed Jul 19, 2021
1 parent 841592c commit 2c5f980
Show file tree
Hide file tree
Showing 45 changed files with 12 additions and 90 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ python/soma_workflow.egg-info/
# Pycharm project#
##################
.idea

10 changes: 7 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
rev: v4.0.1
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: fix-encoding-pragma
- id: check-added-large-files
#- id: trailing-whitespace # not ready yet

- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
rev: 3.9.2
hooks:
- id: flake8
name: flake8 under python2
Expand Down
1 change: 0 additions & 1 deletion bin/soma_kill_servers
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ clear_db = options.clear

connection.RemoteConnection.kill_remote_servers(
resource_id, login=login, passwd=passwd, clear_db=clear_db)

2 changes: 0 additions & 2 deletions bin/soma_restart_workflow
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,3 @@ if __name__ == '__main__':
else:
queue = sys.argv[3]
wfc.restart_workflow(workflow_id, queue)


3 changes: 0 additions & 3 deletions bin/soma_stop_workflow
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ if __name__ == '__main__':
wfc = WorkflowController(sys.argv[2])

wfc.stop_workflow(workflow_id)



3 changes: 0 additions & 3 deletions bin/soma_submit_workflow
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,3 @@ if __name__ == '__main__':
wfc = WorkflowController(args.resource)

wfc.submit_workflow(workflow, name = args.name, queue = args.queue)



1 change: 0 additions & 1 deletion doc/source/changes_swf3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,3 @@ Ex:
light_mode = 1
scheduler_type = local_basic
allowed_python_versions = 3

1 change: 0 additions & 1 deletion doc/source/client_API.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,3 @@ Helper
.. automethod:: Helper.unserialize

.. automethod:: Helper.convert_wf_file_for_p2_5

6 changes: 0 additions & 6 deletions doc/source/examples.txt
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,3 @@ the output files.

The data directory "/tmp/soma_workflow_examples/" on your machine should now
contains the file copy_of_myfile.






2 changes: 0 additions & 2 deletions doc/source/gui.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,3 @@ Several plots can be displayed and refreshed at regular time interval:
* the jobs function of the time, also showing the number or CPU cores used by each job (new in Soma-Workflow 3.0)
* the number of jobs running function of the time.
* the number of CPU cores running function of the time (new in Soma-Workflow 3.0)


3 changes: 0 additions & 3 deletions doc/source/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,3 @@ Authors and contributors
..
:Release: |release|
:Date: |today|



1 change: 0 additions & 1 deletion doc/source/install_config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -677,4 +677,3 @@ Ex:
CPU_NB = 2
MAX_CPU_NB = 16
SCHEDULER_INTERVAL = 1

1 change: 0 additions & 1 deletion doc/source/scheduler.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,3 @@ MPI implementation

.. automodule:: soma_workflow.schedulers.mpi_scheduler
:members:

4 changes: 0 additions & 4 deletions doc/source/status_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,3 @@ File Transfer status
:height: 100 px
:width: 100 px
:scale: 30




1 change: 0 additions & 1 deletion doc/source/workflow_creation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -477,4 +477,3 @@ A few engine execution jobs types have been defined and are available for workfl


Such jobs are alternatives to :ref:`params_link_functions` described above.

29 changes: 0 additions & 29 deletions doc/upload2github

This file was deleted.

1 change: 0 additions & 1 deletion documents/memo_github.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ $ git log --follow ./path/to/file
```

c.f http://git-scm.com/docs/git-log

1 change: 0 additions & 1 deletion ez_setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Bootstrap setuptools installation
Expand Down
3 changes: 0 additions & 3 deletions pack2pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,3 @@ cat setup.py | sed -e "s/development version/$FULLVERSION/" > ./$PACKNAME/setup.
VERSIONPATH=./$PACKNAME/python/soma_workflow
echo fullVersion = \'$FULLVERSION\' > $VERSIONPATH/version.py
echo shortVersion = \'$SHORTVERSION\' >> $VERSIONPATH/version.py



1 change: 0 additions & 1 deletion python/soma_workflow/clean_server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import
Expand Down
1 change: 0 additions & 1 deletion python/soma_workflow/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1543,4 +1543,3 @@ def restore_soma_workflow_directory():
else:
Configuration.search_config_path \
= staticmethod(Configuration._old_search_config_path)

1 change: 0 additions & 1 deletion python/soma_workflow/setup_client2server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

"""
Expand Down
1 change: 0 additions & 1 deletion python/soma_workflow/setup_server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

"""
Expand Down
1 change: 0 additions & 1 deletion python/soma_workflow/start_database_server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

'''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
0
1
0

Empty file modified python/soma_workflow/test/data/PlatformTest/ubuntu.sh
100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion python/soma_workflow/test/data/TestDrmaaCTypes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[local_scheduler]

CPU_NB = 2
PERIOD = 1
PERIOD = 1
1 change: 0 additions & 1 deletion python/soma_workflow/test/data/jobExamples/complete/file0
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ Directions

1. In a large bowl, sift together the flour, baking powder, salt and sugar. Make a well in the center and pour in the milk, egg and melted butter; mix until smooth.
2. Heat a lightly oiled griddle or frying pan over medium high heat. Pour or scoop the batter onto the griddle, using approximately 1/4 cup for each pancake. Brown on both sides and serve hot.

1 change: 0 additions & 1 deletion python/soma_workflow/test/data/jobExamples/complete/file1
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@


This is a Soma-Workflow example file used as input to job and workflow tests.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# calls job1 using params IO as json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# calls job1 using params IO as json
Expand Down
5 changes: 2 additions & 3 deletions python/soma_workflow/test/data/jobExamples/complete/job7.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# inputs: as env var SOMAWF_INPUT_PARAMS
Expand All @@ -25,8 +24,8 @@
if not os.path.exists(out_dir):
os.mkdir(out_dir)

filePathsOut = [os.path.join(out_dir, os.path.basename(f))
for f in filePathsIn]
filePathsOut = [os.path.join(out_dir, os.path.basename(fp))
for fp in filePathsIn]

for fin, fout in zip(filePathsIn, filePathsOut):
shutil.copy2(fin, fout)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# input: "input" param in json dict
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# input: "inputs" param in json dict, list of files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ job8 output:


This is a Soma-Workflow example file used as input to job and workflow tests.

Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ Directions

1. In a large bowl, sift together the flour, baking powder, salt and sugar. Make a well in the center and pour in the milk, egg and melted butter; mix until smooth.
2. Heat a lightly oiled griddle or frying pan over medium high heat. Pour or scoop the batter onto the griddle, using approximately 1/4 cup for each pancake. Brown on both sides and serve hot.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
This is a program which throws an exception.
This is a program which throws an exception.
Empty file modified python/soma_workflow/test/data/jobExamples/complete/stdin1
100755 → 100644
Empty file.
Empty file modified python/soma_workflow/test/data/jobExamples/complete/stdin2
100755 → 100644
Empty file.
Empty file modified python/soma_workflow/test/data/jobExamples/complete/stdin3
100755 → 100644
Empty file.
Empty file modified python/soma_workflow/test/data/jobExamples/complete/stdin4
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
echo "SOMA_JOB_MPI_BIN" $SOMA_JOB_MPI_BIN "SOMA_JOB_NODE_FILE" $SOMA_JOB_NODE_FILE

. $SOMA_JOB_MPI_BIN/mpirun -machinefile `eval echo $SOMA_JOB_NODE_FILE` -np $1 $2
. $SOMA_JOB_MPI_BIN/mpirun -machinefile `eval echo $SOMA_JOB_NODE_FILE` -np $1 $2
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

File with extension .hdr

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@


File with extension .img

0 comments on commit 2c5f980

Please sign in to comment.