sophios 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. sophios-0.1.0/LICENSE +21 -0
  2. sophios-0.1.0/MANIFEST.in +2 -0
  3. sophios-0.1.0/PKG-INFO +126 -0
  4. sophios-0.1.0/README.md +54 -0
  5. sophios-0.1.0/pyproject.toml +271 -0
  6. sophios-0.1.0/setup.cfg +4 -0
  7. sophios-0.1.0/src/sophios/__init__.py +7 -0
  8. sophios-0.1.0/src/sophios/_version.py +683 -0
  9. sophios-0.1.0/src/sophios/api/__init__.py +0 -0
  10. sophios-0.1.0/src/sophios/api/_types.py +22 -0
  11. sophios-0.1.0/src/sophios/api/pythonapi.py +766 -0
  12. sophios-0.1.0/src/sophios/ast.py +325 -0
  13. sophios-0.1.0/src/sophios/cli.py +118 -0
  14. sophios-0.1.0/src/sophios/compiler.py +947 -0
  15. sophios-0.1.0/src/sophios/config.json +31 -0
  16. sophios-0.1.0/src/sophios/cwl_subinterpreter.py +320 -0
  17. sophios-0.1.0/src/sophios/inference.py +385 -0
  18. sophios-0.1.0/src/sophios/inlineing.py +435 -0
  19. sophios-0.1.0/src/sophios/input_output.py +247 -0
  20. sophios-0.1.0/src/sophios/main.py +210 -0
  21. sophios-0.1.0/src/sophios/plugins.py +476 -0
  22. sophios-0.1.0/src/sophios/py.typed +0 -0
  23. sophios-0.1.0/src/sophios/python_cwl_adapter.py +227 -0
  24. sophios-0.1.0/src/sophios/run_local.py +360 -0
  25. sophios-0.1.0/src/sophios/schemas/__init__.py +0 -0
  26. sophios-0.1.0/src/sophios/schemas/wic_schema.py +711 -0
  27. sophios-0.1.0/src/sophios/utils.py +504 -0
  28. sophios-0.1.0/src/sophios/utils_cwl.py +359 -0
  29. sophios-0.1.0/src/sophios/utils_graphs.py +243 -0
  30. sophios-0.1.0/src/sophios/utils_yaml.py +48 -0
  31. sophios-0.1.0/src/sophios/wic_types.py +148 -0
  32. sophios-0.1.0/src/sophios.egg-info/PKG-INFO +126 -0
  33. sophios-0.1.0/src/sophios.egg-info/SOURCES.txt +40 -0
  34. sophios-0.1.0/src/sophios.egg-info/dependency_links.txt +1 -0
  35. sophios-0.1.0/src/sophios.egg-info/entry_points.txt +5 -0
  36. sophios-0.1.0/src/sophios.egg-info/requires.txt +64 -0
  37. sophios-0.1.0/src/sophios.egg-info/top_level.txt +1 -0
  38. sophios-0.1.0/tests/test_examples.py +415 -0
  39. sophios-0.1.0/tests/test_fuzzy_compile.py +90 -0
  40. sophios-0.1.0/tests/test_scattering_scaling.py +84 -0
  41. sophios-0.1.0/tests/test_setup.py +84 -0
  42. sophios-0.1.0/versioneer.py +2277 -0
