diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 6c06118..0000000 --- a/.coveragerc +++ /dev/null @@ -1,12 +0,0 @@ -[run] -include = - ./ConditionalGMM/* -omit = - *tests* - *__init__* -[report] -show_missing = True -exclude_lines = - pragma: no cover - if __name__ == .__main__.: - @tf.function \ No newline at end of file diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 201e650..0000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -notebooks/*.ipynb linguist-documentation \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..0a5c349 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,29 @@ +name: Continuous Integration + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + + steps: + - uses: actions/checkout@v4 + + - name: Install uv and set the python version + uses: astral-sh/setup-uv@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install the project + run: uv pip install -r pyproject.toml --all-extras + + - name: Run tests with coverage + run: uv run pytest tests + + # TODO: figure out how to use this + # - name: Produce coverage report + # run: uv run coverage report -m \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c887b6b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: python -python: - - '3.7' - - '3.6' - - '2.7' -#Install dependencies -install: - - pip install -r requirements.txt - - pip install pytest-cov - - pip install coveralls - - python setup.py install -#Run the tests -script: - - coverage run -m pytest - - coverage report -m -after_success: - - coveralls \ No newline at end of file diff --git a/README.md b/README.md index a165dbc..e75a591 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ConditionalGMM [![Build Status](https://travis-ci.com/tmcclintock/ConditionalGMM.svg?branch=master)](https://travis-ci.com/tmcclintock/ConditionalGMM) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Coverage Status](https://coveralls.io/repos/github/tmcclintock/ConditionalGMM/badge.svg?branch=master&service=github)](https://coveralls.io/github/tmcclintock/CondigionalGMM?branch=master&service=github) +# ConditionalGMM [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) This repository contains helpful functions for computing conditional distributions of multivariate normal distributions and Gaussian mixture models (GMMs). It is able to return not only the conditional means (expectation values) but also the conditional covariances and conditional component weights (probabilities). diff --git a/pyproject.toml b/pyproject.toml index fd9d85a..6123d37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,11 @@ readme = "README.md" requires-python = ">=3.9" classifiers = [ "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", ] license = "MIT" @@ -22,10 +27,28 @@ dependencies = [ [project.optional-dependencies] test = [ "pytest", - "coverage", + "coverage[toml]", ] +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + [project.urls] Homepage = "https://github.com/tmcclintock/ConditionalGMM" Issues = "https://github.com/tmcclintock/ConditionalGMM/issues" +[tool.coverage.run] +include = ["./ConditionalGMM/*"] +omit = [ + "*tests*", + "*__init__*" +] + +[tool.coverage.report] +show_missing = true +exclude_lines = [ + "pragma: no cover", + "if __name__ == .__main__.:", + "@tf.function" +] diff --git a/ConditionalGMM/MNorm.py b/src/ConditionalGMM/MNorm.py similarity index 100% rename from ConditionalGMM/MNorm.py rename to src/ConditionalGMM/MNorm.py diff --git a/ConditionalGMM/UnivariateGMM.py b/src/ConditionalGMM/UnivariateGMM.py similarity index 100% rename from ConditionalGMM/UnivariateGMM.py rename to src/ConditionalGMM/UnivariateGMM.py diff --git a/ConditionalGMM/__init__.py b/src/ConditionalGMM/__init__.py similarity index 100% rename from ConditionalGMM/__init__.py rename to src/ConditionalGMM/__init__.py diff --git a/ConditionalGMM/condGMM.py b/src/ConditionalGMM/condGMM.py similarity index 100% rename from ConditionalGMM/condGMM.py rename to src/ConditionalGMM/condGMM.py