Skip to content

Commit aca93ab

Browse files
authored
Merge pull request #212 from mvdbeek/explicit_none
Use None default value where items are optional
2 parents 9ac35d5 + 2d8f1dc commit aca93ab

1 file changed

Lines changed: 19 additions & 15 deletions

File tree

src/ephemeris/_config_models.py

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
class RepositoryInstallTarget(BaseModel):
1919
name: str
2020
owner: str
21-
tool_shed_url: Optional[str]
22-
tool_panel_section_id: Optional[str]
23-
tool_panel_section_label: Optional[str]
24-
revisions: Optional[List[str]]
25-
install_tool_dependencies: Optional[bool]
26-
install_repository_dependencies: Optional[bool]
27-
install_resolver_dependencies: Optional[bool]
21+
tool_shed_url: Optional[str] = None
22+
tool_panel_section_id: Optional[str] = None
23+
tool_panel_section_label: Optional[str] = None
24+
revisions: Optional[List[str]] = None
25+
install_tool_dependencies: Optional[bool] = None
26+
install_repository_dependencies: Optional[bool] = None
27+
install_resolver_dependencies: Optional[bool] = None
2828

2929

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

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

5355
# The following fields are currently purely for human consumption and unused by
5456
# IDC infrastructure.
55-
doi: Optional[str] # Any DOI associated with the data
56-
blob: Optional[str] # A blob for any other pertinent information
57-
checksum: Optional[str] # A SHA256 checksum of the original
58-
version: Optional[str] # Any version information associated with the data
57+
doi: Optional[str] = None # Any DOI associated with the data
58+
blob: Optional[str] = None # A blob for any other pertinent information
59+
checksum: Optional[str] = None # A SHA256 checksum of the original
60+
version: Optional[str] = None # Any version information associated with the data
5961

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

6670

6771
class Genomes(BaseModel):

0 commit comments

Comments
 (0)