-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tutorial cdm extension via selection of concepts (#1035)
# Description Improved Extending Core Data Model tutorial, and made modification to the code base to assure fully functional data model in CDF. Alpha flags are renamed to Experimental flag to support tutorial. ## Bump - [ ] Patch - [x] Minor - [ ] Skip ## Changelog ### Added - Core Data Model transformer that produces data model version that can be extended/edited by users - Convenience method for extension of core data model via subsetting of concepts `..read.cdf.core_data_model` in `NeatSession` ### Changed - Rename alpha to experimental flags - Update Extending Core Data Model tutorial in documentation
- Loading branch information
Showing
27 changed files
with
2,832 additions
and
475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
import warnings | ||
|
||
|
||
class AlphaWarning(UserWarning): | ||
class ExperimentalFeatureWarning(UserWarning): | ||
def __init__(self, feature_name: str): | ||
super().__init__(f"Alpha feature '{feature_name}' is subject to change without notice") | ||
super().__init__(f"Experimental feature '{feature_name}' is subject to change without notice") | ||
|
||
def warn(self) -> None: | ||
warnings.warn(self, stacklevel=2) | ||
|
||
|
||
class AlphaFlags: | ||
manual_rules_edit = AlphaWarning("enable_manual_edit") | ||
same_space_properties_only_export = AlphaWarning("same-space-properties-only") | ||
standardize_naming = AlphaWarning("standardize_naming") | ||
standardize_space_and_version = AlphaWarning("standardize_space_and_version") | ||
data_model_subsetting = AlphaWarning("data_model_subsetting") | ||
ontology_read = AlphaWarning("ontology_read") | ||
imf_read = AlphaWarning("imf_read") | ||
dexpi_read = AlphaWarning("dexpi_read") | ||
aml_read = AlphaWarning("aml_read") | ||
csv_read = AlphaWarning("csv_read") | ||
to_ontology = AlphaWarning("to_ontology") | ||
class ExperimentalFlags: | ||
manual_rules_edit = ExperimentalFeatureWarning("enable_manual_edit") | ||
same_space_properties_only_export = ExperimentalFeatureWarning("same-space-properties-only") | ||
standardize_naming = ExperimentalFeatureWarning("standardize_naming") | ||
standardize_space_and_version = ExperimentalFeatureWarning("standardize_space_and_version") | ||
data_model_subsetting = ExperimentalFeatureWarning("data_model_subsetting") | ||
core_data_model_subsetting = ExperimentalFeatureWarning("core_data_model_subsetting") | ||
ontology_read = ExperimentalFeatureWarning("ontology_read") | ||
imf_read = ExperimentalFeatureWarning("imf_read") | ||
dexpi_read = ExperimentalFeatureWarning("dexpi_read") | ||
aml_read = ExperimentalFeatureWarning("aml_read") | ||
csv_read = ExperimentalFeatureWarning("csv_read") | ||
to_ontology = ExperimentalFeatureWarning("to_ontology") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.