From 2d190ec269d11dc00215c22a39c2b02b82e338c0 Mon Sep 17 00:00:00 2001 From: janscience Date: Tue, 23 Apr 2024 14:16:38 +0200 Subject: [PATCH] initialized package --- .gitignore | 2 ++ pyproject.toml | 50 +++++++++++++++++++++++++++++++++++++++++ src/numerix/__init__.py | 8 +++++++ src/numerix/addition.py | 17 ++++++++++++++ src/numerix/numbers.py | 9 ++++++++ 5 files changed, 86 insertions(+) create mode 100644 pyproject.toml create mode 100644 src/numerix/__init__.py create mode 100644 src/numerix/addition.py create mode 100644 src/numerix/numbers.py diff --git a/.gitignore b/.gitignore index 13d1490..f59d43f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +*~ + # ---> Python # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..37a8345 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,50 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "numerix" +version = "1.0" +#dynamic = ["version"] +dependencies = [ + "numpy", +] +requires-python = ">=3.2" +authors = [ + {name = "Jan Benda", email = "jan.benda@uni-tuebingen.de"}, +] +maintainers = [ + {name = "Jan Benda", email = "jan.benda@uni-tuebingen.de"}, +] +description = "Fancy numerical algorithms." +readme = "README.md" +license = {file = "LICENSE"} +classifiers = [ + "Development Status :: 2 - Pre-Alpha", + "Environment :: Console", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Natural Language :: English", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.12", + "Operating System :: OS Independent", + "Topic :: Multimedia :: Sound/Audio", + "Topic :: Multimedia :: Sound/Audio :: Analysis", + "Topic :: Multimedia :: Sound/Audio :: Conversion", + "Topic :: Scientific/Engineering", + "Topic :: Software Development :: Libraries :: Python Modules", +] + +#[project.urls] +#Repository = "https://github.com/bendalab/thunderfish" +#Documentation = "https://bendalab.github.io/thunderfish" + +#[project.scripts] +#thunderfish = "thunderfish.thunderfish:main" + +#[tool.setuptools.dynamic] +#version = {attr = "thunderfish.version.__version__"} + +#[tool.pytest.ini_options] +#pythonpath = "src" diff --git a/src/numerix/__init__.py b/src/numerix/__init__.py new file mode 100644 index 0000000..28de7ae --- /dev/null +++ b/src/numerix/__init__.py @@ -0,0 +1,8 @@ +""" +# Numerix +""" + +def add_four(x): + return x + 4 + +from .addition import add_two diff --git a/src/numerix/addition.py b/src/numerix/addition.py new file mode 100644 index 0000000..bbb04bd --- /dev/null +++ b/src/numerix/addition.py @@ -0,0 +1,17 @@ +from .numbers import one + + +def __add_secret(x): + return x + 7 + + +def add_two(x): + return x + 2 + + +def one_plus_two(): + return add_two(one()) + + + + diff --git a/src/numerix/numbers.py b/src/numerix/numbers.py new file mode 100644 index 0000000..2db2139 --- /dev/null +++ b/src/numerix/numbers.py @@ -0,0 +1,9 @@ + + +def one(): + return 1 + + +def random(): + return 4 # this number was obtained from a fair die +