diff --git a/pixl_dcmd/README.md b/pixl_dcmd/README.md index 6ebc9933f..ed452bc08 100644 --- a/pixl_dcmd/README.md +++ b/pixl_dcmd/README.md @@ -8,15 +8,7 @@ and persisting it in the PIXL postgres database. Install the Python dependencies with ```bash -pip install -e ../../pixl_core/ . -``` - -```bash -pip install -r requirements.txt -``` - -```bash -pip install -e . +pip install -e ../pixl_core/ .[test,dev] ``` ## Test diff --git a/pixl_dcmd/pyproject.toml b/pixl_dcmd/pyproject.toml new file mode 100644 index 000000000..adffc2730 --- /dev/null +++ b/pixl_dcmd/pyproject.toml @@ -0,0 +1,42 @@ +[project] +name = "pixl_dcmd" +version = "0.0.2" +authors = [ + { name="PIXL authors" }, +] +description = "DICOM header anonymisation functions" +readme = "README.md" +requires-python = "~=3.9" +classifiers = [ + "Programming Language :: Python :: 3" +] +dependencies = [ + "arrow==1.2.3", + "pydicom==2.4.4", + "pydicom-data", + "logger==1.4", + "pyyaml==6.0", + "requests==2.31.0", + "python-decouple==3.6", + "types-requests~=2.28", +] + +[project.optional-dependencies] +test = [ + "pytest==7.4.2", +] +dev = [ + "mypy", + "pre-commit", + "ruff" +] + +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[tool.ruff] +extend = "./ruff.toml" + +[tool.ruff.extend-per-file-ignores] +"./tests/**" = ["D100"] \ No newline at end of file diff --git a/pixl_dcmd/src/requirements.txt b/pixl_dcmd/src/requirements.txt deleted file mode 100644 index d82ad4743..000000000 --- a/pixl_dcmd/src/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -arrow==1.2.3 -black==22.8.0 -pydicom==2.4.4 -pydicom-data -mypy==0.991 -pytest==7.1.3 -logger==1.4 -pyyaml==6.0 -requests==2.31.0 -python-decouple==3.6 -types-requests==2.28.* diff --git a/pixl_dcmd/src/setup.py b/pixl_dcmd/src/setup.py deleted file mode 100644 index f433fbcdd..000000000 --- a/pixl_dcmd/src/setup.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2022 University College London Hospitals NHS Foundation Trust -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -from __future__ import annotations - -from pathlib import Path - -from setuptools import find_packages, setup - -from pixl_dcmd._version import __version__ - -exec(Path("./pixl_dcmd/_version.py").open().read()) - -setup( - name="pixl_dcmd", - version=__version__, # type: ignore - description="DICOM de-identifier", - packages=find_packages( - exclude=[ - "*tests", - "*.tests.*", - ], - ), - python_requires=">=3.9.2", -)