Skip to content

Commit

Permalink
Allow string class name for type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
suecharo committed Jul 15, 2020
1 parent 7be5ae2 commit 32dcc77
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -14,12 +14,12 @@ IPython2CWL is a tool for converting [IPython](https://ipython.org/) Jupyter Not
```python
from ipython2cwl.iotypes import CWLFilePathInput, CWLFilePathOutput
import csv
input_filename: CWLFilePathInput = 'data.csv'
input_filename: 'CWLFilePathInput' = 'data.csv'
with open(input_filename) as f:
csv_reader = csv.reader(f)
data = [line for line in csv_reader]
number_of_lines = len(data)
result_file: CWLFilePathOutput = 'number_of_lines.txt'
result_file: 'CWLFilePathOutput' = 'number_of_lines.txt'
with open(result_file, 'w') as f:
f.write(str(number_of_lines))
```
Expand All @@ -37,7 +37,7 @@ pip install ipython2cwl
```

### Example

```
jupyter repo2cwl https://github.com/giannisdoukas/cwl-annotated-jupyter-notebook.git -o .
```
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Expand Up @@ -19,12 +19,12 @@ IPython2CWL is a tool for converting `IPython <https://ipython.org/>`_ Jupyter N
from ipython2cwl.iotypes import CWLFilePathInput, CWLFilePathOutput
import csv
input_filename: CWLFilePathInput = 'data.csv'
input_filename: 'CWLFilePathInput' = 'data.csv'
with open(input_filename) as f:
csv_reader = csv.reader(f)
data = [line for line in csv_reader]
number_of_lines = len(data)
result_file: CWLFilePathOutput = 'number_of_lines.txt'
result_file: 'CWLFilePathOutput' = 'number_of_lines.txt'
with open(result_file, 'w') as f:
f.write(str(number_of_lines))
Expand Down
8 changes: 4 additions & 4 deletions ipython2cwl/iotypes.py
Expand Up @@ -45,7 +45,7 @@ class CWLFilePathInput(str, _CWLInput):
will be created and the assignment of value will be generalised.
>>> dataset1: CWLFilePathInput = './data/data.csv'
>>> dataset2: CWLFilePathInput = './data/data.csv'
>>> dataset2: 'CWLFilePathInput' = './data/data.csv'
"""
pass
Expand All @@ -57,7 +57,7 @@ class CWLBooleanInput(_CWLInput):
will be created and the assignment of value will be generalised.
>>> dataset1: CWLBooleanInput = True
>>> dataset2: CWLBooleanInput = False
>>> dataset2: 'CWLBooleanInput' = False
"""
pass
Expand All @@ -69,7 +69,7 @@ class CWLStringInput(str, _CWLInput):
will be created and the assignment of value will be generalised.
>>> dataset1: CWLStringInput = 'this is a message input'
>>> dataset2: CWLStringInput = 'yet another message input'
>>> dataset2: 'CWLStringInput' = 'yet another message input'
"""
pass
Expand All @@ -81,7 +81,7 @@ class CWLIntInput(_CWLInput):
will be created and the assignment of value will be generalised.
>>> dataset1: CWLIntInput = 1
>>> dataset2: CWLIntInput = 2
>>> dataset2: 'CWLIntInput' = 2
"""
pass
Expand Down

0 comments on commit 32dcc77

Please sign in to comment.