Skip to content

Commit eeb85d9

Browse files
authored
Merge branch 'master' into unicode_literal_usage
2 parents 6abb399 + afda757 commit eeb85d9

File tree

4 files changed

+69
-28
lines changed

4 files changed

+69
-28
lines changed

Makefile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ MODULE=cwltool
2626
# `SHELL=bash` doesn't work for some, so don't use BASH-isms like
2727
# `[[` conditional expressions.
2828
PYSOURCES=$(wildcard ${MODULE}/**.py tests/*.py) setup.py
29-
DEVPKGS=pep8 diff_cover autopep8 pylint coverage pep257 flake8 pytest isort mock
30-
DEBDEVPKGS=pep8 python-autopep8 pylint python-coverage pep257 sloccount python-flake8 python-mock
29+
DEVPKGS=pep8 diff_cover autopep8 pylint coverage pydocstyle flake8 pytest isort mock
30+
DEBDEVPKGS=pep8 python-autopep8 pylint python-coverage pydocstyle sloccount python-flake8 python-mock
3131
VERSION=1.0.$(shell date +%Y%m%d%H%M%S --date=`git log --first-parent \
3232
--max-count=1 --format=format:%cI`)
3333
mkfile_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
@@ -80,15 +80,16 @@ pep8_report.txt: $(PYSOURCES)
8080
diff_pep8_report: pep8_report.txt
8181
diff-quality --violations=pep8 pep8_report.txt
8282

83-
## pep257 : check Python code style
84-
pep257: $(PYSOURCES)
85-
pep257 --ignore=D100,D101,D102,D103 $^ || true
83+
pep257: pydocstyle
84+
## pydocstyle : check Python code style
85+
pydocstyle: $(PYSOURCES)
86+
pydocstyle --ignore=D100,D101,D102,D103 $^ || true
8687

87-
pep257_report.txt: $(PYSOURCES)
88-
pep257 setup.py $^ > pep257_report.txt 2>&1 || true
88+
pydocstyle_report.txt: $(PYSOURCES)
89+
pydocstyle setup.py $^ > pydocstyle_report.txt 2>&1 || true
8990

90-
diff_pep257_report: pep257_report.txt
91-
diff-quality --violations=pep8 pep257_report.txt
91+
diff_pydocstyle_report: pydocstyle_report.txt
92+
diff-quality --violations=pep8 $^
9293

9394
## autopep8 : fix most Python code indentation and formatting
9495
autopep8: $(PYSOURCES)

README.rst

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -413,43 +413,67 @@ Extension points
413413
The following functions can be provided to main(), to load_tool(), or to the
414414
executor to override or augment the listed behaviors.
415415

416-
executor(tool, job_order_object, **kwargs)
417-
(Process, Dict[Text, Any], **Any) -> Tuple[Dict[Text, Any], Text]
416+
executor
417+
::
418+
419+
executor(tool, job_order_object, **kwargs)
420+
(Process, Dict[Text, Any], **Any) -> Tuple[Dict[Text, Any], Text]
418421

419422
A toplevel workflow execution loop, should synchronously execute a process
420423
object and return an output object.
421424

422-
makeTool(toolpath_object, **kwargs)
423-
(Dict[Text, Any], **Any) -> Process
425+
makeTool
426+
::
427+
428+
makeTool(toolpath_object, **kwargs)
429+
(Dict[Text, Any], **Any) -> Process
424430

425431
Construct a Process object from a document.
426432

427-
selectResources(request)
428-
(Dict[Text, int]) -> Dict[Text, int]
433+
selectResources
434+
::
435+
436+
selectResources(request)
437+
(Dict[Text, int]) -> Dict[Text, int]
429438

430439
Take a resource request and turn it into a concrete resource assignment.
431440

432-
versionfunc()
433-
() -> Text
441+
versionfunc
442+
::
443+
444+
()
445+
() -> Text
434446

435447
Return version string.
436448

437-
make_fs_access(basedir)
438-
(Text) -> StdFsAccess
449+
make_fs_access
450+
::
451+
452+
make_fs_access(basedir)
453+
(Text) -> StdFsAccess
439454

440455
Return a file system access object.
441456

442-
fetcher_constructor(cache, session)
443-
(Dict[unicode, unicode], requests.sessions.Session) -> Fetcher
457+
fetcher_constructor
458+
::
459+
460+
fetcher_constructor(cache, session)
461+
(Dict[unicode, unicode], requests.sessions.Session) -> Fetcher
444462

445463
Construct a Fetcher object with the supplied cache and HTTP session.
446464

447-
resolver(document_loader, document)
448-
(Loader, Union[Text, dict[Text, Any]]) -> Text
465+
resolver
466+
::
467+
468+
resolver(document_loader, document)
469+
(Loader, Union[Text, dict[Text, Any]]) -> Text
449470

450471
Resolve a relative document identifier to an absolute one which can be fetched.
451472

452473
logger_handler
453-
logging.Handler
474+
::
475+
476+
logger_handler
477+
logging.Handler
454478

455479
Handler object for logging.

cwltool/draft2tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ def rm_pending_output_callback(output_callbacks, jobcachepending,
391391
"writable": t.get("writable")
392392
}
393393
else:
394-
if t["entryname"] or t["writable"]:
394+
if t.get("entryname") or t.get("writable"):
395395
t = copy.deepcopy(t)
396-
if t["entryname"]:
396+
if t.get("entryname"):
397397
t["entry"]["basename"] = t["entryname"]
398398
t["entry"]["writable"] = t.get("writable")
399399
ls[i] = t["entry"]

tox.ini

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ envlist =
33
py{27,33,34,35,36}-lint,
44
py{27,33,34,35,36}-unit,
55
py35-mypy{2,3},
6-
py27-pipconflictchecker
6+
py27-pipconflictchecker,
7+
py27-lint-readme,
8+
py27-pydocstyle
79

810
skipsdist = True
911
skip_missing_interpreters = True
@@ -44,4 +46,18 @@ deps =
4446
[testenv:py27-pipconflictchecker]
4547
commands = pipconflictchecker
4648
whitelist_externals = pipconflictchecker
47-
deps = pip-conflict-checker
49+
deps = pip-conflict-checker
50+
51+
[testenv:py27-unit]
52+
commands = python setup.py test
53+
54+
[testenv:py27-lint-readme]
55+
commands = python setup.py check -r -s
56+
deps =
57+
readme
58+
59+
[testenv:py27-pydocstyle]
60+
commands = make diff_pydocstyle_report
61+
deps =
62+
pydocstyle
63+
diff-cover

0 commit comments

Comments
 (0)