From 250acfd358410c6e7544cf93f34bb4f390db1864 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Jurado Suarez Date: Fri, 1 Dec 2023 15:57:05 -0800 Subject: [PATCH] add back dummy tests --- .github/workflows/testing-and-coverage.yml | 2 +- pyproject.toml | 19 ++++++++++++------- tests/{autora_doc => }/conftest.py | 0 tests/test.py | 13 +++++++++++++ 4 files changed, 26 insertions(+), 8 deletions(-) rename tests/{autora_doc => }/conftest.py (100%) create mode 100644 tests/test.py diff --git a/.github/workflows/testing-and-coverage.yml b/.github/workflows/testing-and-coverage.yml index aa307a5..0a761f4 100644 --- a/.github/workflows/testing-and-coverage.yml +++ b/.github/workflows/testing-and-coverage.yml @@ -25,6 +25,6 @@ jobs: python-version: ${{ matrix.python-version }} - name: Run unit tests with pytest run: | - python -m pytest tests --cov=autora_doc --cov-report=xml + python -m pytest tests --cov=autora --cov-report=xml - name: Upload coverage report to codecov uses: codecov/codecov-action@v3 diff --git a/pyproject.toml b/pyproject.toml index 4ddd89a..0f0f11d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,11 @@ classifiers = [ ] dynamic = ["version"] dependencies = [ - "ipykernel", # Support for Jupyter notebooks + "transformers>=4.35.2", + "typer", + "scipy", + # This works, while installing from pytorch and cuda from conda does not", + "torch==2.0.1", ] # On a mac, install optional dependencies with `pip install '.[dev]'` (include the single quotes) @@ -44,12 +48,7 @@ train = [ "mlflow", "azureml-mlflow", "azureml-core", - "typer", "jsonlines", - "transformers>=4.35.2", - "scipy", - # This works, while installing from pytorch and cuda from conda does not", - "torch==2.0.1", ] train_cuda = [ @@ -91,4 +90,10 @@ source = "vcs" version-file = "src/autora/doc/_version.py" [tool.hatch.version.raw-options] -local_scheme = "no-local-version" \ No newline at end of file +local_scheme = "no-local-version" + +[tool.hatch.build.targets.sdist] +include = ["src/autora"] + +[tool.hatch.build.targets.wheel] +packages = ["src/autora"] diff --git a/tests/autora_doc/conftest.py b/tests/conftest.py similarity index 100% rename from tests/autora_doc/conftest.py rename to tests/conftest.py diff --git a/tests/test.py b/tests/test.py new file mode 100644 index 0000000..a578227 --- /dev/null +++ b/tests/test.py @@ -0,0 +1,13 @@ +from autora.doc import example_module + + +def test_greetings() -> None: + """Verify the output of the `greetings` function""" + output = example_module.greetings() + assert output == "Hello from LINCC-Frameworks!" + + +def test_meaning() -> None: + """Verify the output of the `meaning` function""" + output = example_module.meaning() + assert output == 42