diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..67c073a --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,24 @@ +name: Main + +on: [push, pull_request] + +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + with: + python-version: 3.12.4 + cache: "pip" + - name: "installation" + run: | + pip install -r requirements.txt -r requirements.dev.txt + - name: "black" + run: black . --check --diff --color + - name: "isort" + run: isort . --check --diff + - name: "mypy" + run: mypy + - name: "pytests" + run: python -m pytest diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ca58a3f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,29 @@ +[metadata] +name = "SPBU_ML_Practice" +author = "Engelsgeduld" +url = "https://github.com/Engelsgeduld/Spbu-ML-Practice" + +[tool.isort] +profile = "black" +line_length = 120 + +[tool.black] +line-length = 120 + +[tool.mypy] +files = ["src"] +install_types = "True" +non_interactive = "True" +disallow_untyped_defs = "True" +ignore_missing_imports = "True" +show_error_codes = "True" +warn_redundant_casts = "True" +warn_unused_configs = "True" +warn_unused_ignores = "True" +allow_redefinition = "True" +warn_no_return = "False" +no_implicit_optional = "False" + +[tool.pytest.ini_options] +testpaths = ["tests"] +addopts = ["--color=yes", "-s"] diff --git a/requirements.dev.txt b/requirements.dev.txt new file mode 100644 index 0000000..0f6b899 --- /dev/null +++ b/requirements.dev.txt @@ -0,0 +1,4 @@ +mypy~=1.10.0 +black~=24.4.2 +isort~=5.13.2 +pytest~=7.4.4 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6c8f0a1 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +numpy~=1.26.4 +scipy~=1.13.1 +matplotlib~=3.8.4 +scikit-learn~=1.5.1 diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_dummy.py b/tests/test_dummy.py new file mode 100644 index 0000000..dedd8ba --- /dev/null +++ b/tests/test_dummy.py @@ -0,0 +1,5 @@ +import pytest + + +def test_dummy(): + assert True == 1