From 8dc40c0204dba0c9b4c4728d4c787d19af1d681e Mon Sep 17 00:00:00 2001 From: vvcb Date: Sun, 5 Feb 2023 23:08:31 +0000 Subject: [PATCH] Installable package with pyproject.toml Squashed commit of the following: commit d6469be175394eb50a76cf1a66212e714be4123b Author: vvcb Date: Sun Feb 5 22:51:45 2023 +0000 Working pyproject.toml setup commit 523f5e0ba2851ca5027896510f66ac86f3507a23 Author: vvcb Date: Sun Feb 5 21:52:36 2023 +0000 Initial commit for pip installer --- avoidable_admissions/__init__.py | 4 +++ pyproject.toml | 47 ++++++++++++++++++++++++++++++++ requirements.txt | 12 -------- setup.py | 11 ++------ 4 files changed, 53 insertions(+), 21 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt diff --git a/avoidable_admissions/__init__.py b/avoidable_admissions/__init__.py index 33cb3f9..6b48737 100644 --- a/avoidable_admissions/__init__.py +++ b/avoidable_admissions/__init__.py @@ -1,3 +1,7 @@ +from xml.etree.ElementTree import VERSION + from avoidable_admissions import data, features, models, utils, visualization __all__ = ["data", "features", "models", "utils", "visualization"] + +VERSION = "0.1.0" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..976f4a5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,47 @@ +[build-system] +requires = ["setuptools", "setuptools-scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "avoidable_admissions" +description = "HDRUK Collaboration on Avoidable Admissions in the NHS" +readme = "README.md" +requires-python = ">=3.8" +license = { file = "LICENSE" } +authors = [ + { name = "LTHTR Data Science Team", email = "datascience@lthtr.nhs.uk" }, +] +dependencies = ["pandas", "pandera", "python-dotenv"] +dynamic = ["version"] + +[tool.setuptools] +packages = ["avoidable_admissions"] + +[tool.setuptools.dynamic] +version = {attr = "avoidable_admissions.VERSION"} + +[project.urls] +Homepage = "https://github.com/LTHTR-DST/hdruk_avoidable_admissions/" +Documentation = "https://lthtr-dst.github.io/hdruk_avoidable_admissions/" + +[project.optional-dependencies] +eda = [ + "black", + "bokeh", + "holoviews", + "isort", + "jupyterlab_code_formatter", + "jupyterlab", + "seaborn", +] +dev = [ + "mkdocs-material", + "mkdocs", + "mkdocstrings-python", + "mkdocstrings", + "nbstripout", + "pre-commit", +] + +[tool.isort] +profile = "black" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 9c20beb..0000000 --- a/requirements.txt +++ /dev/null @@ -1,12 +0,0 @@ -# This file is not currently used. Use environment.yml instead. -# This file or pyproject.toml make more sense if we are building a python package. -# # local package -# -e . - -# # external requirements -# click -# Sphinx -# coverage -# awscli -# flake8 -# python-dotenv>=0.5.1 diff --git a/setup.py b/setup.py index 6dd457e..6068493 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,3 @@ -from setuptools import find_packages, setup +from setuptools import setup -setup( - name="avoidable_admissions", - packages=find_packages(), - version="0.1.0", - description="HDRUK Data Science Collaboration on Avoidable Admissions in the NHS", - author="LTHTR-DST", - license="MIT", -) +setup()