Skip to content

Commit

Permalink
Merge pull request #84 from inab/jmfernandez
Browse files Browse the repository at this point in the history
Reimplemented the export machinery and version bump to 0.10.0
  • Loading branch information
jmfernandez authored Apr 24, 2024
2 parents 6d08385 + 6812ea5 commit 35a72b9
Show file tree
Hide file tree
Showing 72 changed files with 13,000 additions and 2,015 deletions.
3 changes: 3 additions & 0 deletions .pytest.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[pytest]
pythonpath = .
testpaths = tests
required_plugins = pytest_param_files
addopts = --order-dependencies
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ authors:
given-names: Daniel
orcid: "https://orcid.org/0000-0001-8152-0398"
cff-version: 1.2.0
date-released: "2023-11-07"
date-released: "2024-04-24"
identifiers:
- description: WfExS-backend release in Zenodo
type: doi
Expand All @@ -28,4 +28,4 @@ message: "If you use this software, please cite it using these metadata."
repository-code: "https://github.com/inab/WfExS-backend"
type: software
title: "WfExS-backend"
version: 0.10.2
version: 0.99.0
8 changes: 7 additions & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,13 @@ As these checks are applied only to the python version currently being used in t
there is a GitHub workflow at [.github/workflows/pre-commit.yml](.github/workflows/pre-commit.yml)
which runs them on several Python versions.

