Simplify code and add developer-friendly documentation for nodes. #294
Workflow file for this run
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
name: Continuous Integration (CI) | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
merge_group: | |
jobs: | |
format-test: | |
name: Format / Unit Tests / Python ${{ matrix.python-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Tests currently fail for 3.8 and 3.9. | |
python-version: ['3.10', '3.11'] | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./python/ml_croissant | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install library | |
run: pip install .[dev] | |
- name: PyTest | |
run: pytest . | |
- name: PyLint | |
run: pylint **/*.py | |
validation-test: | |
name: Validation / JSON-LD Tests / Python 3.11 | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./python/ml_croissant | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install library | |
run: pip install . | |
- name: Validate JSON-LD files | |
# wiki-text is excluded at the moment. See: https://github.com/mlcommons/croissant/issues/101. | |
# movielens is excluded at the moment. See: https://github.com/mlcommons/croissant/issues/103. | |
run: | | |
JSON_FILES=$(find ../../datasets/ -type f -name "*.json" ! -path '*wiki-text*' ! -path '*movielens*') | |
for file in ${JSON_FILES} | |
do | |
echo "Validating ${file}..." | |
python scripts/validate.py --file ${file} | |
done | |
generation-test: | |
name: Generation / JSON-LD Tests / Python 3.11 | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./python/ml_croissant | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install library | |
run: pip install . | |
- name: Generate JSON-LD files | |
run: python scripts/generate.py --file ../../datasets/titanic/metadata.json --record_set passengers |