Skip to content

Commit

Permalink
Merge pull request #212 from mvdbeek/explicit_none
Browse files Browse the repository at this point in the history
Use None default value where items are optional
  • Loading branch information
mvdbeek authored Feb 1, 2024
2 parents 9ac35d5 + 2d8f1dc commit aca93ab
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions src/ephemeris/_config_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
class RepositoryInstallTarget(BaseModel):
name: str
owner: str
tool_shed_url: Optional[str]
tool_panel_section_id: Optional[str]
tool_panel_section_label: Optional[str]
revisions: Optional[List[str]]
install_tool_dependencies: Optional[bool]
install_repository_dependencies: Optional[bool]
install_resolver_dependencies: Optional[bool]
tool_shed_url: Optional[str] = None
tool_panel_section_id: Optional[str] = None
tool_panel_section_label: Optional[str] = None
revisions: Optional[List[str]] = None
install_tool_dependencies: Optional[bool] = None
install_repository_dependencies: Optional[bool] = None
install_resolver_dependencies: Optional[bool] = None


class RepositoryInstallTargets(BaseModel):
Expand All @@ -46,22 +46,26 @@ class DataManagers(BaseModel, extra=Extra.forbid):

class Genome(BaseModel):
id: str # The unique id of the data in Galaxy
description: str # The description of the data, including its taxonomy, version and date
dbkey: Optional[str]
source: Optional[str] # The source of the data. Can be: 'ucsc', an NCBI accession number or a URL to a fasta file.
description: Optional[str] = None # The description of the data, including its taxonomy, version and date
dbkey: Optional[str] = None
source: Optional[str] = (
None # The source of the data. Can be: 'ucsc', an NCBI accession number or a URL to a fasta file.
)

# The following fields are currently purely for human consumption and unused by
# IDC infrastructure.
doi: Optional[str] # Any DOI associated with the data
blob: Optional[str] # A blob for any other pertinent information
checksum: Optional[str] # A SHA256 checksum of the original
version: Optional[str] # Any version information associated with the data
doi: Optional[str] = None # Any DOI associated with the data
blob: Optional[str] = None # A blob for any other pertinent information
checksum: Optional[str] = None # A SHA256 checksum of the original
version: Optional[str] = None # Any version information associated with the data

# Description of actions (data managers) to run on target genome.
indexers: Optional[
List[str]
] # indexers to run - keyed on repository name - see data_managers.yml for how to resolve these to tools
skiplist: Optional[List[str]] # unimplemented: but if we implement classes of indexers, these will be ones to skip
skiplist: Optional[List[str]] = (
None # unimplemented: but if we implement classes of indexers, these will be ones to skip
)


class Genomes(BaseModel):
Expand Down

0 comments on commit aca93ab

Please sign in to comment.