sophios-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Axle Research and Technologies
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ include versioneer.py
2
+ include src/sophios/_version.py
sophios-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,126 @@
1
+ Metadata-Version: 2.1
2
+ Name: sophios
3
+ Version: 0.1.0
4
+ Summary: DSL for inferring the edges of a CWL workflow DAG
5
+ Author-email: Jake Fennick <jake.fennick@axleinfo.com>
6
+ Project-URL: Homepage, https://github.com/PolusAI/workflow-inference-compiler
7
+ Project-URL: Bug Tracker, https://github.com/PolusAI/workflow-inference-compiler/issues
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: graphviz
15
+ Requires-Dist: jsonschema<4.18
16
+ Requires-Dist: pyyaml
17
+ Requires-Dist: requests
18
+ Requires-Dist: mergedeep
19
+ Requires-Dist: networkx
20
+ Requires-Dist: cwl-utils>=0.32
21
+ Requires-Dist: typeguard
22
+ Requires-Dist: pydantic>=2.6
23
+ Requires-Dist: docker
24
+ Requires-Dist: podman
25
+ Requires-Dist: toil[cwl]
26
+ Provides-Extra: test
27
+ Requires-Dist: pre-commit; extra == "test"
28
+ Requires-Dist: py; extra == "test"
29
+ Requires-Dist: pytest; extra == "test"
30
+ Requires-Dist: pytest-cov; extra == "test"
31
+ Requires-Dist: pytest-parallel; extra == "test"
32
+ Requires-Dist: coverage; extra == "test"
33
+ Requires-Dist: mypy; extra == "test"
34
+ Requires-Dist: numpy; extra == "test"
35
+ Requires-Dist: scipy; extra == "test"
36
+ Requires-Dist: pylint; extra == "test"
37
+ Requires-Dist: autopep8; extra == "test"
38
+ Requires-Dist: pre-commit; extra == "test"
39
+ Requires-Dist: hypothesis; extra == "test"
40
+ Requires-Dist: hypothesis-jsonschema; extra == "test"
41
+ Provides-Extra: mypy-types
42
+ Requires-Dist: lxml-stubs; extra == "mypy-types"
43
+ Requires-Dist: types-Pillow; extra == "mypy-types"
44
+ Requires-Dist: types-PyYAML; extra == "mypy-types"
45
+ Requires-Dist: types-Pygments; extra == "mypy-types"
46
+ Requires-Dist: types-colorama; extra == "mypy-types"
47
+ Requires-Dist: types-decorator; extra == "mypy-types"
48
+ Requires-Dist: types-docutils; extra == "mypy-types"
49
+ Requires-Dist: types-html5lib; extra == "mypy-types"
50
+ Requires-Dist: types-jsonschema; extra == "mypy-types"
51
+ Requires-Dist: types-psutil; extra == "mypy-types"
52
+ Requires-Dist: types-python-jose; extra == "mypy-types"
53
+ Requires-Dist: types-pytz; extra == "mypy-types"
54
+ Requires-Dist: types-redis; extra == "mypy-types"
55
+ Requires-Dist: types-requests; extra == "mypy-types"
56
+ Requires-Dist: types-setuptools; extra == "mypy-types"
57
+ Requires-Dist: types-six; extra == "mypy-types"
58
+ Requires-Dist: types-urllib3; extra == "mypy-types"
59
+ Provides-Extra: runners
60
+ Requires-Dist: toil[cwl]; extra == "runners"
61
+ Requires-Dist: cwl-utils; extra == "runners"
62
+ Provides-Extra: doc
63
+ Requires-Dist: sphinx; extra == "doc"
64
+ Requires-Dist: myst-parser; extra == "doc"
65
+ Requires-Dist: sphinx-autodoc-typehints; extra == "doc"
66
+ Provides-Extra: plots
67
+ Requires-Dist: matplotlib; extra == "plots"
68
+ Provides-Extra: cyto
69
+ Requires-Dist: ipycytoscape; extra == "cyto"
70
+ Provides-Extra: all-except-runner-src
71
+ Requires-Dist: sophios[cyto,doc,mypy-types,plots,test]; extra == "all-except-runner-src"
72
+
73
+ # Workflow Inference Compiler
74
+
75
+ [![doc-buid-status](https://readthedocs.org/projects/workflow-inference-compiler/badge/?version=latest)](https://workflow-inference-compiler.readthedocs.io/en/latest/)
76
+
77
+ Scientific computing can be difficult in practice due to various complex software issues. In particular, chaining together software packages into a computational pipeline can be very error prone. Using the [Common Workflow Language](https://www.commonwl.org) (CWL) greatly helps, but like many other workflow languages users still need to explicitly specify how to connect inputs & outputs. The Workflow Inference Compiler allows users to specify computational protocols at a very high level of abstraction, it automatically infers almost all connections between inputs & outputs, and it compiles to CWL for execution.
78
+
79
+ ## Documentation
80
+ The documentation is available on [readthedocs](https://workflow-inference-compiler.readthedocs.io/en/latest/).
81
+ ## Example Workflows
82
+ The following repositories contain example workflows:
83
+
84
+ [Molecular Modeling Workflows](https://github.com/PolusAI/mm-workflows)
85
+
86
+ [Image Workflows](https://github.com/PolusAI/image-workflows)
87
+
88
+ Like CWL, the compiler is general purpose and is not limited to any specific domain.
89
+ You do not need to install these to use wic. They are completely optional.
90
+
91
+ (But obviously if you're just getting started and you don't have any workflows of your own, you probably want to install at least one of them.)
92
+ ## Quick Start
93
+ See the [installation guide](docs/installguide.md) for more details, but:
94
+
95
+ For pip users:
96
+
97
+ `pip install wic` # Please read the next sentence
98
+
99
+ Unlike conda, **pip cannot install the binary system dependencies needed to actually run most workflows!**
100
+
101
+ If you want to actually run workflows, you (or your sysadmin) will have to manually install and configure additional software!
102
+
103
+ For conda users / developers:
104
+
105
+ See the [installation guide for developers](docs/dev/installguide.md)
106
+
107
+ ```
108
+ wic --yaml ../workflow-inference-compiler/docs/tutorials/helloworld.wic --graphviz --run_local --quiet
109
+ ```
110
+
111
+ The Workflow Inference Compiler is a [Domain Specific Language](https://en.wikipedia.org/wiki/Domain-specific_language) (DSL) based on the [Common Workflow Language](https://www.commonwl.org). CWL is fantastic, but explicitly constructing the Directed Acyclic Graph (DAG) associated with a non-trivial workflow is not so simple. Instead of writing raw CWL, you can write your workflows in a much simpler yml DSL. For technical reasons edge inference is far from unique, so ***`users should always check that edge inference actually produces the intended DAG`***.
112
+
113
+ ## Edge Inference
114
+
115
+ The key feature is that in most cases, you do not need to specify any of the edges! They will be automatically inferred for you based on types, file formats, and naming conventions. For more information, see the [user guide](docs/userguide.md#edge-inference-algorithm) If for some reason edge inference fails, there is a syntax for creating [explicit edges](docs/userguide.md#explicit-edges).
116
+
117
+ ## Subworkflows
118
+
119
+ Subworkflows are very useful for creating reusable, composable building blocks. As shown above, recursive subworkflows are fully supported, and the edge inference algorithm has been very carefully constructed to work across subworkflow boundaries.
120
+
121
+ ## Explicit CWL
122
+
123
+ Since the yml DSL files are automatically compiled to CWL, users should not have to know any CWL. However, the yml DSL is secretly CWL that is simply missing almost all of the tags! In other words, the compiler merely adds missing information to the files, and so if you know CWL you are free to explicitly add the information yourself. Thus, the yml DSL is intentionally a [leaky abstraction](https://en.wikipedia.org/wiki/Leaky_abstraction).
124
+
125
+ ## Python API
126
+ In addition to the underlying declarative yaml syntax, there is an API for writing WIC workflows in python. The python API is philosophically the exact opposite: users should not have to know any CWL, and in fact all CWL features are hidden unless explicitly exposed.
@@ -0,0 +1,54 @@
1
+ # Workflow Inference Compiler
2
+
3
+ [![doc-buid-status](https://readthedocs.org/projects/workflow-inference-compiler/badge/?version=latest)](https://workflow-inference-compiler.readthedocs.io/en/latest/)
4
+
5
+ Scientific computing can be difficult in practice due to various complex software issues. In particular, chaining together software packages into a computational pipeline can be very error prone. Using the [Common Workflow Language](https://www.commonwl.org) (CWL) greatly helps, but like many other workflow languages users still need to explicitly specify how to connect inputs & outputs. The Workflow Inference Compiler allows users to specify computational protocols at a very high level of abstraction, it automatically infers almost all connections between inputs & outputs, and it compiles to CWL for execution.
6
+
7
+ ## Documentation
8
+ The documentation is available on [readthedocs](https://workflow-inference-compiler.readthedocs.io/en/latest/).
9
+ ## Example Workflows
10
+ The following repositories contain example workflows:
11
+
12
+ [Molecular Modeling Workflows](https://github.com/PolusAI/mm-workflows)
13
+
14
+ [Image Workflows](https://github.com/PolusAI/image-workflows)
15
+
16
+ Like CWL, the compiler is general purpose and is not limited to any specific domain.
17
+ You do not need to install these to use wic. They are completely optional.
18
+
19
+ (But obviously if you're just getting started and you don't have any workflows of your own, you probably want to install at least one of them.)
20
+ ## Quick Start
21
+ See the [installation guide](docs/installguide.md) for more details, but:
22
+
23
+ For pip users:
24
+
25
+ `pip install wic` # Please read the next sentence
26
+
27
+ Unlike conda, **pip cannot install the binary system dependencies needed to actually run most workflows!**
28
+
29
+ If you want to actually run workflows, you (or your sysadmin) will have to manually install and configure additional software!
30
+
31
+ For conda users / developers:
32
+
33
+ See the [installation guide for developers](docs/dev/installguide.md)
34
+
35
+ ```
36
+ wic --yaml ../workflow-inference-compiler/docs/tutorials/helloworld.wic --graphviz --run_local --quiet
37
+ ```
38
+
39
+ The Workflow Inference Compiler is a [Domain Specific Language](https://en.wikipedia.org/wiki/Domain-specific_language) (DSL) based on the [Common Workflow Language](https://www.commonwl.org). CWL is fantastic, but explicitly constructing the Directed Acyclic Graph (DAG) associated with a non-trivial workflow is not so simple. Instead of writing raw CWL, you can write your workflows in a much simpler yml DSL. For technical reasons edge inference is far from unique, so ***`users should always check that edge inference actually produces the intended DAG`***.
40
+
41
+ ## Edge Inference
42
+
43
+ The key feature is that in most cases, you do not need to specify any of the edges! They will be automatically inferred for you based on types, file formats, and naming conventions. For more information, see the [user guide](docs/userguide.md#edge-inference-algorithm) If for some reason edge inference fails, there is a syntax for creating [explicit edges](docs/userguide.md#explicit-edges).
44
+
45
+ ## Subworkflows
46
+
47
+ Subworkflows are very useful for creating reusable, composable building blocks. As shown above, recursive subworkflows are fully supported, and the edge inference algorithm has been very carefully constructed to work across subworkflow boundaries.
48
+
49
+ ## Explicit CWL
50
+
51
+ Since the yml DSL files are automatically compiled to CWL, users should not have to know any CWL. However, the yml DSL is secretly CWL that is simply missing almost all of the tags! In other words, the compiler merely adds missing information to the files, and so if you know CWL you are free to explicitly add the information yourself. Thus, the yml DSL is intentionally a [leaky abstraction](https://en.wikipedia.org/wiki/Leaky_abstraction).
52
+
53
+ ## Python API
54
+ In addition to the underlying declarative yaml syntax, there is an API for writing WIC workflows in python. The python API is philosophically the exact opposite: users should not have to know any CWL, and in fact all CWL features are hidden unless explicitly exposed.
@@ -0,0 +1,271 @@
1
+ # Based on https://packaging.python.org/en/latest/tutorials/packaging-projects/
2
+ [build-system]
3
+ requires = ["setuptools>=42", "wheel", "versioneer[toml]==0.29", "tomli"]
4
+ # NOTE: Use upper bound of <68 for setuptools due to 2to3 error.
5
+ # See https://stackoverflow.com/questions/72414481/error-in-anyjson-setup-command-use-2to3-is-invalid
6
+
7
+ build-backend = "setuptools.build_meta"
8
+
9
+ [project]
10
+ name = "sophios"
11
+ dynamic = ["version"]
12
+ authors = [{name = "Jake Fennick", email = "jake.fennick@axleinfo.com"}]
13
+ description = "DSL for inferring the edges of a CWL workflow DAG"
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+ requires-python = ">=3.8"
20
+ dependencies = [
21
+ # NOTE: This 'graphviz' refers to the python bindings to the underlying
22
+ # system binary graphviz package (i.e. the `dot` executable) which we need to
23
+ # install separately using either `conda install graphviz` or `sudo apt install graphviz`.
24
+ # This 'graphviz' is equivalent to `conda install python-graphviz` or
25
+ # `sudo apt install python3-graphviz` ONLY.
26
+ "graphviz",
27
+ "jsonschema<4.18", # temporarily downgrade due to severe performance regression
28
+ "pyyaml",
29
+ "requests",
30
+ "mergedeep",
31
+ "networkx",
32
+ "cwl-utils>=0.32",
33
+ # CommandInputParameter attr changed from `type_` to `type` and back to `type_`
34
+ # between versions 0.30, 0.31, 0.32
35
+ # See https://github.com/common-workflow-language/cwl-utils/releases/
36
+ "typeguard",
37
+ "pydantic>=2.6",
38
+ "docker",
39
+ # FYI also need uidmap to run podman rootless
40
+ "podman",
41
+ # We are using the official release for these packages for now
42
+ "toil[cwl]",
43
+ ]
44
+
45
+ [project.readme]
46
+ file = "README.md"
47
+ content-type = "text/markdown"
48
+
49
+ [project.urls]
50
+ Homepage = "https://github.com/PolusAI/workflow-inference-compiler"
51
+ "Bug Tracker" = "https://github.com/PolusAI/workflow-inference-compiler/issues"
52
+
53
+ [project.optional-dependencies]
54
+
55
+ test = [
56
+ "pre-commit",
57
+ "py", # See https://github.com/kevlened/pytest-parallel/pull/119
58
+ "pytest",
59
+ "pytest-cov",
60
+ "pytest-parallel",
61
+ "coverage",
62
+ "mypy",
63
+ "numpy",
64
+ "scipy",
65
+ "pylint",
66
+ "autopep8",
67
+ "pre-commit",
68
+ "hypothesis",
69
+ "hypothesis-jsonschema",
70
+ ]
71
+ # NOTE: The following list was generated using the command
72
+ # mypy --install-types
73
+ # When updating this list, also update .pre-commit-config.yaml
74
+ # Alternatively, the --non-interactive flag can be used install these automatically.
75
+ # See https://mypy.readthedocs.io/en/stable/command_line.html#miscellaneous
76
+ mypy-types = [
77
+ "lxml-stubs",
78
+ "types-Pillow",
79
+ "types-PyYAML",
80
+ "types-Pygments",
81
+ "types-colorama",
82
+ "types-decorator",
83
+ "types-docutils",
84
+ "types-html5lib",
85
+ "types-jsonschema",
86
+ "types-psutil",
87
+ "types-python-jose",
88
+ "types-pytz",
89
+ "types-redis",
90
+ "types-requests",
91
+ "types-setuptools",
92
+ "types-six",
93
+ "types-urllib3",
94
+ ]
95
+ # NOTE: toil and cwltool have a somewhat continuous release model. However,
96
+ # there can be updates and bugfixes in main that have not yet been released.
97
+ # If you need to install from source, simply run `pip install .[runners-src]`
98
+ # This will overwrite the existing release versions, so if you want to revert
99
+ # to the release versions, `pip uninstall toil cwltool` and then `pip install .`
100
+ # toml language has problem with underscore in array name
101
+ runners = [
102
+ "toil[cwl]",
103
+ "cwl-utils",
104
+ ]
105
+
106
+ # See docs/requirements.txt
107
+ doc = [
108
+ "sphinx",
109
+ "myst-parser",
110
+ "sphinx-autodoc-typehints",
111
+ ]
112
+ plots = ["matplotlib"]
113
+ cyto = ["ipycytoscape"] # only for DAG visualization
114
+ all_except_runner_src = ["sophios[test,doc,plots,cyto,mypy-types]"]
115
+
116
+ [project.scripts]
117
+ sophios = "sophios.main:main"
118
+ cwl_subinterpreter = "sophios.cwl_subinterpreter:main"
119
+ cwltool_filterlog = "sophios.run_local:cwltool_main"
120
+ # Need an extra entrypoint to avoid mixing up WIC cli flags with cwltool cli flags
121
+ cwltool_filterlog_pf = "sophios.run_local:cwltool_main_pf"
122
+
123
+ # Need the following defined in order to make versioneer work with git tags
124
+ [tool.setuptools.dynamic]
125
+ version = {attr = "sophios.__version__"}
126
+
127
+ [tool.setuptools]
128
+ package-dir = {"" = "src"}
129
+ include-package-data = true
130
+
131
+ [tool.setuptools.packages.find]
132
+ where = ["src"]
133
+ namespaces = true
134
+
135
+ [tool.setuptools.package-data]
136
+ "*" = ["*.txt"]
137
+ "sophios" = ["*.json"]
138
+
139
+ [tool.aliases]
140
+ test = "pytest --workers 8"
141
+
142
+ [tool.versioneer]
143
+ VCS = "git"
144
+ style = "pep440-pre"
145
+ versionfile_source = "src/sophios/_version.py"
146
+ versionfile_build = "sophios/_version.py"
147
+ tag_prefix = "v"
148
+
149
+ [tool.build_sphinx]
150
+ source_dir = "docs"
151
+ # Based on https://packaging.python.org/en/latest/tutorials/packaging-projects/
152
+
153
+ [tool.mypy]
154
+ # See https://docs.pydantic.dev/latest/integrations/mypy/#enabling-the-plugin
155
+ plugins = ["pydantic.mypy"]
156
+
157
+ # See https://mypy.readthedocs.io/en/stable/running_mypy.html#follow-imports
158
+ follow_imports = "normal"
159
+
160
+ # Specifies the paths to use, after trying the paths from MYPYPATH environment variable.
161
+ # mypy_path = ''
162
+
163
+ # NOTE: mypy requires __init__.py files and/or namespace_packages = True. Otherwise, you will get
164
+ # "error: Cannot find implementation or library stub for module named 'module'"
165
+ namespace_packages = true
166
+
167
+ # Disallows defining functions without type annotations or with incomplete type annotations.
168
+ disallow_untyped_defs = true
169
+ # Disallows defining functions with incomplete type annotations.
170
+ disallow_incomplete_defs = true
171
+ # Type-checks the interior of functions without type annotations.
172
+ check_untyped_defs = true
173
+
174
+ # Warns about casting an expression to its inferred type.
175
+ warn_redundant_casts = true
176
+ # Warns about unneeded `# type: ignore` comments.
177
+ warn_unused_ignores = true
178
+ # Shows a warning when returning a value with type Any from a function declared with a non-Any return type.
179
+ warn_return_any = true
180
+
181
+ # A regular expression that matches file names, directory names and paths which
182
+ # mypy should ignore while recursively discovering files to check.
183
+ # Note that if you want to exclude multiple regexes, you have to concatenate
184
+ # them with |, and sometimes it doesn't even work. It is much easier to
185
+ # just use the [mypy-*] notation below with ignore_errors = True
186
+ # exclude =
187
+
188
+ # Allows disabling one or multiple error codes globally.
189
+ # disable_error_code = ["ignore-missing-imports"] # comma-separated list of strings
190
+
191
+ # Disallows usage of generic types that do not specify explicit type parameters.
192
+ # disallow_any_generics = False # NOTE: This one tends to generate a medium number of warnings, so enable with caution.
193
+
194
+ # Disallows all expressions in the module that have type Any.
195
+ # disallow_any_expr = False # NOTE: This one tends to generate a MASSIVE number of warnings, so enable with caution.
196
+
197
+ # Ignores all non-fatal errors.
198
+ ignore_errors = false
199
+
200
+ # Probably because it is in the root directory, I was unable to add
201
+ # versioneer to the exclude=regex above, but this works.
202
+
203
+ [[tool.mypy.overrides]]
204
+ module = ["sophios._version", "versioneer"]
205
+ ignore_errors = true
206
+
207
+ [[tool.mypy.overrides]]
208
+ module = [
209
+ "graphviz.*",
210
+ "mergedeep.*",
211
+ "networkx.*",
212
+ "matplotlib.*",
213
+ "ipywidgets.*",
214
+ "scipy.*",
215
+ "ruamel.*",
216
+ "toil.*",
217
+ "version.*",
218
+ "podman.*",
219
+ ]
220
+ ignore_missing_imports = true
221
+
222
+
223
+ [tool.pytest.ini_options]
224
+ markers = [
225
+ "fast: (i.e. for maximum speed, use 'pytest -m fast')",
226
+ "slow: (i.e. for medium speed, use 'pytest -m \"not slow\"')",
227
+ "serial: (These tests CANNOT be run in parallel with --workers n > 1)",
228
+ ]
229
+ addopts = ""
230
+
231
+
232
+ [tool.codespell]
233
+ skip = "*.svg,*.html"
234
+ ignore-words = "codespellwords.txt"
235
+
236
+ # See https://pylint.pycqa.org/en/latest/user_guide/configuration/all-options.html
237
+
238
+ [tool.pylint.main]
239
+
240
+ # TODO: Add class and module docstrings.
241
+ disable=[
242
+ "missing-class-docstring",
243
+ "missing-module-docstring",
244
+ "dangerous-default-value",
245
+ "pointless-string-statement",
246
+ "unused-variable",
247
+ "fixme",
248
+ "invalid-name",
249
+ ]
250
+
251
+ # Specify a score threshold to be exceeded before program exits with error.
252
+ # Try to keep the threshold near the default of a perfect 10/10.
253
+ # However, for some reason, on github actions CI/CD the scores are slightly
254
+ # lower and fails, so let's use 9.25 instead of 9.50 for now.
255
+ fail-under=9.25
256
+
257
+ [tool.pylint.format]
258
+
259
+ # Regexp for a line that is allowed to be longer than the limit.
260
+ ignore-long-lines='^\s*(# )?(See )?(and )?<?https?://\S+>?$'
261
+
262
+ # Maximum number of characters on a single line.
263
+ max-line-length=120
264
+
265
+ # Maximum number of lines in a module.
266
+ max-module-lines=750
267
+
268
+ [tool.pylint.miscellaneous]
269
+
270
+ # List of note tags to take in consideration, separated by a comma.
271
+ notes="FIXME,XXX,TODO"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,7 @@
1
+
2
+ from . import _version
3
+ __version__ = _version.get_versions()['version']
4
+
5
+ # Well, not THIS file.
6
+ auto_gen_header = f"""# This file was autogenerated using the Workflow Inference Compiler, version {__version__}
7
+ # https://github.com/PolusAI/workflow-inference-compiler\n"""