From 3dafe01ba7c17b843a32d1e359d229cf6ce884e1 Mon Sep 17 00:00:00 2001 From: zeeland Date: Mon, 24 Jun 2024 00:32:54 +0800 Subject: [PATCH] build: Remove unnecessary configuration files and Docker setup --- .dockerignore | 38 ----------------------------- .editorconfig | 24 ------------------ .pre-commit-config.yaml | 28 --------------------- cookiecutter-config-file.yml | 13 ---------- docker/Dockerfile | 25 ------------------- docker/README.md | 47 ------------------------------------ setup.cfg | 4 --- 7 files changed, 179 deletions(-) delete mode 100644 .dockerignore delete mode 100644 .editorconfig delete mode 100644 .pre-commit-config.yaml delete mode 100644 cookiecutter-config-file.yml delete mode 100644 docker/Dockerfile delete mode 100644 docker/README.md delete mode 100644 setup.cfg diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 6be1e24..0000000 --- a/.dockerignore +++ /dev/null @@ -1,38 +0,0 @@ -# Git -.git -.gitignore -.github - -# Docker -.dockerignore - -# IDE -.idea -.vscode - -# Byte-compiled / optimized / DLL files -__pycache__/ -**/__pycache__/ -*.pyc -*.pyo -*.pyd -.Python -*.py[cod] -*$py.class -.pytest_cache/ -..mypy_cache/ - -# poetry -.venv - -# C extensions -*.so - -# Virtual environment -.venv -venv - -.DS_Store -.AppleDouble -.LSOverride -._* diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 7f578f1..0000000 --- a/.editorconfig +++ /dev/null @@ -1,24 +0,0 @@ -# Check http://editorconfig.org for more information -# This is the main config file for this project: -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 2 -trim_trailing_whitespace = true - -[*.{py, pyi}] -indent_style = space -indent_size = 4 - -[Makefile] -indent_style = tab - -[*.md] -trim_trailing_whitespace = false - -[*.{diff,patch}] -trim_trailing_whitespace = false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 6f74407..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,28 +0,0 @@ -default_language_version: - python: python3.8 - -default_stages: [commit, push] - -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.5.0 - hooks: - - id: check-yaml - - id: end-of-file-fixer - exclude: LICENSE - - - repo: local - hooks: - - id: check-codestyle - name: check-codestyle - entry: make check-codestyle - types: [python] - language: system - - - repo: local - hooks: - - id: test - name: test - entry: make test - types: [python] - language: system diff --git a/cookiecutter-config-file.yml b/cookiecutter-config-file.yml deleted file mode 100644 index 71390d3..0000000 --- a/cookiecutter-config-file.yml +++ /dev/null @@ -1,13 +0,0 @@ -# This file contains values from Cookiecutter - -default_context: - project_name: "gcop" - project_description: "gcop is your local git command copilot" - organization: "gcop" - license: "MIT" - minimal_python_version: 3.8 - github_name: "Undertone0809" - email: "zeeland4work@gmail.com" - version: "0.1.0" - line_length: "88" - create_example_template: "cli" diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 9e2bef4..0000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM python:3.8-slim-buster - -ENV LANG=C.UTF-8 \ - LC_ALL=C.UTF-8 \ - PATH="${PATH}:/root/.poetry/bin" - -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - curl \ - && rm -rf /var/lib/apt/lists/* - -COPY pyproject.toml ./ - -# Install Poetry -RUN pip install poetry \ - cd /usr/local/bin && \ - ln -s /opt/poetry/bin/poetry && \ - poetry config virtualenvs.create false - -# Allow installing dev dependencies to run tests -ARG INSTALL_DEV=false -RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --no-dev ; fi" - -CMD mkdir -p /workspace -WORKDIR /workspace diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index 7a12a1c..0000000 --- a/docker/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Docker for gcop - -## Installation - -To create Docker you need to run: - -```bash -make docker-build -``` - -which is equivalent to: - -```bash -make docker-build VERSION=latest -``` - -You may provide name and version for the image. -Default name is `IMAGE := gcop`. -Default version is `VERSION := latest`. - -```bash -make docker-build IMAGE=some_name VERSION=0.1.0 -``` - -## Usage - -```bash -docker run -it --rm \ - -v $(pwd):/workspace \ - gcop bash -``` - -## How to clean up - -To uninstall docker image run `make docker-remove` with `VERSION`: - -```bash -make docker-remove VERSION=0.1.0 -``` - -you may also choose the image name - -```bash -make docker-remove IMAGE=some_name VERSION=latest -``` - -If you want to clean all, including `build` and `pycache` run `make cleanup` diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 3c46a08..0000000 --- a/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[darglint] -# https://github.com/terrencepreilly/darglint -strictness = long -docstring_style = google