diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml new file mode 100644 index 0000000..8612a54 --- /dev/null +++ b/.github/workflows/python-ci.yml @@ -0,0 +1,33 @@ +# python-ci.yml +name: basic CI + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + +jobs: + build-and-run-pytest: + + runs-on: ubuntu-latest + + steps: + # First step (unnamed here) is to checkout to the branch that triggered the event + - uses: actions/checkout@v3 + + # Second step: install python 3.12.9 + - name: Set up Python 3.12.9 + uses: actions/setup-python@v2 + with: + python-version: "3.12.9" + + # Third step: install python packages using a requirements file + - name: Install dependencies + run: | + python -m pip install --upgrade pip cython wheel + pip install -r requirements.txt + + # Fourth step: run tests with Pytest + - name: Run tests + run: make diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9b1a4ef --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python-envs.defaultEnvManager": "ms-python.python:pyenv" +} diff --git a/Makefile b/Makefile index e69de29..1a00479 100644 --- a/Makefile +++ b/Makefile @@ -0,0 +1,7 @@ +default: pylint pytest + +pylint: + find . -iname "*.py" -not -path "./tests/*" | xargs -n1 -I {} pylint --output-format=colorized {}; true + +pytest: + PYTHONDONTWRITEBYTECODE=1 pytest -v --color=yes diff --git a/requirements.txt b/requirements.txt index e69de29..5ce7d14 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1,140 @@ +absl-py==2.4.0 +anyio==4.12.1 +argon2-cffi==25.1.0 +argon2-cffi-bindings==25.1.0 +arrow==1.4.0 +astroid==4.0.4 +asttokens==3.0.1 +astunparse==1.6.3 +async-lru==2.2.0 +attrs==25.4.0 +babel==2.18.0 +beautifulsoup4==4.14.3 +bleach==6.3.0 +certifi==2026.2.25 +cffi==2.0.0 +charset-normalizer==3.4.5 +comm==0.2.3 +contourpy==1.3.3 +cycler==0.12.1 +debugpy==1.8.20 +decorator==5.2.1 +defusedxml==0.7.1 +dill==0.4.1 +executing==2.2.1 +fastjsonschema==2.21.2 +flatbuffers==25.12.19 +fonttools==4.61.1 +fqdn==1.5.1 +gast==0.7.0 +google-pasta==0.2.0 +grpcio==1.78.0 +h11==0.16.0 +h5py==3.16.0 +httpcore==1.0.9 +httpx==0.28.1 +idna==3.11 +iniconfig==2.3.0 +ipdb==0.13.13 +ipykernel==7.2.0 +ipython==9.11.0 +ipython_pygments_lexers==1.1.1 +isoduration==20.11.0 +isort==8.0.1 +jedi==0.19.2 +Jinja2==3.1.6 +joblib==1.5.3 +json5==0.13.0 +jsonpointer==3.0.0 +jsonschema==4.26.0 +jsonschema-specifications==2025.9.1 +jupyter-events==0.12.0 +jupyter-lsp==2.3.0 +jupyter_client==8.8.0 +jupyter_core==5.9.1 +jupyter_server==2.17.0 +jupyter_server_terminals==0.5.4 +jupyterlab==4.5.5 +jupyterlab_pygments==0.3.0 +jupyterlab_server==2.28.0 +keras==3.11.3 +kiwisolver==1.5.0 +lark==1.3.1 +libclang==18.1.1 +Markdown==3.10.2 +markdown-it-py==4.0.0 +MarkupSafe==3.0.3 +matplotlib==3.10.8 +matplotlib-inline==0.2.1 +mccabe==0.7.0 +mdurl==0.1.2 +mistune==3.2.0 +ml-dtypes==0.3.2 +namex==0.1.0 +nbclient==0.10.4 +nbconvert==7.17.0 +nbformat==5.10.4 +nest-asyncio==1.6.0 +notebook_shim==0.2.4 +numpy==1.26.4 +opt_einsum==3.4.0 +optree==0.19.0 +packaging==26.0 +pandas==3.0.1 +pandocfilters==1.5.1 +parso==0.8.6 +pexpect==4.9.0 +pillow==12.1.1 +platformdirs==4.9.4 +pluggy==1.6.0 +prometheus_client==0.24.1 +prompt_toolkit==3.0.52 +protobuf==4.25.8 +psutil==7.2.2 +ptyprocess==0.7.0 +pure_eval==0.2.3 +pycparser==3.0 +Pygments==2.19.2 +pylint==4.0.5 +pyparsing==3.3.2 +pytest==9.0.2 +python-dateutil==2.9.0.post0 +python-json-logger==4.0.0 +PyYAML==6.0.3 +pyzmq==27.1.0 +referencing==0.37.0 +requests==2.32.5 +rfc3339-validator==0.1.4 +rfc3986-validator==0.1.1 +rfc3987-syntax==1.1.0 +rich==14.3.3 +rpds-py==0.30.0 +scikit-learn==1.8.0 +scipy==1.17.1 +seaborn==0.13.2 +Send2Trash==2.1.0 +setuptools==82.0.1 +six==1.17.0 +soupsieve==2.8.3 +stack-data==0.6.3 +tensorboard==2.16.2 +tensorboard-data-server==0.7.2 +tensorflow==2.16.2 +termcolor==3.3.0 +terminado==0.18.1 +threadpoolctl==3.6.0 +tinycss2==1.4.0 +tomlkit==0.14.0 +tornado==6.5.4 +traitlets==5.14.3 +typing_extensions==4.15.0 +tzdata==2025.3 +uri-template==1.3.0 +urllib3==2.6.3 +wcwidth==0.6.0 +webcolors==25.10.0 +webencodings==0.5.1 +websocket-client==1.9.0 +Werkzeug==3.1.6 +wheel==0.46.3 +wrapt==2.1.2 diff --git a/tests/test_sample.py b/tests/test_sample.py new file mode 100644 index 0000000..b762a41 --- /dev/null +++ b/tests/test_sample.py @@ -0,0 +1,8 @@ +# pylint: disable-all + +import unittest + +class TestSample(unittest.TestCase): + def test_sample(self): + # We are simply checking whether 42==42! + self.assertEqual(42, 42)