Skip to content

Fix missing imports in ml_engine.py: add Path and datetime imports #4

Fix missing imports in ml_engine.py: add Path and datetime imports

Fix missing imports in ml_engine.py: add Path and datetime imports #4

Workflow file for this run

name: Test and Lint
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov
pip install .
- name: Run tests
run: |
python -m pytest tests/ -v --cov=shellrosetta --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 black mypy pytest pytest-cov
pip install -r requirements.txt
pip install .
- name: Run linters
run: |
# Run flake8 with more lenient settings
flake8 shellrosetta/ tests/ --max-line-length=88 --ignore=E501,W293,W291,W292,E302,E305,F401,F841 || true
# Run black to check formatting
black --check shellrosetta/ tests/ || true
# Run mypy with basic checks
mypy shellrosetta/ --ignore-missing-imports || true