Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use None default value where items are optional #212

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading