-
Notifications
You must be signed in to change notification settings - Fork 7
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
Normalizing columns: add some checks #138
Changes from 1 commit
b86677e
e701167
2a4a84d
06189c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ class Tag(str, Enum): | |
uc_sets = "~UC_SETS" | ||
uc_t = "~UC_T" | ||
# This is used by Veda for unit conversion when displaying results | ||
# unitconversion = "~UNITCONVERSION" | ||
unitconversion = "~UNITCONVERSION" | ||
|
||
@classmethod | ||
def has_tag(cls, tag): | ||
|
@@ -258,6 +258,8 @@ def _read_veda_tags_info(veda_tags_file: str) -> Dict[Tag, Dict[str, str]]: | |
if "tag_fields" in tag_info: | ||
# The file stores the tag name in lowercase, and without the ~ | ||
tag_name = "~" + tag_info["tag_name"].upper() | ||
if not Tag.has_tag(tag_name): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @siddharth-krishna I am thinking of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good. Btw if I add a warning in the other direction, we are at present missing the following:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, cool! At least one of them will be gone after merging. |
||
raise ValueError(f"{veda_tags_file} has an unknown Tag {tag_name}") | ||
column_aliases[tag_name] = {} | ||
names = tag_info["tag_fields"]["fields_names"] | ||
aliases = tag_info["tag_fields"]["fields_aliases"] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@olejandro is it okay to uncomment this? This is needed for the check below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is definitely okay to uncomment it. I am wondering how we should go about this one though, because we won't use the info provided by this type of an input table (so there is no need to normalise or do anything else about it). At the same time, it is good for it to appear in
raw_tables.txt
for diffing purposes.