Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
run: |
if [[ "${{ github.event_name }}" == 'push' && "${{ github.ref }}" == 'refs/heads/master' ]]; then
# Push to master branch
echo 'matrix=["3.8", "3.9", "3.10", "3.11"]' >> $GITHUB_OUTPUT
echo 'matrix=["3.9", "3.10", "3.11", "3.12", "3.13"]' >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == 'pull_request' && "${{ github.event.pull_request.base.ref }}" == 'master' ]]; then
# PR to master branch
echo 'matrix=["3.8", "3.9", "3.10", "3.11"]' >> $GITHUB_OUTPUT
echo 'matrix=["3.9", "3.10", "3.11", "3.12", "3.13"]' >> $GITHUB_OUTPUT
else
echo 'matrix=["3.9", "3.11"]' >> $GITHUB_OUTPUT
echo 'matrix=["3.9", "3.13"]' >> $GITHUB_OUTPUT
fi

build:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade --upgrade-strategy eager pip
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r docs/requirements.txt

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_cov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest]
python-version: [ "3.9" ]
python-version: [ "3.12" ]

runs-on: ${{ matrix.platform }}

Expand All @@ -46,7 +46,7 @@ jobs:
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade --upgrade-strategy eager pip
python -m pip install --upgrade pip
pip install flake8 coverage -r requirements.txt -r docs/requirements.txt

# Run flake8
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
platform: [windows-latest]
python-version: ["3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13""]

runs-on: ${{ matrix.platform }}

Expand All @@ -32,7 +32,7 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade --upgrade-strategy eager pip
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Test with unittest
Expand Down
88 changes: 44 additions & 44 deletions .github/workflows/test_installer.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.8", "3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Create work directory
run: |
mkdir workdir
echo "WORKDIR=$(pwd)/workdir" >> $GITHUB_OUTPUT

- name: Create and activate virtual environment
run: |
cd $WORKDIR
python -m venv .venv
source .venv/bin/activate

- name: Install package
run: |
cd $WORKDIR
source .venv/bin/activate
python -m pip install --upgrade pip
pip install $GITHUB_WORKSPACE

- name: Run post-installation test
run: |
cd $WORKDIR
source .venv/bin/activate
python -c "from hed.models.hed_string import HedString; print('Import test passed.')"
on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Create work directory
run: |
mkdir workdir
echo "WORKDIR=$(pwd)/workdir" >> $GITHUB_OUTPUT
- name: Create and activate virtual environment
run: |
cd $WORKDIR
python -m venv .venv
source .venv/bin/activate
- name: Install package
run: |
cd $WORKDIR
source .venv/bin/activate
python -m pip install --upgrade pip
pip install $GITHUB_WORKSPACE
- name: Run post-installation test
run: |
cd $WORKDIR
source .venv/bin/activate
python -c "from hed.models.hed_string import HedString; print('Import test passed.')"
20 changes: 10 additions & 10 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
defusedxml>=0.7.1
inflect>=6.0.5
jsonschema>=4.17.3
numpy>=1.21.6
openpyxl>=3.1.0
pandas>=1.3.5
portalocker>=2.7.0
inflect>=7.5.0
jsonschema>=4.23.0
numpy==2.0.2
openpyxl>=3.1.5
pandas>=2.2.3
portalocker>=3.1.1
semantic-version>=2.10.0
myst-parser>=1.0.0
Sphinx>=5.2.2
sphinx_rtd_theme>=1.0.0
wordcloud==1.9.4
myst-parser==3.0.1
Sphinx==7.4.7
sphinx_rtd_theme>=3.0.2
wordcloud>=1.9.4
21 changes: 20 additions & 1 deletion hed/errors/error_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from hed.errors.error_reporter import hed_error, hed_tag_error
from hed.errors.error_types import (ValidationErrors, SidecarErrors, ErrorSeverity, DefinitionErrors,
TemporalErrors, ColumnErrors)
TemporalErrors, ColumnErrors, TagQualityErrors)


@hed_tag_error(ValidationErrors.UNITS_INVALID)
Expand Down Expand Up @@ -462,3 +462,22 @@ def nested_column_ref(column_name, ref_column):
@hed_error(ColumnErrors.MALFORMED_COLUMN_REF, actual_code=SidecarErrors.SIDECAR_BRACES_INVALID)
def malformed_column_ref(column_name, index, symbol):
return f"Column {column_name} has a malformed column reference. Improper symbol {symbol} found at index {index}."


@hed_error(TagQualityErrors.MISSING_EVENT_TYPE, default_severity=ErrorSeverity.WARNING,
actual_code=TagQualityErrors.MISSING_EVENT_TYPE)
def missing_event_type(string, line):
return f"The HED string '{string}' at line {line} has no Event type."


@hed_error(TagQualityErrors.MISSING_TASK_ROLE, default_severity=ErrorSeverity.WARNING,
actual_code=TagQualityErrors.MISSING_TASK_ROLE)
def missing_task_role(event_type, string, line):
return f"The HED string '{string}' at line {line} with event {event_type} has no Task-event-role type tag."


@hed_error(TagQualityErrors.IMPROPER_TAG_GROUPING, default_severity=ErrorSeverity.WARNING,
actual_code=TagQualityErrors.IMPROPER_TAG_GROUPING)
def improper_tag_grouping(event_types, string, line):
return f"The HED string '{string}' at line {line} has multiple events [{event_types}] but is improperly " + \
f"parenthesized so the other tags cannot be uniquely associated with an event."
5 changes: 5 additions & 0 deletions hed/errors/error_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,8 @@ class ColumnErrors:
SELF_COLUMN_REF = "SELF_COLUMN_REF"
NESTED_COLUMN_REF = "NESTED_COLUMN_REF"
MALFORMED_COLUMN_REF = "MALFORMED_COLUMN_REF"

class TagQualityErrors:
MISSING_EVENT_TYPE = "MISSING_EVENT_TYPE"
MISSING_TASK_ROLE = "MISSING_TASK_ROLE"
IMPROPER_TAG_GROUPING = "IMPROPER_TAG_GROUPING"
Loading