1414
1515__all__ = [
1616 "DATABASE_DIRECTORY" ,
17+ "DEFAULT_PREFIX_MAP" ,
18+ "ONTOLOGY_GETTERS" ,
19+ "PROVENANCE_PREFIXES" ,
1720 "RAW_DIRECTORY" ,
1821 "SPECIES_REMAPPING" ,
22+ "DatabaseKwargs" ,
23+ "GetOntologyKwargs" ,
24+ "IterHelperHelperDict" ,
25+ "LookupKwargs" ,
26+ "OntologyFormat" ,
27+ "OntologyPathPack" ,
28+ "SlimGetOntologyKwargs" ,
29+ "check_should_cache" ,
30+ "check_should_force" ,
31+ "check_should_use_tqdm" ,
1932]
2033
2134logger = logging .getLogger (__name__ )
96109
97110NCBITAXON_PREFIX = "ncbitaxon"
98111DATE_FORMAT = "%d:%m:%Y %H:%M"
112+
113+ #: Prefixes for resources that are considered as provenance
99114PROVENANCE_PREFIXES = {
100115 "pubmed" ,
101116 "pmc" ,
117132class DatabaseKwargs (TypedDict ):
118133 """Keyword arguments for database CLI functions."""
119134
135+ #: Should strict identifier parsing be enabled?
120136 strict : bool
137+ #: Should re-download and re-processing be forced?
121138 force : bool
139+ #: Should re-processing be forced?
122140 force_process : bool
123- skip_pyobo : bool
141+
142+ #: Should a progress bar be used?
143+ use_tqdm : bool
144+ #: Skip all prefixes lexicographically sorted below the given prefix
124145 skip_below : str | None
146+ #: If true, skips prefixes that are ontologized as sources in PyOBO
147+ skip_pyobo : bool
148+ #: An enumerated set of prefixes to skip
125149 skip_set : set [str ] | None
126- use_tqdm : bool
127150
128151
129152class SlimGetOntologyKwargs (TypedDict ):
@@ -134,8 +157,11 @@ class SlimGetOntologyKwargs(TypedDict):
134157 only a single ontology is requested.
135158 """
136159
160+ #: Should strict identifier parsing be enabled?
137161 strict : NotRequired [bool ]
162+ #: Should re-download and re-processing be forced?
138163 force : NotRequired [bool ]
164+ #: Should re-processing be forced?
139165 force_process : NotRequired [bool ]
140166
141167
@@ -145,8 +171,11 @@ class GetOntologyKwargs(SlimGetOntologyKwargs):
145171 This dictionary doesn't contain ``prefix`` since this is always explicitly handled.
146172 """
147173
174+ #: The version of the ontology to get
148175 version : NotRequired [str | None ]
176+ #: Should the cache be used?
149177 cache : NotRequired [bool ]
178+ #: Should a progress bar be used?
150179 use_tqdm : NotRequired [bool ]
151180
152181
@@ -186,12 +215,17 @@ class IterHelperHelperDict(SlimGetOntologyKwargs):
186215 :func:`pyobo.get_ontology` in each iteration.
187216 """
188217
218+ #: Should a progress bar be used?
189219 use_tqdm : bool
220+ #: Skip all prefixes lexicographically sorted below the given prefix
190221 skip_below : str | None
222+ #: If true, skips prefixes that are ontologized as sources in PyOBO
191223 skip_pyobo : bool
224+ #: An enumerated set of prefixes to skip
192225 skip_set : set [str ] | None
193226
194227
228+ #: The ontology format
195229OntologyFormat : TypeAlias = Literal ["obo" , "owl" , "json" , "rdf" ]
196230
197231#: from table 2 of the Functional OWL syntax definition
@@ -207,7 +241,9 @@ class IterHelperHelperDict(SlimGetOntologyKwargs):
207241class OntologyPathPack (NamedTuple ):
208242 """A format and path tuple."""
209243
244+ #: The ontology format
210245 format : OntologyFormat
246+ #: The path to the ontology file
211247 path : Path
212248
213249
0 commit comments