diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index a0bcf27..72c8ddb 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -26,7 +26,7 @@ jobs: python3 -m pip install --upgrade setuptools python3 -m pip install -r requirements.txt - name: Lint with Ruff - run: ruff --output-format=github . + run: ruff check --output-format=github . continue-on-error: true - name: Run tests run: | diff --git a/Dockerfile b/Dockerfile index 8611701..9f9d736 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ WORKDIR /app COPY requirements.txt /app RUN python3 -m venv . RUN python3 -m pip install pip==24.0 -RUN python3 -m pip install setuptools==69.1.0 +RUN python3 -m pip install setuptools==69.1.1 RUN python3 -m pip install --no-cache-dir -r requirements.txt COPY ./app /app EXPOSE 5000 diff --git a/README.md b/README.md index 2ce1f2a..8369001 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ The code has been tested using: * [TensorFlow] (2.15): an open source software [Deep Learning] library for high performance numerical computation using data flow graphs. * [Matplotlib] (3.8): a plotting library for [Python] and its numerical mathematics extension [NumPy]. * [NumPy] (1.26): a library for [Python], adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. +* [Ruff] (0.3): An extremely fast Python linter and code formatter, written in Rust. * [scikit-image] (0.22): a collection of algorithms for image processing with [Python]. ### PYTHON VIRTUAL ENVIRONMENT @@ -44,7 +45,7 @@ Command to configure virtual environment with [venv]: ~/deeplearning_flask$ python3 -m venv dlflask3 ~/deeplearning_flask$ source dlflask3/bin/activate (dlflask3)~/deeplearning_flask$ python3 -m pip install pip==24.0 -(dlflask3)~/deeplearning_flask$ python3 -m pip install setuptools==69.1.0 +(dlflask3)~/deeplearning_flask$ python3 -m pip install setuptools==69.1.1 (dlflask3)~/deeplearning_flask$ python3 -m pip install -r requirements_dev.txt ``` @@ -59,6 +60,7 @@ deeplearning_flask ├── .github │   └── workflows │   └── ci_tests.yml +├── .gitignore ├── app │   ├── app │   │   ├── __init__.py @@ -82,6 +84,7 @@ deeplearning_flask ├── nginx │   └── conf.d │   └── local.conf +├── pyproject.toml ├── README.md ├── requirements.txt └── requirements_dev.txt @@ -243,3 +246,4 @@ copyright: 2018-2024 [curl]: https://curl.haxx.se/ [pytest]: https://docs.pytest.org/en/latest/ [Makefile]: https://en.wikipedia.org/wiki/Makefile +[Ruff]: https://docs.astral.sh/ruff/ diff --git a/.ruff.toml b/pyproject.toml similarity index 85% rename from .ruff.toml rename to pyproject.toml index afc4ae5..fa32cdb 100644 --- a/.ruff.toml +++ b/pyproject.toml @@ -1,6 +1,11 @@ +[tool.ruff] +extend-include = ["*.ipynb"] + line-length = 100 target-version = "py310" -lint.select = [ + +[tool.ruff.lint] +select = [ # pycodestyle "E", "W", @@ -15,4 +20,3 @@ lint.select = [ # isort "I", ] -extend-include = ["*.ipynb"] diff --git a/requirements.txt b/requirements.txt index f1b88dc..98cdd02 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,8 @@ Flask==3.0.2 gunicorn==21.2.0 numpy==1.26.4 Pillow==10.2.0 -pytest==8.0.1 +pytest==8.0.2 requests==2.31.0 -ruff==0.2.2 +ruff==0.3.0 scikit-image==0.22.0 tensorflow==2.15.0 diff --git a/requirements_dev.txt b/requirements_dev.txt index 78bc71e..d3b2f03 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,3 +1,3 @@ -r requirements.txt -jupyterlab==4.1.1 +jupyterlab==4.1.2 matplotlib==3.8.3