Skip to content

Commit

Permalink
Updated value classes based on JSON (#1018)
Browse files Browse the repository at this point in the history
* Bump spec_tests/hed-examples from `8824691` to `7117cf9`

Bumps [spec_tests/hed-examples](https://github.com/hed-standard/hed-examples) from `8824691` to `7117cf9`.
- [Release notes](https://github.com/hed-standard/hed-examples/releases)
- [Commits](hed-standard/hed-examples@8824691...7117cf9)

---
updated-dependencies:
- dependency-name: spec_tests/hed-examples
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump spec_tests/hed-specification from `5465995` to `5bc506c`

Bumps [spec_tests/hed-specification](https://github.com/hed-standard/hed-specification) from `5465995` to `5bc506c`.
- [Release notes](https://github.com/hed-standard/hed-specification/releases)
- [Commits](hed-standard/hed-specification@5465995...5bc506c)

---
updated-dependencies:
- dependency-name: spec_tests/hed-specification
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Improve .tsv loading to support children referenced before parent

* fix typo

* Fix for unknown library hedIDs, minor updates to CI workflows(run on 3.11)

* Pass a tuple in word cloud, not np array

* Bump spec_tests/hed-examples from `7117cf9` to `bce0c7a`

Bumps [spec_tests/hed-examples](https://github.com/hed-standard/hed-examples) from `7117cf9` to `bce0c7a`.
- [Release notes](https://github.com/hed-standard/hed-examples/releases)
- [Commits](hed-standard/hed-examples@7117cf9...bce0c7a)

---
updated-dependencies:
- dependency-name: spec_tests/hed-examples
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Cache and retrieve library_data.json from hed-schemas

* Add a new add_hed_ids script.  Minor documentation corrections

* Bump spec_tests/hed-specification from `5bc506c` to `07812cd`

Bumps [spec_tests/hed-specification](https://github.com/hed-standard/hed-specification) from `5bc506c` to `07812cd`.
- [Release notes](https://github.com/hed-standard/hed-specification/releases)
- [Commits](hed-standard/hed-specification@5bc506c...07812cd)

---
updated-dependencies:
- dependency-name: spec_tests/hed-specification
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump spec_tests/hed-specification from `07812cd` to `7cf62e5`

Bumps [spec_tests/hed-specification](https://github.com/hed-standard/hed-specification) from `07812cd` to `7cf62e5`.
- [Release notes](https://github.com/hed-standard/hed-specification/releases)
- [Commits](hed-standard/hed-specification@07812cd...7cf62e5)

---
updated-dependencies:
- dependency-name: spec_tests/hed-specification
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Add hedId value checking to schema validation
Fix version attribute for merged schemas
Remove cache hit from scripts(I think it's not required, but we'll see...)
rename tag_util -> util in the normal validator

* Don't escape double quotes in .tsv schemas
Slightly improve importing of load_dataframes/save_dataframes by adding to init

* Fix crash in unmerged schema validation.  Always cache with_standard schemas, even if merged

* Fix create_ontology using the wrong tag range for libraries

* Bump spec_tests/hed-specification from `7cf62e5` to `19b29fe`

Bumps [spec_tests/hed-specification](https://github.com/hed-standard/hed-specification) from `7cf62e5` to `19b29fe`.
- [Release notes](https://github.com/hed-standard/hed-specification/releases)
- [Commits](hed-standard/hed-specification@7cf62e5...19b29fe)

---
updated-dependencies:
- dependency-name: spec_tests/hed-specification
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix it so it caches the local hed files when asking for all versions

* More fixes for local schema caching/testing

* Add optional flag to validate_schemas script to validate all 3 types always

* Have the validator script save schemas merged, not unmerged, to prevent an issue where it was saved with a with_standard schema that has since changed

* Bump spec_tests/hed-examples from `bce0c7a` to `6e265bf`

Bumps [spec_tests/hed-examples](https://github.com/hed-standard/hed-examples) from `bce0c7a` to `6e265bf`.
- [Release notes](https://github.com/hed-standard/hed-examples/releases)
- [Commits](hed-standard/hed-examples@bce0c7a...6e265bf)

---
updated-dependencies:
- dependency-name: spec_tests/hed-examples
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Always save schemas with newlines, never CLRF

* Update hed id verification to allow removal of tags without hedIDs

* Add annotationExternal to omn generation
Change how schemas are sorted(so library nodes always go to the top)
Move a bunch of ontology_util to df_util

* Bump spec_tests/hed-examples from `6e265bf` to `ba86a84`

Bumps [spec_tests/hed-examples](https://github.com/hed-standard/hed-examples) from `6e265bf` to `ba86a84`.
- [Release notes](https://github.com/hed-standard/hed-examples/releases)
- [Commits](hed-standard/hed-examples@6e265bf...ba86a84)

---
updated-dependencies:
- dependency-name: spec_tests/hed-examples
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump paambaati/codeclimate-action from 8.0.0 to 9.0.0

Bumps [paambaati/codeclimate-action](https://github.com/paambaati/codeclimate-action) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/paambaati/codeclimate-action/releases)
- [Changelog](https://github.com/paambaati/codeclimate-action/blob/main/CHANGELOG.md)
- [Commits](paambaati/codeclimate-action@v8.0.0...v9.0.0)

---
updated-dependencies:
- dependency-name: paambaati/codeclimate-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Updated the spec_test with additional tests

* Bump spec_tests/hed-specification from `19b29fe` to `bae5675`

Bumps [spec_tests/hed-specification](https://github.com/hed-standard/hed-specification) from `19b29fe` to `bae5675`.
- [Release notes](https://github.com/hed-standard/hed-specification/releases)
- [Commits](hed-standard/hed-specification@19b29fe...bae5675)

---
updated-dependencies:
- dependency-name: spec_tests/hed-specification
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump spec_tests/hed-specification from `bae5675` to `d3bac05`

Bumps [spec_tests/hed-specification](https://github.com/hed-standard/hed-specification) from `bae5675` to `d3bac05`.
- [Release notes](https://github.com/hed-standard/hed-specification/releases)
- [Commits](hed-standard/hed-specification@bae5675...d3bac05)

---
updated-dependencies:
- dependency-name: spec_tests/hed-specification
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump spec_tests/hed-specification from `d3bac05` to `abc9923`

Bumps [spec_tests/hed-specification](https://github.com/hed-standard/hed-specification) from `d3bac05` to `abc9923`.
- [Release notes](https://github.com/hed-standard/hed-specification/releases)
- [Commits](hed-standard/hed-specification@d3bac05...abc9923)

---
updated-dependencies:
- dependency-name: spec_tests/hed-specification
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fixed error handling when definition has no groups

* Added SCORE 2.0.0 to schema cache

* Bump spec_tests/hed-specification from `abc9923` to `f633de5`

Bumps [spec_tests/hed-specification](https://github.com/hed-standard/hed-specification) from `abc9923` to `f633de5`.
- [Release notes](https://github.com/hed-standard/hed-specification/releases)
- [Commits](hed-standard/hed-specification@abc9923...f633de5)

---
updated-dependencies:
- dependency-name: spec_tests/hed-specification
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fixed value tests

* Added support for alternate codes in the spec_tests

* Updated project .toml to include json class_regex

* Bump spec_tests/hed-specification from `f633de5` to `62dbcb0`

Bumps [spec_tests/hed-specification](https://github.com/hed-standard/hed-specification) from `f633de5` to `62dbcb0`.
- [Release notes](https://github.com/hed-standard/hed-specification/releases)
- [Commits](hed-standard/hed-specification@f633de5...62dbcb0)

---
updated-dependencies:
- dependency-name: spec_tests/hed-specification
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump spec_tests/hed-examples from `ba86a84` to `f117c4d`

Bumps [spec_tests/hed-examples](https://github.com/hed-standard/hed-examples) from `ba86a84` to `f117c4d`.
- [Release notes](https://github.com/hed-standard/hed-examples/releases)
- [Commits](hed-standard/hed-examples@ba86a84...f117c4d)

---
updated-dependencies:
- dependency-name: spec_tests/hed-examples
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Minor updates to test files

* outputting the workspace temporarily

* Cleaned up some of the lints

* Updated the actions, did test cleanup

* Separated coverage action from just tests

* Updated the tests for remodel

* Corrected continue-on-error placement

* Updated spec_tests path

* Updated gitactions

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: IanCa <[email protected]>
Co-authored-by: IanCa <[email protected]>
  • Loading branch information
4 people authored Sep 27, 2024
1 parent 6780b08 commit 887f294
Show file tree
Hide file tree
Showing 125 changed files with 69,742 additions and 47,198 deletions.
88 changes: 10 additions & 78 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# PR to master branch
echo 'matrix=["3.8", "3.9", "3.10", "3.11"]' >> $GITHUB_OUTPUT
else
echo 'matrix=["3.9"]' >> $GITHUB_OUTPUT
echo 'matrix=["3.9", "3.11"]' >> $GITHUB_OUTPUT
fi
build:
Expand All @@ -48,92 +48,24 @@ jobs:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('docs/requirements.txt') }}

# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade --upgrade-strategy eager pip
pip install flake8
pip install coverage
pip install -r requirements.txt
pip install -r docs/requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --show-source --statistics --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- name: Test with unittest
# Run spec tests without coverage for non Python 3.9
- name: Run spec_test
env:
HED_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coverage run -m unittest
continue-on-error: true
run: |
python -m unittest discover spec_tests
- name: Run spec_test coverage
# Run unittest without coverage
- name: Test with unittest
env:
HED_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coverage run --append -m unittest spec_tests/test_errors.py
continue-on-error: true

- name: Archive code coverage results
if: ${{matrix.python-version == '3.9'}}
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: .coverage

check-secret:
runs-on: ubuntu-latest
outputs:
secrets-exist: ${{ steps.check-for-secrets.outputs.defined }}
steps:
- name: Check for Secret availability
id: check-for-secrets
# perform secret check & put boolean result as an output
shell: bash
run: |
if [ "${{ secrets.CC_TEST_REPORTER_ID }}" != '' ]; then
echo "defined=true" >> $GITHUB_OUTPUT;
else
echo "defined=false" >> $GITHUB_OUTPUT;
fi
coverage:
name: Publish coverage
needs: [build, check-secret]
runs-on: ubuntu-latest
if: needs.check-secret.outputs.secrets-exist == 'true'

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9

- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('docs/requirements.txt') }}

- name: Install dependencies
run: |
python -m pip install --upgrade --upgrade-strategy eager pip
pip install flake8
pip install coverage
pip install -r requirements.txt
pip install -r docs/requirements.txt
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: code-coverage-report

- name: publish-coverages
with:
coverageCommand: coverage xml
debug: true
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}

python -m unittest discover tests
79 changes: 79 additions & 0 deletions .github/workflows/ci_cov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI_COV

on:
push:
branches: ["*"]
pull_request:
branches: ["*"]

jobs:

check-secret:
runs-on: ubuntu-latest
outputs:
secrets-exist: ${{ steps.check-for-secrets.outputs.defined }}
steps:
- name: Check for Secret availability
id: check-for-secrets
# perform secret check & put boolean result as an output
shell: bash
run: |
if [ "${{ secrets.CC_TEST_REPORTER_ID }}" != '' ]; then
echo "defined=true" >> $GITHUB_OUTPUT;
else
echo "defined=false" >> $GITHUB_OUTPUT;
fi
build:
needs: check-secret
strategy:
matrix:
platform: [ubuntu-latest]
python-version: [ "3.9" ]

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

steps:
- uses: actions/checkout@v4
with:
submodules: true

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

# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade --upgrade-strategy eager pip
pip install flake8 coverage -r requirements.txt -r docs/requirements.txt
# Run flake8
- name: Lint with flake8
run: |
flake8 . --count --show-source --statistics --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# Run unittest with coverage
- name: Test with unittest and coverage
env:
HED_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
run: |
coverage run -m unittest discover tests
# Run spec tests with coverage
- name: Run spec_test coverage
env:
HED_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coverage run --append -m unittest discover spec_tests
coverage xml
ls -la
# Upload coverage to Code Climate
- name: Upload coverage to Code Climate
if: needs.check-secret.outputs.secrets-exist == 'true'
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
2 changes: 1 addition & 1 deletion .github/workflows/ci_windows.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: CI Windows

on:
push:
Expand Down
Loading

0 comments on commit 887f294

Please sign in to comment.