Skip to content

Commit

Permalink
Merge pull request #105 from inab/full_circle
Browse files Browse the repository at this point in the history
Full circle 1.0.0a1
  • Loading branch information
jmfernandez committed Jul 11, 2024
2 parents b04d7f9 + d44df6f commit 8565ea5
Show file tree
Hide file tree
Showing 16 changed files with 633 additions and 316 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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: 1.0.0a0
version: 1.0.0a1
8 changes: 6 additions & 2 deletions tests/containers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@
)

if TYPE_CHECKING:
from typing import (
Sequence,
)

from wfexs_backend.common import (
RelPath,
URIType,
)


def simpleTestContainerFileName(imageUrl: "URIType") -> "RelPath":
def simpleTestContainerFileName(imageUrl: "URIType") -> "Sequence[RelPath]":
"""
This method was borrowed from
https://github.com/nextflow-io/nextflow/blob/539a22b68c114c94eaf4a88ea8d26b7bfe2d0c39/modules/nextflow/src/main/groovy/nextflow/container/SingularityCache.groovy#L80
Expand All @@ -46,4 +50,4 @@ def simpleTestContainerFileName(imageUrl: "URIType") -> "RelPath":

name = name.replace(":", "-").replace("/", "-")

return cast("RelPath", name + extension)
return [cast("RelPath", name + extension)]
2 changes: 1 addition & 1 deletion wfexs_backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
__license__ = "Apache 2.0"

# https://www.python.org/dev/peps/pep-0396/
__version__ = "1.0.0a0"
__version__ = "1.0.0a1"
__url__ = "https://github.com/inab/WfExS-backend"
__official_name__ = "WfExS-backend"

Expand Down
15 changes: 15 additions & 0 deletions wfexs_backend/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,20 @@ def genParserSub(
help="Workflow Run RO-Crate describing a previous workflow execution. It can be either a local path or an URI resolvable from WfExS with no authentication",
)

ap_.add_argument(
"--ignore-retrospective-provenance",
dest="retrospective_first",
action="store_false",
default=True,
help="Retrospective provenance is ignored",
)
ap_.add_argument(
"--prefer-retrospective-provenance",
dest="retrospective_first",
action="store_true",
help="Retrospective provenance is first inspected",
)

not_restage = command not in (WfExS_Commands.Import, WfExS_Commands.ReStage)
ap_.add_argument(
"-W",
Expand Down Expand Up @@ -1483,6 +1497,7 @@ def main() -> None:
secure=args.secure,
reproducibility_level=ReproducibilityLevel(args.reproducibility_level),
strict_reproducibility_level=args.strict_reproducibility_level,
retrospective_first=args.retrospective_first,
)
else:
print(
Expand Down
27 changes: 27 additions & 0 deletions wfexs_backend/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,32 @@ def _key_fixes(cls) -> "Mapping[str, str]":
]


if TYPE_CHECKING:

class ContentWithURIsSetup(TypedDict):
"""
headerRows: Number of header rows
rowSep: Line separator
columnSep: Expression used to break a line into its column values
uriColumns: The 0-based numbers of the columns containing URIs to be fetched
"""

headerRows: "int"
rowSep: "str"
columnSep: "str"
uriColumns: "Sequence[int]"


class ContentWithURIsDesc(NamedTuple):
"""
encodingFormat: the kind of content with URIs (currently implemented is text/csv => tabular)
setup: The dictionary describing the setup
"""

encodingFormat: "str"
setup: "ContentWithURIsSetup"


class MaterializedInput(NamedTuple):
"""
name: Name of the input
Expand All @@ -413,6 +439,7 @@ class MaterializedInput(NamedTuple):
secondaryInputs: "Optional[Sequence[MaterializedContent]]" = None
autoFilled: "bool" = False
implicit: "bool" = False
contentWithURIs: "Optional[ContentWithURIsDesc]" = None


if TYPE_CHECKING:
Expand Down
Loading

0 comments on commit 8565ea5

Please sign in to comment.