Skip to content

Commit

Permalink
fix(Build): Remove internal links to experimental schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Jan 20, 2020
1 parent 7cc504c commit b85f570
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 434 deletions.
219 changes: 5 additions & 214 deletions py/stencila/schema/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

EItemListOrder = Enum("ItemListOrder", ["ascending", "descending", "unordered"])

ESessionStatus = Enum("SessionStatus", ["unknown", "starting", "started", "stopping", "stopped", "failed"])

ECellType = Enum("CellType", ["data", "header"])

ERowType = Enum("RowType", ["header", "footer"])


class Entity:
"""The most basic item, defining the minimum properties required."""
"""
The most simple compound (ie. non-atomic like `number`, `string` etc) type.
"""

id: Optional[str] = None
meta: Optional[Dict[str, Any]] = None
Expand Down Expand Up @@ -614,7 +614,6 @@ class Article(CreativeWork):

authors: Array[Union["Person", "Organization"]]
title: Union[str, Array["Node"]]
environment: Optional["SoftwareEnvironment"] = None

def __init__(
self,
Expand All @@ -627,7 +626,6 @@ def __init__(
datePublished: Optional[Union["Date", str]] = None,
description: Optional[Union[str, Array["Node"]]] = None,
editors: Optional[Array["Person"]] = None,
environment: Optional["SoftwareEnvironment"] = None,
funders: Optional[Array[Union["Person", "Organization"]]] = None,
id: Optional[str] = None,
isPartOf: Optional["CreativeWorkTypes"] = None,
Expand Down Expand Up @@ -670,8 +668,6 @@ def __init__(
self.authors = authors
if title is not None:
self.title = title
if environment is not None:
self.environment = environment


class Collection(CreativeWork):
Expand Down Expand Up @@ -1187,40 +1183,6 @@ def __init__(
self.thumbnail = thumbnail


class Include(Entity):
"""
A directive to include content from an external source (e.g. file, URL) or
content.
"""

source: str
content: Optional[Array["Node"]] = None
hash: Optional[str] = None
mediaType: Optional[str] = None

def __init__(
self,
source: str,
content: Optional[Array["Node"]] = None,
hash: Optional[str] = None,
id: Optional[str] = None,
mediaType: Optional[str] = None,
meta: Optional[Dict[str, Any]] = None
) -> None:
super().__init__(
id=id,
meta=meta
)
if source is not None:
self.source = source
if content is not None:
self.content = content
if hash is not None:
self.hash = hash
if mediaType is not None:
self.mediaType = mediaType


class NumberSchema(Entity):
"""A schema specifying the constraints on a numeric node."""

Expand Down Expand Up @@ -1924,138 +1886,6 @@ def __init__(
self.softwareVersion = softwareVersion


class SoftwareEnvironment(Thing):
"""A computational environment."""

name: str
adds: Optional[Array["SoftwareSourceCode"]] = None
extends: Optional[Array["SoftwareEnvironment"]] = None
removes: Optional[Array["SoftwareSourceCode"]] = None

def __init__(
self,
name: str,
adds: Optional[Array["SoftwareSourceCode"]] = None,
alternateNames: Optional[Array[str]] = None,
description: Optional[Union[str, Array["Node"]]] = None,
extends: Optional[Array["SoftwareEnvironment"]] = None,
id: Optional[str] = None,
meta: Optional[Dict[str, Any]] = None,
removes: Optional[Array["SoftwareSourceCode"]] = None,
url: Optional[str] = None
) -> None:
super().__init__(
name=name,
alternateNames=alternateNames,
description=description,
id=id,
meta=meta,
url=url
)
if name is not None:
self.name = name
if adds is not None:
self.adds = adds
if extends is not None:
self.extends = extends
if removes is not None:
self.removes = removes


class SoftwareSession(Thing):
"""
Definition of a compute session, including its software and compute
resource requirements and status.
"""

clientsLimit: Optional[float] = None
clientsRequest: Optional[float] = None
cpuLimit: Optional[float] = None
cpuRequest: Optional[float] = None
dateEnd: Optional[Union["Date", str]] = None
dateStart: Optional[Union["Date", str]] = None
durationLimit: Optional[float] = None
durationRequest: Optional[float] = None
environment: Optional["SoftwareEnvironment"] = None
memoryLimit: Optional[float] = None
memoryRequest: Optional[float] = None
networkTransferLimit: Optional[float] = None
networkTransferRequest: Optional[float] = None
status: Optional["ESessionStatus"] = None
timeoutLimit: Optional[float] = None
timeoutRequest: Optional[float] = None
volumeMounts: Optional[Array["VolumeMount"]] = None

def __init__(
self,
alternateNames: Optional[Array[str]] = None,
clientsLimit: Optional[float] = None,
clientsRequest: Optional[float] = None,
cpuLimit: Optional[float] = None,
cpuRequest: Optional[float] = None,
dateEnd: Optional[Union["Date", str]] = None,
dateStart: Optional[Union["Date", str]] = None,
description: Optional[Union[str, Array["Node"]]] = None,
durationLimit: Optional[float] = None,
durationRequest: Optional[float] = None,
environment: Optional["SoftwareEnvironment"] = None,
id: Optional[str] = None,
memoryLimit: Optional[float] = None,
memoryRequest: Optional[float] = None,
meta: Optional[Dict[str, Any]] = None,
name: Optional[str] = None,
networkTransferLimit: Optional[float] = None,
networkTransferRequest: Optional[float] = None,
status: Optional["ESessionStatus"] = None,
timeoutLimit: Optional[float] = None,
timeoutRequest: Optional[float] = None,
url: Optional[str] = None,
volumeMounts: Optional[Array["VolumeMount"]] = None
) -> None:
super().__init__(
alternateNames=alternateNames,
description=description,
id=id,
meta=meta,
name=name,
url=url
)
if clientsLimit is not None:
self.clientsLimit = clientsLimit
if clientsRequest is not None:
self.clientsRequest = clientsRequest
if cpuLimit is not None:
self.cpuLimit = cpuLimit
if cpuRequest is not None:
self.cpuRequest = cpuRequest
if dateEnd is not None:
self.dateEnd = dateEnd
if dateStart is not None:
self.dateStart = dateStart
if durationLimit is not None:
self.durationLimit = durationLimit
if durationRequest is not None:
self.durationRequest = durationRequest
if environment is not None:
self.environment = environment
if memoryLimit is not None:
self.memoryLimit = memoryLimit
if memoryRequest is not None:
self.memoryRequest = memoryRequest
if networkTransferLimit is not None:
self.networkTransferLimit = networkTransferLimit
if networkTransferRequest is not None:
self.networkTransferRequest = networkTransferRequest
if status is not None:
self.status = status
if timeoutLimit is not None:
self.timeoutLimit = timeoutLimit
if timeoutRequest is not None:
self.timeoutRequest = timeoutRequest
if volumeMounts is not None:
self.volumeMounts = volumeMounts


class SoftwareSourceCode(CreativeWork):
"""
Computer programming source code. Example: Full (compile ready) solutions,
Expand Down Expand Up @@ -2451,45 +2281,6 @@ def __init__(
self.transcript = transcript


class VolumeMount(Thing):
"""Describes a volume mount from a host to container."""

mountDestination: str
mountOptions: Optional[Array[str]] = None
mountSource: Optional[str] = None
mountType: Optional[str] = None

def __init__(
self,
mountDestination: str,
alternateNames: Optional[Array[str]] = None,
description: Optional[Union[str, Array["Node"]]] = None,
id: Optional[str] = None,
meta: Optional[Dict[str, Any]] = None,
mountOptions: Optional[Array[str]] = None,
mountSource: Optional[str] = None,
mountType: Optional[str] = None,
name: Optional[str] = None,
url: Optional[str] = None
) -> None:
super().__init__(
alternateNames=alternateNames,
description=description,
id=id,
meta=meta,
name=name,
url=url
)
if mountDestination is not None:
self.mountDestination = mountDestination
if mountOptions is not None:
self.mountOptions = mountOptions
if mountSource is not None:
self.mountSource = mountSource
if mountType is not None:
self.mountType = mountType


"""
Union type for valid block content.
"""
Expand Down Expand Up @@ -2523,7 +2314,7 @@ def __init__(
"""
All type schemas that are derived from Entity
"""
EntityTypes = Union["Entity", "ArraySchema", "Article", "AudioObject", "BooleanSchema", "Brand", "Cite", "CiteGroup", "Code", "CodeBlock", "CodeChunk", "CodeError", "CodeExpression", "CodeFragment", "Collection", "ConstantSchema", "ContactPoint", "CreativeWork", "Datatable", "DatatableColumn", "Date", "Delete", "Emphasis", "EnumSchema", "Figure", "Function", "Heading", "ImageObject", "Include", "IntegerSchema", "Link", "List", "ListItem", "Mark", "MediaObject", "NumberSchema", "Organization", "Paragraph", "Parameter", "Periodical", "Person", "Product", "PublicationIssue", "PublicationVolume", "Quote", "QuoteBlock", "SoftwareApplication", "SoftwareEnvironment", "SoftwareSession", "SoftwareSourceCode", "StringSchema", "Strong", "Subscript", "Superscript", "Table", "TableCell", "TableRow", "ThematicBreak", "Thing", "TupleSchema", "Variable", "VideoObject", "VolumeMount"]
EntityTypes = Union["Entity", "ArraySchema", "Article", "AudioObject", "BooleanSchema", "Brand", "Cite", "CiteGroup", "Code", "CodeBlock", "CodeChunk", "CodeError", "CodeExpression", "CodeFragment", "Collection", "ConstantSchema", "ContactPoint", "CreativeWork", "Datatable", "DatatableColumn", "Date", "Delete", "Emphasis", "EnumSchema", "Figure", "Function", "Heading", "ImageObject", "IntegerSchema", "Link", "List", "ListItem", "Mark", "MediaObject", "NumberSchema", "Organization", "Paragraph", "Parameter", "Periodical", "Person", "Product", "PublicationIssue", "PublicationVolume", "Quote", "QuoteBlock", "SoftwareApplication", "SoftwareSourceCode", "StringSchema", "Strong", "Subscript", "Superscript", "Table", "TableCell", "TableRow", "ThematicBreak", "Thing", "TupleSchema", "Variable", "VideoObject"]


"""
Expand Down Expand Up @@ -2565,7 +2356,7 @@ def __init__(
"""
All type schemas that are derived from Thing
"""
ThingTypes = Union["Thing", "Article", "AudioObject", "Brand", "Collection", "ContactPoint", "CreativeWork", "Datatable", "DatatableColumn", "Figure", "ImageObject", "MediaObject", "Organization", "Periodical", "Person", "Product", "PublicationIssue", "PublicationVolume", "SoftwareApplication", "SoftwareEnvironment", "SoftwareSession", "SoftwareSourceCode", "Table", "VideoObject", "VolumeMount"]
ThingTypes = Union["Thing", "Article", "AudioObject", "Brand", "Collection", "ContactPoint", "CreativeWork", "Datatable", "DatatableColumn", "Figure", "ImageObject", "MediaObject", "Organization", "Periodical", "Person", "Product", "PublicationIssue", "PublicationVolume", "SoftwareApplication", "SoftwareSourceCode", "Table", "VideoObject"]


"""
Expand Down
Loading

0 comments on commit b85f570

Please sign in to comment.