diff --git a/sites/docs/src/content/api_reference/dev/api/pipelines/download.md b/sites/docs/src/content/api_reference/dev/api/pipelines/download.md index a2a9d621c5..fc484881c8 100644 --- a/sites/docs/src/content/api_reference/dev/api/pipelines/download.md +++ b/sites/docs/src/content/api_reference/dev/api/pipelines/download.md @@ -128,7 +128,7 @@ Find specified revision / branch hash Loop through container names and download Singularity images -#### `prioritize_direct_download(container_list){:python}` +#### `prioritize_direct_download(container_list: List[str]) → List[str]{:python}` Helper function that takes a list of container images (URLs and Docker URIs), eliminates all Docker URIs for which also a URL is contained and returns the @@ -151,6 +151,12 @@ we want to keep it and not replace with with whatever we have now (which might b A regex that matches http, r”^$|^http” could thus be used to prioritize the Docker URIs over http Downloads +We also need to handle a special case: The Singularity downloads from Seqera Containers all end in ‘data’, although +they are not equivalent, e.g.: + +‘’ +‘’ + #### `prompt_compression_type(){:python}` Ask user if we should compress the downloaded files diff --git a/sites/docs/src/content/api_reference/dev/api/utils.md b/sites/docs/src/content/api_reference/dev/api/utils.md index 8886442fa1..6c131b395f 100644 --- a/sites/docs/src/content/api_reference/dev/api/utils.md +++ b/sites/docs/src/content/api_reference/dev/api/utils.md @@ -244,8 +244,20 @@ Bases: `BaseModel` "type": "object", "properties": { "repository_type": { - "title": "Repository Type", - "type": "string" + "anyOf": [ + { + "enum": [ + "pipeline", + "modules" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Repository Type" }, "nf_core_version": { "anyOf": [ @@ -501,10 +513,7 @@ Bases: `BaseModel` "title": "NFCoreTemplateConfig", "type": "object" } - }, - "required": [ - "repository_type" - ] + } } ``` @@ -514,7 +523,7 @@ Bases: `BaseModel` - [`lint (Dict[str, List[str] | List[Dict[str, List[str]]] | bool] | None)`](#nf_core.utils.NFCoreYamlConfig.lint) - [`nf_core_version (str | None)`](#nf_core.utils.NFCoreYamlConfig.nf_core_version) - [`org_path (str | None)`](#nf_core.utils.NFCoreYamlConfig.org_path) - - [`repository_type (str)`](#nf_core.utils.NFCoreYamlConfig.repository_type) + - [`repository_type (Literal['pipeline', 'modules'] | None)`](#nf_core.utils.NFCoreYamlConfig.repository_type) - [`template (nf_core.utils.NFCoreTemplateConfig | None)`](#nf_core.utils.NFCoreYamlConfig.template) - [`update (Dict[str, str | bool | Dict[str, str | Dict[str, str | bool]]] | None)`](#nf_core.utils.NFCoreYamlConfig.update) @@ -534,9 +543,9 @@ Version of nf-core/tools used to create/update the pipeline Path to the organisation’s modules repository (used for modules repo_type only) -#### _`field{:python}`_`repository_type{:python}`_: str_`{:python}`_\[Required]_ +#### _`field{:python}`_`repository_type{:python}`_: Literal\['pipeline', 'modules'] | None_`{:python}`_= None_ -Type of repository: pipeline or modules +Type of repository #### _`field{:python}`_`template{:python}`_: [NFCoreTemplateConfig](#nf_core.utils.NFCoreTemplateConfig) | None_`{:python}`_= None_ @@ -548,6 +557,30 @@ Disable updating specific modules/subworkflows (when repository_type is pipeline #### `get(item: str, default: Any = None) → Any{:python}` +#### `model_dump(**kwargs) → Dict[str, Any]{:python}` + +Usage docs: + +Generate a dictionary representation of the model, optionally specifying which fields to include or exclude. + +- **Parameters:** + - **mode** – The mode in which to_python should run. + If mode is ‘json’, the output will only contain JSON serializable types. + If mode is ‘python’, the output may contain non-JSON-serializable Python objects. + - **include** – A set of fields to include in the output. + - **exclude** – A set of fields to exclude from the output. + - **context** – Additional context to pass to the serializer. + - **by_alias** – Whether to use the field’s alias in the dictionary key if defined. + - **exclude_unset** – Whether to exclude fields that have not been explicitly set. + - **exclude_defaults** – Whether to exclude fields that are set to their default value. + - **exclude_none** – Whether to exclude fields that have a value of None. + - **round_trip** – If True, dumped values should be valid as input for non-idempotent types such as Json\[T]. + - **warnings** – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, + “error” raises a \[PydanticSerializationError]\[pydantic_core.PydanticSerializationError]. + - **serialize_as_any** – Whether to serialize fields with duck-typing serialization behavior. +- **Returns:** + A dictionary representation of the model. + #### `_abc_impl{:python}`_= <\_abc.\_abc_data object>_ ### _`class{:python}`_`nf_core.utils.Pipeline(wf_path: Path){:python}`