From b460e01c9ee3bd70804e5ffa1a7a95a87a20cb21 Mon Sep 17 00:00:00 2001
From: Dorian Turba <froggit.commit.z3jqj@simplelogin.com>
Date: Sat, 6 Apr 2024 17:44:04 +0200
Subject: [PATCH] remove ruff

---
 .gitlab-ci.yml                                |  7 ---
 r2_metadata/ruff.r2.yml                       | 14 ------
 templates/python/code_quality/ruff/README.md  | 44 -------------------
 templates/python/code_quality/ruff/ruff.yml   | 12 -----
 tests/ruff_project/pyproject.toml             | 11 -----
 .../ruff_project/src/ruff_project/__init__.py |  3 --
 tests/ruff_project/src/ruff_project/main.py   | 11 -----
 7 files changed, 102 deletions(-)
 delete mode 100644 r2_metadata/ruff.r2.yml
 delete mode 100644 templates/python/code_quality/ruff/README.md
 delete mode 100644 templates/python/code_quality/ruff/ruff.yml
 delete mode 100644 tests/ruff_project/pyproject.toml
 delete mode 100644 tests/ruff_project/src/ruff_project/__init__.py
 delete mode 100644 tests/ruff_project/src/ruff_project/main.py

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 53a2f5a..0e64209 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,7 +9,6 @@ include:
     -   local: 'templates/python/code_quality/isort/isort.yml'
     -   local: 'templates/python/code_quality/mypy/mypy.yml'
     -   local: 'templates/python/code_quality/pre-commit/pre-commit.yml'
-    -   local: 'templates/python/code_quality/ruff/ruff.yml'
     -   local: 'templates/python/dependency_management/requirements-compile/requirements-compile.yml'
 
 python_install:
@@ -54,12 +53,6 @@ mypy:
     variables:
         PROJECT_PATH: "tests/mypy_project"
 
-ruff:
-    stage: templates
-    needs: [ "python_install" ]
-    variables:
-        PROJECT_PATH: "tests/ruff_project"
-
 requirements-compile:
     stage: templates
     needs: [ "python_install" ]
diff --git a/r2_metadata/ruff.r2.yml b/r2_metadata/ruff.r2.yml
deleted file mode 100644
index 4c46859..0000000
--- a/r2_metadata/ruff.r2.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-files:
-    template: ../templates/python/code_quality/ruff/ruff.yml
-    documentation: ../templates/python/code_quality/ruff/README.md
-data:
-    description: "Run ruff on your repository"
-    icon: âš¡
-    public: true
-    labels:
-        - Lint
-        - Utilities
-        - Code Quality
-        - Python
-    license: MIT
-    deprecated: false
diff --git a/templates/python/code_quality/ruff/README.md b/templates/python/code_quality/ruff/README.md
deleted file mode 100644
index 43fe292..0000000
--- a/templates/python/code_quality/ruff/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# ruff template
-
-## Objective
-
-Run [Ruff](https://github.com/astral-sh/ruff), an extremely fast Python linter, on your Python
-code. This tool is written in Rust, and it is designed to quickly analyze your Python code to detect
-various syntax and stylistic errors.
-
-## How to use it
-
-1. Configure the `pyproject.toml` file in your repository's root directory with your desired rules.
-2. Include the Ruff template in your GitLab CI/CD configuration.
-3. If you need to customize the job, refer to
-   the [jobs customization](https://docs.r2devops.io/get-started/use-templates/#job-templates-customization)
-   documentation.
-
-## Variables
-
-| Name                | Description                                                                                                                                                   | Default                              |
-|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------|
-| `PROJECT_PATH`      | The path to the project root directory.                                                                                                                       | `"."`                                |
-| `IMAGE_TAG`         | The default tag for the docker image. See [Python Docker Official Image](https://hub.docker.com/_/python) for supported tags and respective Dockerfile links. | `"latest"`                           |
-| `PYTHON_SETUP`      | Bash commands to setup your python environment.                                                                                                               | `"pip install ruff"`                 |
-
-### Global Configuration of Ruff
-
-To add configuration to `ruff` that is shared with any other usage of Ruff (such as manual run,
-pre-commit, etc), you can use a `pyproject.toml`, `ruff.toml`, or `.ruff.toml` configuration file in
-your project's root directory. Learn more
-about [ruff configuration](https://beta.ruff.rs/docs/configuration/) files.
-
-## Add an official [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) badge to your project README.md
-
-To display the use of Ruff in your project, you can add the following badge to your README.md:
-
-```markdown
-[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
-```
-
-A more "classic" version of the badge ([![Code style: Ruff](https://img.shields.io/badge/Linter-Ruff-blue)](https://github.com/astral-sh/ruff)) is also available:
-
-```markdown
-[![Ruff](https://img.shields.io/badge/Linter-Ruff-blue)](https://github.com/astral-sh/ruff)
-```
diff --git a/templates/python/code_quality/ruff/ruff.yml b/templates/python/code_quality/ruff/ruff.yml
deleted file mode 100644
index 4b43fed..0000000
--- a/templates/python/code_quality/ruff/ruff.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-include:
-  - remote: 'https://gitlab.com/dorianturba-templates/r2devops_catalog/-/raw/main/templates/python/partial/python_install/python_install.yml'
-
-ruff:
-    extends:
-        - .python_install
-    stage: code_quality
-    variables:
-        PYTHON_SETUP: "pip install ruff"
-    script:
-        - !reference [.python_install, script]
-        - ruff check ${PROJECT_PATH}
diff --git a/tests/ruff_project/pyproject.toml b/tests/ruff_project/pyproject.toml
deleted file mode 100644
index 3d671d9..0000000
--- a/tests/ruff_project/pyproject.toml
+++ /dev/null
@@ -1,11 +0,0 @@
-[build-system]
-build-backend = "hatchling.build"
-requires = ["hatchling"]
-
-[project]
-name = "ruff_project"
-version = "0.1.0"
-authors = [
-    {email = "author.name@example.com", name = "Author Name"},
-]
-description = "A description of what the package is for."
diff --git a/tests/ruff_project/src/ruff_project/__init__.py b/tests/ruff_project/src/ruff_project/__init__.py
deleted file mode 100644
index 5feb7c8..0000000
--- a/tests/ruff_project/src/ruff_project/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from ruff_project.main import main
-
-__all__ = ["main"]
diff --git a/tests/ruff_project/src/ruff_project/main.py b/tests/ruff_project/src/ruff_project/main.py
deleted file mode 100644
index 250de77..0000000
--- a/tests/ruff_project/src/ruff_project/main.py
+++ /dev/null
@@ -1,11 +0,0 @@
-"""Sample main module."""
-
-
-def main() -> bool:
-    """Sample main function."""
-    print("Hello, world!")
-    return True
-
-
-if __name__ == "__main__":
-    main()
-- 
GitLab