Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
d2d42dd
Bump paambaati/codeclimate-action from 4.0.0 to 5.0.0
dependabot[bot] Jul 10, 2023
360ef0b
Use an in memory cache for load_schema_version, always returning the …
IanCa Jul 10, 2023
a8b2a42
Clean up test case setup
IanCa Jul 10, 2023
22324fa
Improve support for inheritable attributes(like extension allowed)
IanCa Jul 11, 2023
b2fcc56
Minor speed improvements to schema entry attributes
IanCa Jul 12, 2023
21dcfcb
Minor tweak to inherited internal func
IanCa Jul 12, 2023
27484cb
Merge pull request #722 from hed-standard/dependabot/github_actions/d…
VisLab Jul 12, 2023
b65be8f
Merge pull request #724 from IanCa/develop
VisLab Jul 12, 2023
6eda14a
add util functions for hed strings
IanCa Jul 12, 2023
5e067e6
Add schema comparison functions. Rename AllTags to just Tags.
IanCa Jul 18, 2023
d3344d9
Merge pull request #725 from IanCa/develop
VisLab Jul 19, 2023
8969041
Merge branch 'develop' of https://github.com/hed-standard/hed-python …
VisLab Jul 19, 2023
1ae46f3
Tag Schema Entries now know their children
IanCa Jul 21, 2023
72b4877
Merge pull request #726 from IanCa/develop
VisLab Jul 26, 2023
56b45d8
Updates to schema loading and comparison
IanCa Aug 1, 2023
ee6f4b2
Add score 1.1.0 to hardcoded schemas
IanCa Aug 1, 2023
af9ae94
Merge pull request #727 from IanCa/develop_new
VisLab Aug 2, 2023
43b9990
Cleanup pass of misc model/schema code
IanCa Aug 4, 2023
b6d25fd
Merge pull request #728 from IanCa/develop
VisLab Aug 4, 2023
9852e84
Wrote experimental code to compare schemas
VisLab Aug 6, 2023
7324e8a
Updated output of schema_compare
VisLab Aug 6, 2023
3c71d26
Corrected column value summary output
VisLab Aug 6, 2023
6ea3d7b
Minor corrections to docs
VisLab Aug 7, 2023
c8f5374
Merge pull request #729 from VisLab/develop
VisLab Aug 7, 2023
9c89d26
Tweak format of errors and schema comparisons
IanCa Aug 7, 2023
0834d10
Merge pull request #731 from IanCa/develop
VisLab Aug 8, 2023
4b4bdde
Bump spec_tests/hed-specification from `33f48d2` to `9f23a3e`
dependabot[bot] Aug 8, 2023
584375e
Throw better error on deprecated xml files
IanCa Aug 8, 2023
beed922
Merge pull request #732 from hed-standard/dependabot/submodules/devel…
VisLab Aug 8, 2023
926b0a3
Merge pull request #733 from IanCa/develop
VisLab Aug 8, 2023
4aa8704
Add HTML as a possible output format for printing errors
IanCa Aug 9, 2023
c4650eb
Add missing file
IanCa Aug 9, 2023
bdedd59
Merge pull request #734 from IanCa/develop
VisLab Aug 10, 2023
2976975
Add summary to top of schema comparisons
IanCa Aug 10, 2023
b0c5521
Simplify find_def_tags. Remove print from test
IanCa Aug 10, 2023
149c0ff
Merge pull request #735 from IanCa/develop
VisLab Aug 10, 2023
d6b2e45
Minor code simplifications
IanCa Aug 10, 2023
def339d
Merge pull request #736 from IanCa/develop
VisLab Aug 11, 2023
b5877ff
Minor titling change to compare schemas
VisLab Aug 14, 2023
3388ab8
Merge pull request #737 from VisLab/develop
VisLab Aug 14, 2023
6726b3e
Started refactoring of event manager
VisLab Aug 17, 2023
2905376
Bump spec_tests/hed-specification from `9f23a3e` to `3201ede`
dependabot[bot] Aug 17, 2023
f2e0126
Merge pull request #738 from VisLab/develop
VisLab Aug 17, 2023
cd30829
Add support for validating deprecatedFrom. Improve other attribute v…
IanCa Aug 18, 2023
90d91b2
Fix test schema
IanCa Aug 18, 2023
aa4222f
Merge pull request #739 from hed-standard/dependabot/submodules/devel…
VisLab Aug 18, 2023
bae6b55
Merge pull request #740 from IanCa/develop
VisLab Aug 18, 2023
b8cfbf0
Added a convert nan to n/a in df_to_hed
VisLab Aug 21, 2023
f2e7174
Updated event manager test
VisLab Aug 21, 2023
f230b21
Merge pull request #741 from VisLab/develop
VisLab Aug 21, 2023
0867afc
Bump spec_tests/hed-specification from `3201ede` to `dcd2b54`
dependabot[bot] Aug 22, 2023
885234f
Merge pull request #742 from hed-standard/dependabot/submodules/devel…
VisLab Aug 22, 2023
02ad058
Allow dict as a parameter to DefinitionDict
IanCa Aug 22, 2023
c98deca
Fix get_def_dict to return value if no sidecar
IanCa Aug 22, 2023
514c7fb
Merge pull request #743 from IanCa/develop
VisLab Aug 22, 2023
62d2235
Merge pull request #744 from IanCa/fix_tabular_input
VisLab Aug 22, 2023
5d8044e
Updating tests for ErrorManager
VisLab Aug 22, 2023
02ec49e
Bump spec_tests/hed-specification from `dcd2b54` to `8e78802`
dependabot[bot] Aug 23, 2023
f62c95f
Merge pull request #745 from hed-standard/dependabot/submodules/devel…
VisLab Aug 23, 2023
8adae8b
Add conversionFactor support. Improve default_unit handling and API
IanCa Aug 23, 2023
b99f9a5
Merge pull request #746 from IanCa/develop
VisLab Aug 25, 2023
9f19a72
Updated the event manager
VisLab Aug 25, 2023
31ac199
Merge branch 'develop' of https://github.com/hed-standard/hed-python …
VisLab Aug 25, 2023
d7055cc
Update searching. Add optional field to exact match notation {requir…
IanCa Aug 25, 2023
64222a6
Merge pull request #747 from IanCa/develop
VisLab Aug 26, 2023
cbc429b
Updated the event manager
VisLab Aug 26, 2023
dc8afab
Merge branch 'develop' of https://github.com/hed-standard/hed-python …
VisLab Aug 26, 2023
57f8a46
Tweak so it's easier to validate hed strings
IanCa Aug 27, 2023
1049bc5
Also add def_dict when creating from hed strings
IanCa Aug 27, 2023
47806ce
Updated the tests for summarize tags
VisLab Aug 27, 2023
fff7661
Merge pull request #748 from IanCa/develop
VisLab Aug 27, 2023
75100e0
Merge branch 'develop' of https://github.com/hed-standard/hed-python …
VisLab Aug 27, 2023
bb75c53
Update HedString sort api. Fix performance issues recently introduce…
IanCa Aug 29, 2023
1e7abc7
Bump spec_tests/hed-specification from `8e78802` to `25a8b2a`
dependabot[bot] Aug 29, 2023
11d750e
Merge pull request #751 from hed-standard/dependabot/submodules/devel…
VisLab Aug 29, 2023
823f8e7
Merge pull request #750 from IanCa/develop
VisLab Aug 29, 2023
9b880ba
Merge branch 'develop' of https://github.com/hed-standard/hed-python …
VisLab Aug 29, 2023
679fe53
Updated the event manager
VisLab Aug 29, 2023
b9946bc
Merge pull request #752 from VisLab/develop
VisLab Aug 29, 2023
f2d3111
Hopefully recovered from inadvertent rename of definition
VisLab Aug 29, 2023
78435ea
Merge pull request #753 from VisLab/develop
VisLab Aug 29, 2023
1b4f6ea
Make HedGroup.replace work on non direct children
IanCa Aug 30, 2023
0e443ef
Merge pull request #754 from IanCa/develop
VisLab Aug 30, 2023
7ee370b
Add BaseInput.series_filtered
IanCa Aug 31, 2023
833812b
Remove test prints
IanCa Aug 31, 2023
995838e
Merge pull request #755 from IanCa/develop
VisLab Aug 31, 2023
638fe8f
Bump spec_tests/hed-specification from `25a8b2a` to `8f1c014`
dependabot[bot] Sep 1, 2023
15594c2
Merge pull request #757 from hed-standard/dependabot/submodules/devel…
VisLab Sep 1, 2023
0924324
Minor corrections to the summaries
VisLab Sep 5, 2023
0689ad5
Merge pull request #758 from VisLab/develop
VisLab Sep 5, 2023
da56f4c
Add indented group printing from dungscout96
IanCa Aug 31, 2023
af6dd03
Always copy definition contents in fully. Add tests for description …
IanCa Sep 7, 2023
55ea4a2
Merge pull request #759 from IanCa/develop
VisLab Sep 7, 2023
b8a5fbe
Add svg support for wordcloud
IanCa Sep 7, 2023
94ec013
Add another function to init
IanCa Sep 8, 2023
d320bc3
Bump spec_tests/hed-specification from `8f1c014` to `c47fff9`
dependabot[bot] Sep 8, 2023
58cedd7
Merge pull request #760 from IanCa/develop
VisLab Sep 8, 2023
49b515c
Merge pull request #761 from hed-standard/dependabot/submodules/devel…
VisLab Sep 8, 2023
8d5ad35
Updated the remodeler to allow separation by task
VisLab Sep 9, 2023
4758e12
Merge pull request #762 from VisLab/develop
VisLab Sep 9, 2023
1713078
Corrected minor issues in various summaries
VisLab Sep 10, 2023
827cfbc
Merge pull request #763 from VisLab/develop
VisLab Sep 10, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
with:
coverageCommand: coverage xml
debug: true
uses: paambaati/codeclimate-action@v4.0.0
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}

