Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SermetPekin committed Dec 4, 2024
1 parent 4705261 commit 0991b9f
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 474 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Python package

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

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10" , "3.12"] #["3.9", "3.10", "3.11" , "3.12" ]
env:
OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest evdspy
# python -m pip install poetry
python -m pip install uv
# poetry install
uv venv
source .venv/bin/activate
uv pip install .
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# 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
- name: Test with pytest
run: |
pytest -v
13 changes: 10 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@ build-backend = "setuptools.build_meta"

[project]
name = "micrograd"
version = "0.1.0"
version = "0.2.0"
authors = [
{ name = "Andrej Karpathy", email = "[email protected]" }
{ name = "Andrej Karpathy", email = "[email protected]" },
{ name = "Sermet Pekin", email = "[email protected]" },
]
description = "A tiny scalar-valued autograd engine with a small PyTorch-like neural network library on top."
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.8"
dependencies = [
"graphviz>=0.20.3",
"matplotlib>=3.7.5",
"pytest>=8.3.4",
"ruff>=0.8.1",
"scikit-learn>=1.3.2",
"torch>=2.5.1",
"tox>=4.23.2",
]

[project.urls]
Repository = "https://github.com/karpathy/micrograd"
Source = "https://github.com/SermetPekin/micrograd"
Original = "https://github.com/karpathy/micrograd"

Loading

0 comments on commit 0991b9f

Please sign in to comment.