From 528bc404eb4db25d136b6aec7f0ced9eb5c54a7e Mon Sep 17 00:00:00 2001 From: Peter Kok Date: Thu, 6 Jun 2024 11:35:23 +0200 Subject: [PATCH] Dummy test --- .github/workflows/build-and-test.yml | 2 +- .gitignore | 1 + src/paradigma/__init__.py | 9 ++++++++- src/paradigma/dummy.py | 3 +++ tests/test_paradigma.py | 6 ++++++ 5 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/paradigma/dummy.py create mode 100644 tests/test_paradigma.py diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 859ec20..14d0d05 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: Python package +name: Build and test on: push: diff --git a/.gitignore b/.gitignore index 849ddff..1b100fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ dist/ +*.pyc diff --git a/src/paradigma/__init__.py b/src/paradigma/__init__.py index 2ae2839..54e6bf5 100644 --- a/src/paradigma/__init__.py +++ b/src/paradigma/__init__.py @@ -1 +1,8 @@ -pass +# read version from installed package +from importlib.metadata import version + +__version__ = version("paradigma") + +from .dummy import ( + hello_world +) diff --git a/src/paradigma/dummy.py b/src/paradigma/dummy.py new file mode 100644 index 0000000..7ab2bc1 --- /dev/null +++ b/src/paradigma/dummy.py @@ -0,0 +1,3 @@ + +def hello_world(): + return "Hello, world!" diff --git a/tests/test_paradigma.py b/tests/test_paradigma.py new file mode 100644 index 0000000..6b05ed9 --- /dev/null +++ b/tests/test_paradigma.py @@ -0,0 +1,6 @@ +# Dummy test +import paradigma + +def test_dummy(): + paradigma.hello_world() == "Hello, world!" +