If you have lots of cores, fast disks and docker installed, you can locally run the pre-commit GitHub workflow using [act](https://github.com/nektos/act):
Although there are few tests covering the code, they can be tried using next command line:

```bash
pytest
```

Last, if you have lots of cores, fast disks and docker installed, you can locally run the pre-commit GitHub workflow using [act](https://github.com/nektos/act):

```bash
act -j pre-commit
Expand Down
584 changes: 404 additions & 180 deletions README.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ references to the inputs, that we are going to use to instantiate the workflows.

- [ ] **Step 7.f**: Upload workflow to WorkflowHub.

- [ ] **Step 7.g**: Upload to Zenodo.
- [x] **Step 7.g**: Upload to Zenodo.

- [ ] **Step 7.h**: Upload to B2SHARE.
- [x] **Step 7.h**: Upload to B2SHARE.

- [ ] **Step 7.i**: Upload to osf.io .

- [ ] **Setp 7.j**: Explore datacite doi service.

- [x] **Step 7.k**: Upload to Dataverse.

- [ ] **Step 8**: (partially implemented) Create execution provenance, which includes uploading URLs of results and / or DOIs / URIs.

Expand Down
4 changes: 4 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ pylint < 2.14.0 ; python_version == '3.6'
pylint >= 2.15.5 ; python_version >= '3.7'
pytest
pytest-cov
pytest-dependency @ git+https://github.com/jmfernandez/[email protected]
pytest-env
pytest-order
pytest_param_files
pytest-xdist
pyflakes >= 2.5.0
flake8 < 6.0.0 ; python_version < '3.8'
Expand Down
4,226 changes: 3,148 additions & 1,078 deletions development-docs/wfexs-analysis-lifecycle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions mypy-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ types-jsonschema
types-mypy-extensions
types-openpyxl
types-paramiko
types-pluggy
types-pyxdg
types-PyYAML
types-requests
types-setuptools
Expand Down
100 changes: 100 additions & 0 deletions mypy-stubs/defusedxml/ElementTree.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
from collections.abc import Iterator, Sequence
from typing import Any
from _typeshed import SupportsRead
from xml.etree.ElementTree import (
Element,
ElementTree,
ParseError as ParseError,
TreeBuilder as _TreeBuilder,
XMLParser as _XMLParser,
tostring as tostring,
)

class DefusedXMLParser(_XMLParser):
forbid_dtd: bool
forbid_entities: bool
forbid_external: bool
def __init__(
self,
html: object | bool = ...,
target: _TreeBuilder | None = None,
encoding: str | None = None,
forbid_dtd: bool = False,
forbid_entities: bool = True,
forbid_external: bool = True,
) -> None: ...
def defused_start_doctype_decl(
self,
name: str | None,
sysid: str | None,
pubid: str | None,
has_internal_subset: bool,
) -> None: ...
def defused_entity_decl(
self,
name: str | None,
is_parameter_entity: bool,
value: str | None,
base: str | None,
sysid: str | None,
pubid: str | None,
notation_name: str | None,
) -> None: ...
def defused_unparsed_entity_decl(
self,
name: str | None,
base: str | None,
sysid: str | None,
pubid: str | None,
notation_name: str | None,
) -> None: ...
def defused_external_entity_ref_handler(
self,
context: str | None,
base: str | None,
sysid: str | None,
pubid: str | None,
) -> None: ...

XMLTreeBuilder = DefusedXMLParser
XMLParse = DefusedXMLParser
XMLParser = DefusedXMLParser

# wrapper to xml.etree.ElementTree.parse
def parse(
source: str | SupportsRead[bytes] | SupportsRead[str],
parser: _XMLParser | None = None,
forbid_dtd: bool = False,
forbid_entities: bool = True,
forbid_external: bool = True,
) -> ElementTree: ...

# wrapper to xml.etree.ElementTree.iterparse
def iterparse(
source: str | SupportsRead[bytes] | SupportsRead[str],
events: Sequence[str] | None = None,
parser: _XMLParser | None = None,
forbid_dtd: bool = False,
forbid_entities: bool = True,
forbid_external: bool = True,
) -> Iterator[tuple[str, Any]]: ...
def fromstring(
text: str,
forbid_dtd: bool = False,
forbid_entities: bool = True,
forbid_external: bool = True,
) -> Element: ...

XML = fromstring

__all__ = [
"ParseError",
"XML",
"XMLParse",
"XMLParser",
"XMLTreeBuilder",
"fromstring",
"iterparse",
"parse",
"tostring",
]
7 changes: 7 additions & 0 deletions mypy-stubs/defusedxml/METADATA.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version = "0.7.*"
upstream_repository = "https://github.com/tiran/defusedxml"
partial_stub = true

[tool.stubtest]
ignore_missing_stub = true
stubtest_requirements = ["lxml"]
15 changes: 15 additions & 0 deletions mypy-stubs/defusedxml/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from .common import (
DefusedXmlException as DefusedXmlException,
DTDForbidden as DTDForbidden,
EntitiesForbidden as EntitiesForbidden,
ExternalReferenceForbidden as ExternalReferenceForbidden,
NotSupportedError as NotSupportedError,
)

__all__ = [
"DefusedXmlException",
"DTDForbidden",
"EntitiesForbidden",
"ExternalReferenceForbidden",
"NotSupportedError",
]
23 changes: 23 additions & 0 deletions mypy-stubs/defusedxml/cElementTree.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from .ElementTree import (
XML as XML,
ParseError as ParseError,
XMLParse as XMLParse,
XMLParser as XMLParser,
XMLTreeBuilder as XMLTreeBuilder,
fromstring as fromstring,
iterparse as iterparse,
parse as parse,
tostring as tostring,
)

__all__ = [
"ParseError",
"XML",
"XMLParse",
"XMLParser",
"XMLTreeBuilder",
"fromstring",
"iterparse",
"parse",
"tostring",
]
43 changes: 43 additions & 0 deletions mypy-stubs/defusedxml/common.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
PY3: bool

class DefusedXmlException(ValueError): ...

class DTDForbidden(DefusedXmlException):
name: str | None
sysid: str | None
pubid: str | None
def __init__(
self, name: str | None, sysid: str | None, pubid: str | None
) -> None: ...

class EntitiesForbidden(DefusedXmlException):
name: str | None
value: str | None
base: str | None
sysid: str | None
pubid: str | None
notation_name: str | None
def __init__(
self,
name: str | None,
value: str | None,
base: str | None,
sysid: str | None,
pubid: str | None,
notation_name: str | None,
) -> None: ...

class ExternalReferenceForbidden(DefusedXmlException):
context: str | None
base: str | None
sysid: str | None
pubid: str | None
def __init__(
self,
context: str | None,
base: str | None,
sysid: str | None,
pubid: str | None,
) -> None: ...

class NotSupportedError(DefusedXmlException): ...
53 changes: 53 additions & 0 deletions mypy-stubs/defusedxml/expatbuilder.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
from _typeshed import SupportsRead
from xml.dom.expatbuilder import (
ExpatBuilder as _ExpatBuilder,
Namespaces as _Namespaces,
)
from xml.dom.minidom import Document
from xml.dom.xmlbuilder import Options

__origin__: str

class DefusedExpatBuilder(_ExpatBuilder):
forbid_dtd: bool
forbid_entities: bool
forbid_external: bool
def __init__(
self,
options: Options | None = None,
forbid_dtd: bool = False,
forbid_entities: bool = True,
forbid_external: bool = True,
) -> None: ...
def defused_start_doctype_decl(
self, name, sysid, pubid, has_internal_subset
) -> None: ...
def defused_entity_decl(
self, name, is_parameter_entity, value, base, sysid, pubid, notation_name
) -> None: ...
def defused_unparsed_entity_decl(
self, name, base, sysid, pubid, notation_name
) -> None: ...
def defused_external_entity_ref_handler(
self, context, base, sysid, pubid
) -> None: ...
def install(self, parser) -> None: ...

class DefusedExpatBuilderNS(_Namespaces, DefusedExpatBuilder):
def install(self, parser) -> None: ...
def reset(self) -> None: ...

def parse(
file: str | SupportsRead[bytes | str],
namespaces: bool = True,
forbid_dtd: bool = False,
forbid_entities: bool = True,
forbid_external: bool = True,
) -> Document: ...
def parseString(
string: str,
namespaces: bool = True,
forbid_dtd: bool = False,
forbid_entities: bool = True,
forbid_external: bool = True,
) -> Document: ...
10 changes: 10 additions & 0 deletions mypy-stubs/defusedxml/expatreader.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from _typeshed import Incomplete

# Cannot type most things here as DefusedExpatParser is based off of
# xml.sax.expatreader, which is an undocumented module and lacks types at the moment.

__origin__: str

DefusedExpatParser = Incomplete

def create_parser(*args, **kwargs): ...
53 changes: 53 additions & 0 deletions mypy-stubs/defusedxml/lxml.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import threading
from _typeshed import Incomplete

# Not bothering with types here as lxml support is supposed to be dropped in a future version
# of defusedxml

LXML3: Incomplete
__origin__: str
tostring: Incomplete

# Should be imported from lxml.etree.ElementBase, but lxml lacks types
class _ElementBase: ...

class RestrictedElement(_ElementBase):
blacklist: Incomplete
def __iter__(self): ...
def iterchildren(self, tag: Incomplete | None = ..., reversed: bool = ...): ...
def iter(self, tag: Incomplete | None = ..., *tags): ...
def iterdescendants(self, tag: Incomplete | None = ..., *tags): ...
def itersiblings(self, tag: Incomplete | None = ..., preceding: bool = ...): ...
def getchildren(self): ...
def getiterator(self, tag: Incomplete | None = ...): ...

class GlobalParserTLS(threading.local):
parser_config: Incomplete
element_class: Incomplete
def createDefaultParser(self): ...
def setDefaultParser(self, parser) -> None: ...
def getDefaultParser(self): ...

getDefaultParser: Incomplete

def check_docinfo(
elementtree, forbid_dtd: bool = ..., forbid_entities: bool = ...
) -> None: ...
def parse(
source,
parser: Incomplete | None = ...,
base_url: Incomplete | None = ...,
forbid_dtd: bool = ...,
forbid_entities: bool = ...,
): ...
def fromstring(
text,
parser: Incomplete | None = ...,
base_url: Incomplete | None = ...,
forbid_dtd: bool = ...,
forbid_entities: bool = ...,
): ...

XML = fromstring

def iterparse(*args, **kwargs) -> None: ...
Loading

0 comments on commit 35a72b9

Please sign in to comment.