affine for batch norm + xavier for w_s #9
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
# Ipsedo's Python continuous integration | |
name: Python continuous integration | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
python_ci: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Clean files | |
run: | | |
shopt -s globstar | |
GLOBIGNORE='resources/*:notebooks/*:venv/*' | |
PY_FILES=$(ls -d **/*.py) | |
TOML_FILES=$(ls -d **/*.toml) | |
YML_FILES=$(ls -d **/*.yaml) | |
MD_FILES=$(ls -d **/*.md) | |
TXT_FILES=$(ls -d **/*.txt) | |
python -m pre_commit_hooks.end_of_file_fixer $PY_FILES $TOML_FILES $YML_FILES $MD_FILES $TXT_FILES | |
python -m pre_commit_hooks.trailing_whitespace_fixer $PY_FILES $TOML_FILES $YML_FILES $MD_FILES $TXT_FILES | |
python -m pre_commit_hooks.check_toml $TOML_FILES | |
python -m pre_commit_hooks.check_yaml $YML_FILES | |
python -m pre_commit_hooks.fix_encoding_pragma $PY_FILES | |
python -m pre_commit_hooks.mixed_line_ending $PY_FILES $TOML_FILES $YML_FILES $MD_FILES $TXT_FILES | |
- name: Format python code | |
run: | | |
python -m pycln . --config pyproject.toml | |
python -m isort . --settings-path pyproject.toml | |
python -m black . --config pyproject.toml | |
- name: Check code | |
run: | | |
python -m mypy kan tests | |
python -m pylint kan tests | |
- name: Test code | |
run: | | |
pytest tests |