2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
'vcs_pageview_mode': '',
'style_nav_header_background': 'LightSlateGray',
# Toc options
'collapse_navigation': True,
'collapse_navigation': False,
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Note: this is a work in progress. More information is coming.
user_guide.rst

.. toctree::
:maxdepth: 3
:maxdepth: 4
:caption: HED Python API:

api2.rst
Expand Down
2 changes: 1 addition & 1 deletion hed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from hed.schema.hed_schema import HedSchema
from hed.schema.hed_schema_group import HedSchemaGroup
from hed.schema.hed_schema_io import get_schema, load_schema, load_schema_version
from hed.schema.hed_schema_io import load_schema, load_schema_version


# from hed import errors, models, schema, tools, validator
Expand Down
2 changes: 1 addition & 1 deletion hed/errors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .error_reporter import ErrorHandler, get_printable_issue_string, sort_issues
from .error_reporter import ErrorHandler, get_printable_issue_string, sort_issues, replace_tag_references
from .error_types import DefinitionErrors, OnsetErrors, SchemaErrors, SchemaWarnings, SidecarErrors, \
ValidationErrors, ColumnErrors
from .error_types import ErrorContext, ErrorSeverity
Expand Down
67 changes: 11 additions & 56 deletions hed/errors/error_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"""

from hed.errors.error_reporter import hed_error, hed_tag_error
from hed.errors.error_types import ValidationErrors, SchemaErrors, \
SidecarErrors, SchemaWarnings, ErrorSeverity, DefinitionErrors, OnsetErrors, ColumnErrors
from hed.errors.error_types import ValidationErrors, SidecarErrors, ErrorSeverity, DefinitionErrors, OnsetErrors, ColumnErrors


@hed_tag_error(ValidationErrors.UNITS_INVALID)
Expand Down Expand Up @@ -165,13 +164,13 @@ def val_error_sidecar_key_missing(invalid_key, category_keys):

@hed_tag_error(ValidationErrors.HED_DEF_EXPAND_INVALID, actual_code=ValidationErrors.DEF_EXPAND_INVALID)
def val_error_bad_def_expand(tag, actual_def, found_def):
return f"A data-recordings Def-expand tag does not match the given definition." + \
return f"A data-recording's Def-expand tag does not match the given definition." + \
f"Tag: '{tag}'. Actual Def: {actual_def}. Found Def: {found_def}"


@hed_tag_error(ValidationErrors.HED_DEF_UNMATCHED, actual_code=ValidationErrors.DEF_INVALID)
def val_error_def_unmatched(tag):
return f"A data-recordings Def tag cannot be matched to definition. Tag: '{tag}'"
return f"A data-recording's Def tag cannot be matched to definition. Tag: '{tag}'"


@hed_tag_error(ValidationErrors.HED_DEF_VALUE_MISSING, actual_code=ValidationErrors.DEF_INVALID)
Expand All @@ -186,7 +185,7 @@ def val_error_def_value_extra(tag):

@hed_tag_error(ValidationErrors.HED_DEF_EXPAND_UNMATCHED, actual_code=ValidationErrors.DEF_EXPAND_INVALID)
def val_error_def_expand_unmatched(tag):
return f"A data-recordings Def-expand tag cannot be matched to definition. Tag: '{tag}'"
return f"A data-recording's Def-expand tag cannot be matched to definition. Tag: '{tag}'"


@hed_tag_error(ValidationErrors.HED_DEF_EXPAND_VALUE_MISSING, actual_code=ValidationErrors.DEF_EXPAND_INVALID)
Expand Down Expand Up @@ -228,60 +227,11 @@ def val_warning_capitalization(tag):

@hed_tag_error(ValidationErrors.UNITS_MISSING, default_severity=ErrorSeverity.WARNING)
def val_warning_default_units_used(tag, default_unit):
if default_unit is None:
return f"No unit specified on - '{tag}'. Multiple default values exist and cannot be inferred"
return f"No unit specified. Using '{default_unit}' as the default - '{tag}'"


@hed_error(SchemaErrors.HED_SCHEMA_DUPLICATE_NODE)
def schema_error_hed_duplicate_node(tag, duplicate_tag_list, section):
tag_join_delimiter = "\n\t"
return f"Duplicate term '{str(tag)}' used {len(duplicate_tag_list)} places in '{section}' section schema as:" + \
f"{tag_join_delimiter}{tag_join_delimiter.join(duplicate_tag_list)}"


@hed_error(SchemaErrors.HED_SCHEMA_DUPLICATE_FROM_LIBRARY)
def schema_error_hed_duplicate_node(tag, duplicate_tag_list, section):
tag_join_delimiter = "\n\t"
return f"Duplicate term '{str(tag)}' was found in the library and in the standard schema in '{section}' section schema as:" + \
f"{tag_join_delimiter}{tag_join_delimiter.join(duplicate_tag_list)}"


@hed_error(SchemaErrors.SCHEMA_ATTRIBUTE_INVALID)
def schema_error_unknown_attribute(attribute_name, source_tag):
return f"Attribute '{attribute_name}' used by '{source_tag}' was not defined in the schema, " \
f"or was used outside of it's defined class."


@hed_error(SchemaWarnings.INVALID_CHARACTERS_IN_DESC, default_severity=ErrorSeverity.WARNING,
actual_code=SchemaWarnings.HED_SCHEMA_CHARACTER_INVALID)
def schema_warning_invalid_chars_desc(desc_string, tag_name, problem_char, char_index):
return f"Invalid character '{problem_char}' in desc for '{tag_name}' at position {char_index}. '{desc_string}"


@hed_error(SchemaWarnings.INVALID_CHARACTERS_IN_TAG, default_severity=ErrorSeverity.WARNING,
actual_code=SchemaWarnings.HED_SCHEMA_CHARACTER_INVALID)
def schema_warning_invalid_chars_tag(tag_name, problem_char, char_index):
return f"Invalid character '{problem_char}' in tag '{tag_name}' at position {char_index}."


@hed_error(SchemaWarnings.INVALID_CAPITALIZATION, default_severity=ErrorSeverity.WARNING)
def schema_warning_invalid_capitalization(tag_name, problem_char, char_index):
return "First character must be a capital letter or number. " + \
f"Found character '{problem_char}' in tag '{tag_name}' at position {char_index}."


@hed_error(SchemaWarnings.NON_PLACEHOLDER_HAS_CLASS, default_severity=ErrorSeverity.WARNING)
def schema_warning_non_placeholder_class(tag_name, invalid_attribute_name):
return "Only placeholder nodes('#') can have a unit or value class." + \
f"Found {invalid_attribute_name} on {tag_name}"


@hed_error(SchemaWarnings.INVALID_ATTRIBUTE, default_severity=ErrorSeverity.ERROR)
def schema_error_invalid_attribute(tag_name, invalid_attribute_name):
return f"'{invalid_attribute_name}' should not be present in a loaded schema, found on '{tag_name}'." \
f"Something went very wrong."



@hed_error(SidecarErrors.BLANK_HED_STRING)
def sidecar_error_blank_hed_string():
return "No HED string found for Value or Category column."
Expand Down Expand Up @@ -389,6 +339,11 @@ def onset_error_offset_before_onset(tag):
return f"Offset tag '{tag}' does not have a matching onset."


@hed_tag_error(OnsetErrors.ONSET_SAME_DEFS_ONE_ROW, actual_code=ValidationErrors.ONSET_OFFSET_INSET_ERROR)
def onset_error_same_defs_one_row(tag, def_name):
return f"'{tag}' uses name '{def_name}', which was already used at this onset time."


@hed_tag_error(OnsetErrors.INSET_BEFORE_ONSET, actual_code=ValidationErrors.ONSET_OFFSET_INSET_ERROR)
def onset_error_inset_before_onset(tag):
return f"Inset tag '{tag}' does not have a matching onset."
Expand Down
Loading