Skip to content

Commit

Permalink
Update python-package-conda.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vsyrgkanis authored Jun 28, 2024
1 parent 8012cf5 commit 0229045
Showing 1 changed file with 21 additions and 24 deletions.
45 changes: 21 additions & 24 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
name: Python Package using Conda
name: Run Jupyter Notebooks

on:
schedule:
- cron: '0 */12 1 * *'
push:
workflow_dispatch:
branches:
- main
schedule:
- cron: '0 0 * * 0' # Runs once a week on Sunday at midnight

jobs:
build-linux:
run-notebooks:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Set up Python 3.10
uses: actions/setup-python@v3
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.8' # Adjust this to your preferred Python version

- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Run Notebook
python -m pip install --upgrade pip
pip install jupyter nbconvert
- name: Convert Jupyter notebooks to Python scripts
run: |
cd PM1
jupyter nbconvert --to script python-linear-model-overfitting.ipynb
python python-linear-model-overfitting.py
- name: Lint with flake8
find . -name "*.ipynb" -exec jupyter nbconvert --to script {} \;
- name: Run Python scripts
run: |
pip install -y flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
find . -name "*.py" -exec python {} \;

0 comments on commit 0229045

Please sign in to comment.