From dd33a210b9f668b8b16458c994bf626258087efe Mon Sep 17 00:00:00 2001 From: Renato Durrer Date: Fri, 31 May 2024 12:05:42 +0200 Subject: [PATCH] Add all dependencies to pyproject.toml. Remove conda environments. --- environment-dev.yml | 36 ------------------------------------ environment-prod.yml | 23 ----------------------- pyproject.toml | 35 +++++++++++++++++++++++++++-------- 3 files changed, 27 insertions(+), 67 deletions(-) delete mode 100644 environment-dev.yml delete mode 100644 environment-prod.yml diff --git a/environment-dev.yml b/environment-dev.yml deleted file mode 100644 index ac889cf6..00000000 --- a/environment-dev.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: boreholes-dev -channels: - - conda-forge -dependencies: -# prod dependencies; needs to be a strict copy of environment-prod.yml - - python==3.10 - - boto3 - - pandas - - levenshtein - - pathlib==1.0.1 - - python-dotenv==1.0.1 - - click==8.1.7 - - PyYAML==6.0.1 - - scikit-learn==1.4.0 - - langdetect==1.0.9 - - boto3==1.34.82 - - regex==2024.5.10 - - pip -# dev dependencies - - matplotlib==3.8.0 - - isort==5.13.2 - - jupyterlab==4.1.3 - - black==24.2.0 - - pre-commit==3.6.2 - - pytest==8.1.1 - - pytest-cov==5.0.0 - - pip: -# prod pip dependencies; needs to be a strict copy of environment-prod.yml - - amazon-textract-textractor - - backoff - - PyMuPDF==1.23.26 - - opencv-python-headless - - quads==1.1.0 - - -e . -# dev pip dependencies - - mlflow==2.11.1 \ No newline at end of file diff --git a/environment-prod.yml b/environment-prod.yml deleted file mode 100644 index eeaf899d..00000000 --- a/environment-prod.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: boreholes-prod -channels: - - conda-forge -dependencies: - - python==3.10 - - boto3 - - pandas - - levenshtein - - pathlib==1.0.1 - - python-dotenv==1.0.1 - - scikit-learn==1.4.0 - - click==8.1.7 - - PyYAML==6.0.1 - - langdetect==1.0.9 - - regex==2024.5.10 - - pip - - pip: - - amazon-textract-textractor - - backoff - - PyMuPDF==1.23.26 - - opencv-python-headless - - quads==1.1.0 - - -e . diff --git a/pyproject.toml b/pyproject.toml index 09d3719e..6bcf13ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,18 +12,37 @@ dependencies = [ "boto3", "pandas", "levenshtein", - "pathlib==1.0.1", - "python-dotenv==1.0.1", - "scikit-learn==1.4.0", - "click==8.1.7", - "PyYAML==6.0.1", - "langdetect==1.0.9", + "pathlib", + "python-dotenv", + "scikit-learn>=1.4.0", + "click>=8.0.0", + "PyYAML>=6.0.1", + "langdetect>=1.0.9", + "regex", + "amazon-textract-textractor", "backoff", - "PyMuPDF==1.23.26", + "PyMuPDF>=1.23.26", "opencv-python-headless", - "quads==1.1.0", + "quads>=1.1.0", ] +[project.optional-dependencies] +test = [ + "pytest==8.1.1", + "pytest-cov==5.0.0" +] +lint = [ + "pre-commit==3.6.2", +] +experiment_tracking = [ + "mlflow==2.11.1" +] +visualize = [ + "matplotlib==3.8.0" +] + +all = ["swisstopo-boreholes[test, lint, experiment_tracking, visualize]"] + [project.scripts] boreholes-extract-layers = "stratigraphy.main:click_pipeline" boreholes-download-profiles = "stratigraphy.get_files:download_directory_froms3"