From 7f167c00be2388a65cfb0455fc05fd04042f5907 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 15 Aug 2023 02:28:47 +0000 Subject: [PATCH 1/6] Minor README. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d6c1d83..52863ed6 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,10 @@ Project setup often involves more than just creating a basic project structure. If you find this helpful, please consider [sponsorship](https://github.com/sponsors/huxuan). -## 🛠 Features +## :hammer_and_wrench: Features - **Template Rendering** - - Harness [`copier`](https://copier.readthedocs.io/) to initiate projects and enable template updates. + - Utilize [`copier`](https://copier.readthedocs.io/) to initiate projects and enable template updates. - **Environment Management** - Utilize [`pipenv`](https://pipenv.pypa.io/) for virtual environment management. - Use containers and system-level `pip` for CI/CD. From b5a18d4649f1eab5cba9ce8b602bb975b58d1fb4 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 15 Aug 2023 03:38:26 +0000 Subject: [PATCH 2/6] README. --- README.md | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 52863ed6..a100c980 100644 --- a/README.md +++ b/README.md @@ -18,39 +18,37 @@ A development-focused Python project template with various integrations, configu [![Serious Scaffold Python](docs/_static/images/logo.svg)](https://github.com/serious-scaffold/serious-scaffold-python) -Project setup often involves more than just creating a basic project structure. It includes tasks like setting up GitHub Actions or GitLab CI/CD, configuring linters, tests and documentation, and implementing settings and logging modules. If you are tired of this repetitive process, [Serious Scaffold Python](https://github.com/serious-scaffold/serious-scaffold-python) is here to help. Utilizing the power of [`copier`](https://copier.readthedocs.io/), you can generate a new Python project with just one command. Simply answer a few questions, and your project will be fully set up. Additionally, your project can be updated alongside the advancement of the template. +Setting up a project often involves more than just establishing a basic project structure. It involves tasks like integrating GitHub Actions or GitLab CI/CD, configuring linters, tests and documentation, as well as implementing settings, logging and other frequently used modules. [Serious Scaffold Python](https://github.com/serious-scaffold/serious-scaffold-python) streamlines this process. Powered by [`copier`](https://copier.readthedocs.io/), bootstrapping a new Python project can be done with a single command. By answering a few questions, the project will be fully configured and ready for development. Furthermore, the project can be updated alongside the advancement of the template. If you find this helpful, please consider [sponsorship](https://github.com/sponsors/huxuan). ## :hammer_and_wrench: Features - **Template Rendering** - - Utilize [`copier`](https://copier.readthedocs.io/) to initiate projects and enable template updates. + - Leverage [`copier`](https://copier.readthedocs.io/) for project initiation and template updates. - **Environment Management** - - Utilize [`pipenv`](https://pipenv.pypa.io/) for virtual environment management. - - Use containers and system-level `pip` for CI/CD. + - Leverage [`pipenv`](https://pipenv.pypa.io/) for [virtual environment](https://docs.python.org/3/glossary.html#term-virtual-environment) management in development and containers for CI/CD. - **Dependency Management** - - Manage dependencies categorically with [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files) for different environments. -- **Code Quality Checks** - - Incorporate linters including [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). - - Integrate [`pre-commit`](https://github.com/pre-commit/pre-commit) for Git hooks automation. + - Categorize dependencies with [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files) for different environments. +- **Code Quality** + - Incorporate linters such as [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). + - Integrate [`pre-commit`](https://pre-commit.com/) with [built-in hooks](https://github.com/pre-commit/pre-commit-hooks) and [local](https://pre-commit.com/#repository-local-hooks) linters for Git hooks automation. - **Tests** - - Execute tests with [`pytest`](https://pytest.org/), supplemented by [`coverage`](https://coverage.readthedocs.io) reports and thresholds. + - Leverage [`pytest`](https://pytest.org/) for tests, supplemented by [`coverage`](https://coverage.readthedocs.io) reports and thresholds. - **Documentation** - - Use [`sphinx`](https://www.sphinx-doc.org/) with the [`furo`](https://pradyunsg.me/furo) theme. - - Include [MyPy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation) and [Coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. + - Adopt [`sphinx`](https://www.sphinx-doc.org/) with the [`furo`](https://pradyunsg.me/furo) theme, incorporating [MyPy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation) and [Coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. - **Continuous Integration** - - Offer a unified `Makefile` for common actions. - - Provide configurations for [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/). - - Support [Read the Docs](https://readthedocs.org/) integration. + - Include pre-configured [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/) for lint, tests, documentation generation, and package deployment. + - Offer a unified `Makefile` as the entry point for common actions. + - Support integration with [Read the Docs](https://readthedocs.org/). - **Common Modules** - - Use [`typer`](https://typer.tiangolo.com/) for CLI tasks, including tests, documentation, and configuration. - - Adopt [`setuptools-scm`](https://github.com/pypa/setuptools_scm/) for versioning via git metadata. - - Implement [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/) for robust settings management. + - Utilize [`typer`](https://typer.tiangolo.com/) for Command Line Interface development. + - Utilize [`setuptools-scm`](https://github.com/pypa/setuptools_scm/) for versioning using git metadata. + - Utilize [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/) for settings management. - **Miscellaneous** - - Offer VSCode [settings](.vscode/settings.json) and recommended [extensions](.vscode/extensions.json). + - Provide VSCode [settings](.vscode/settings.json) with recommended [extensions](.vscode/extensions.json). -## 🔧 Prerequisites +## :wrench: Prerequisites Certain system-level Python applications are needed and it is recommended to use [`pipx`](https://pypa.github.io/pipx/) to install and run them in isolated environments. Refer to pipx's installation instructions [here](https://pypa.github.io/pipx/installation/). Once `pipx` is set up, install the necessary tools using the following commands. @@ -65,22 +63,22 @@ pipx install pipenv pipx install pre-commit ``` -## 🚀 Quickstart +## :rocket: Quickstart -1. Generate the project by answering several questions. +1. Generate the project. ```bash copier copy gh:serious-scaffold/serious-scaffold-python /path/to/project ``` -1. Initialize an empty git repository. +1. Navigate to the project directory and initialize a git repository. ```bash cd /path/to/project git init ``` -1. Prepare development environment. +1. Set up the development environment. ```bash make dev @@ -90,11 +88,11 @@ pipx install pre-commit ```bash git add . - git commit -m "Init from serious-scaffold-python." + git commit -m "Initialize from serious-scaffold-python." ``` -1. Initialization Done! Focus on the logical code within `src` folder now. +1. That's it! Focus on the coding mostly within `src` folder now. -## 📜 License +## :scroll: License MIT, for more details, see the [LICENSE](LICENSE) file. From 302b818d932ce0d347601dccfb5b3f7dc1f20461 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 15 Aug 2023 06:45:19 +0000 Subject: [PATCH 3/6] Minor. --- .vscode/extensions.json | 4 ++- .vscode/settings.json | 6 ++-- Makefile | 2 +- Makefile.jinja | 2 +- README.md | 19 +++++++----- README.md.jinja | 57 ++++++++++++++++++------------------ tests/settings_test.py | 5 +++- tests/settings_test.py.jinja | 5 +++- 8 files changed, 56 insertions(+), 44 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index b4aad4fc..3eeefedd 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,11 +1,13 @@ { "recommendations": [ + "DavidAnson.vscode-markdownlint", "PascalReitermann93.vscode-yaml-sort", "charliermarsh.ruff", - "esbenp.prettier-vscode", "ms-python.black-formatter", + "ms-python.mypy-type-checker", "ms-python.python", "richie5um2.vscode-sort-json", + "shd101wyy.markdown-preview-enhanced", "streetsidesoftware.code-spell-checker", "trond-snekvik.simple-rst" ] diff --git a/.vscode/settings.json b/.vscode/settings.json index 8a7d5649..f1ceaacf 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,7 +3,7 @@ "editor.defaultFormatter": "vscode.json-language-features" }, "[markdown]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "DavidAnson.vscode-markdownlint" }, "[python]": { "editor.codeActionsOnSave": { @@ -24,6 +24,7 @@ "huxuan", "interruptible", "isort", + "JPKXI", "mypy", "pathjoin", "pipenv", @@ -57,8 +58,7 @@ "files.insertFinalNewline": true, "files.trimFinalNewlines": true, "files.trimTrailingWhitespace": true, - "python.formatting.provider": "black", - "python.linting.mypyEnabled": true, + "markdown-preview-enhanced.breakOnSingleNewLine": false, "sortJSON.contextMenu": { "sortJSONAlphaNum": false, "sortJSONAlphaNumReverse": false, diff --git a/Makefile b/Makefile index 37083553..3b88b8a7 100644 --- a/Makefile +++ b/Makefile @@ -93,7 +93,7 @@ tests: ${PIPRUN} python -m coverage report ######################################################################################## -# Packages +# Package ######################################################################################## # Show currently installed dependecies excluding the package itself with versions diff --git a/Makefile.jinja b/Makefile.jinja index 21a9ecb7..a771e9f0 100644 --- a/Makefile.jinja +++ b/Makefile.jinja @@ -95,7 +95,7 @@ tests: ${PIPRUN} python -m coverage report ######################################################################################## -# Packages +# Package ######################################################################################## # Show currently installed dependecies excluding the package itself with versions diff --git a/README.md b/README.md index a100c980..43679d3c 100644 --- a/README.md +++ b/README.md @@ -27,25 +27,28 @@ If you find this helpful, please consider [sponsorship](https://github.com/spons - **Template Rendering** - Leverage [`copier`](https://copier.readthedocs.io/) for project initiation and template updates. - **Environment Management** - - Leverage [`pipenv`](https://pipenv.pypa.io/) for [virtual environment](https://docs.python.org/3/glossary.html#term-virtual-environment) management in development and containers for CI/CD. + - Manage [virtual environment](https://docs.python.org/3/glossary.html#term-virtual-environment) with [`pipenv`](https://pipenv.pypa.io/) for daily development. + - Run CI/CD in containers with different Python versions to ensure compatibility. - **Dependency Management** - - Categorize dependencies with [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files) for different environments. + - Categorize dependencies by purpose, allowing for selective installation. + - Use [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files) to pin dependencies on different environments to ensure reproducibility. - **Code Quality** - Incorporate linters such as [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). - Integrate [`pre-commit`](https://pre-commit.com/) with [built-in hooks](https://github.com/pre-commit/pre-commit-hooks) and [local](https://pre-commit.com/#repository-local-hooks) linters for Git hooks automation. - **Tests** - Leverage [`pytest`](https://pytest.org/) for tests, supplemented by [`coverage`](https://coverage.readthedocs.io) reports and thresholds. +- **Package** + - Utilize [`setuptools-scm`](https://github.com/pypa/setuptools_scm/) for versioning using git metadata. - **Documentation** - - Adopt [`sphinx`](https://www.sphinx-doc.org/) with the [`furo`](https://pradyunsg.me/furo) theme, incorporating [MyPy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation) and [Coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. -- **Continuous Integration** - - Include pre-configured [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/) for lint, tests, documentation generation, and package deployment. - - Offer a unified `Makefile` as the entry point for common actions. + - Leverage [`sphinx`](https://www.sphinx-doc.org/) with the [`furo`](https://pradyunsg.me/furo) theme, incorporating [MyPy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation) and [Coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. - Support integration with [Read the Docs](https://readthedocs.org/). +- **Continuous Integration** + - Provide pre-configured [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/) for features above. - **Common Modules** - Utilize [`typer`](https://typer.tiangolo.com/) for Command Line Interface development. - - Utilize [`setuptools-scm`](https://github.com/pypa/setuptools_scm/) for versioning using git metadata. - Utilize [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/) for settings management. - **Miscellaneous** + - Offer a unified `Makefile` as the entry point for common actions. - Provide VSCode [settings](.vscode/settings.json) with recommended [extensions](.vscode/extensions.json). ## :wrench: Prerequisites @@ -95,4 +98,4 @@ pipx install pre-commit ## :scroll: License -MIT, for more details, see the [LICENSE](LICENSE) file. +MIT, for more details, check out the [LICENSE](LICENSE) file. diff --git a/README.md.jinja b/README.md.jinja index 9d5140a3..b8ce715f 100644 --- a/README.md.jinja +++ b/README.md.jinja @@ -18,39 +18,40 @@ [![{{ project_name }}](docs/_static/images/logo.svg)](https://github.com/{{ repo_namespace }}/{{ repo_name }}) -Project setup often involves more than just creating a basic project structure. It includes tasks like setting up GitHub Actions or GitLab CI/CD, configuring linters, tests and documentation, and implementing settings and logging modules. If you are tired of this repetitive process, [Serious Scaffold Python](https://github.com/serious-scaffold/serious-scaffold-python) is here to help. Utilizing the power of [`copier`](https://copier.readthedocs.io/), you can generate a new Python project with just one command. Simply answer a few questions, and your project will be fully set up. Additionally, your project can be updated alongside the advancement of the template. +Setting up a project often involves more than just establishing a basic project structure. It involves tasks like integrating GitHub Actions or GitLab CI/CD, configuring linters, tests and documentation, as well as implementing settings, logging and other frequently used modules. [Serious Scaffold Python](https://github.com/serious-scaffold/serious-scaffold-python) streamlines this process. Powered by [`copier`](https://copier.readthedocs.io/), bootstrapping a new Python project can be done with a single command. By answering a few questions, the project will be fully configured and ready for development. Furthermore, the project can be updated alongside the advancement of the template. If you find this helpful, please consider [sponsorship](https://github.com/sponsors/{{ author_name }}). -## 🛠 Features +## :hammer_and_wrench: Features - **Template Rendering** - - Harness [`copier`](https://copier.readthedocs.io/) to initiate projects and enable template updates. + - Leverage [`copier`](https://copier.readthedocs.io/) for project initiation and template updates. - **Environment Management** - - Utilize [`pipenv`](https://pipenv.pypa.io/) for virtual environment management. - - Use containers and system-level `pip` for CI/CD. + - Manage [virtual environment](https://docs.python.org/3/glossary.html#term-virtual-environment) with [`pipenv`](https://pipenv.pypa.io/) for daily development. + - Run CI/CD in containers with different Python versions to ensure compatibility. - **Dependency Management** - - Manage dependencies categorically with [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files) for different environments. -- **Code Quality Checks** - - Incorporate linters including [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). - - Integrate [`pre-commit`](https://github.com/pre-commit/pre-commit) for Git hooks automation. + - Categorize dependencies by purpose, allowing for selective installation. + - Use [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files) to pin dependencies on different environments to ensure reproducibility. +- **Code Quality** + - Incorporate linters such as [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). + - Integrate [`pre-commit`](https://pre-commit.com/) with [built-in hooks](https://github.com/pre-commit/pre-commit-hooks) and [local](https://pre-commit.com/#repository-local-hooks) linters for Git hooks automation. - **Tests** - - Execute tests with [`pytest`](https://pytest.org/), supplemented by [`coverage`](https://coverage.readthedocs.io) reports and thresholds. + - Leverage [`pytest`](https://pytest.org/) for tests, supplemented by [`coverage`](https://coverage.readthedocs.io) reports and thresholds. +- **Package** + - Utilize [`setuptools-scm`](https://github.com/pypa/setuptools_scm/) for versioning using git metadata. - **Documentation** - - Use [`sphinx`](https://www.sphinx-doc.org/) with the [`furo`](https://pradyunsg.me/furo) theme. - - Include [MyPy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation) and [Coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. + - Leverage [`sphinx`](https://www.sphinx-doc.org/) with the [`furo`](https://pradyunsg.me/furo) theme, incorporating [MyPy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation) and [Coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. + - Support integration with [Read the Docs](https://readthedocs.org/). - **Continuous Integration** - - Offer a unified `Makefile` for common actions. - - Provide configurations for [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/). - - Support [Read the Docs](https://readthedocs.org/) integration. + - Provide pre-configured [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/) for features above. - **Common Modules** - - Use [`typer`](https://typer.tiangolo.com/) for CLI tasks, including tests, documentation, and configuration. - - Adopt [`setuptools-scm`](https://github.com/pypa/setuptools_scm/) for versioning via git metadata. - - Implement [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/) for robust settings management. + - Utilize [`typer`](https://typer.tiangolo.com/) for Command Line Interface development. + - Utilize [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/) for settings management. - **Miscellaneous** - - Offer VSCode [settings](.vscode/settings.json) and recommended [extensions](.vscode/extensions.json). + - Offer a unified `Makefile` as the entry point for common actions. + - Provide VSCode [settings](.vscode/settings.json) with recommended [extensions](.vscode/extensions.json). -## 🔧 Prerequisites +## :wrench: Prerequisites Certain system-level Python applications are needed and it is recommended to use [`pipx`](https://pypa.github.io/pipx/) to install and run them in isolated environments. Refer to pipx's installation instructions [here](https://pypa.github.io/pipx/installation/). Once `pipx` is set up, install the necessary tools using the following commands. @@ -65,22 +66,22 @@ pipx install pipenv pipx install pre-commit ``` -## 🚀 Quickstart +## :rocket: Quickstart -1. Generate the project by answering several questions. +1. Generate the project. ```bash copier copy gh:serious-scaffold/serious-scaffold-python /path/to/project ``` -1. Initialize an empty git repository. +1. Navigate to the project directory and initialize a git repository. ```bash cd /path/to/project git init ``` -1. Prepare development environment. +1. Set up the development environment. ```bash make dev @@ -90,11 +91,11 @@ pipx install pre-commit ```bash git add . - git commit -m "Init from serious-scaffold-python." + git commit -m "Initialize from serious-scaffold-python." ``` -1. Initialization Done! Focus on the logical code within `src` folder now. +1. That's it! Focus on the coding mostly within `src` folder now. -## 📜 License +## :scroll: License -MIT, for more details, see the [LICENSE](LICENSE) file. +MIT, for more details, check out the [LICENSE](LICENSE) file. diff --git a/tests/settings_test.py b/tests/settings_test.py index 3c7dee5c..771b1881 100644 --- a/tests/settings_test.py +++ b/tests/settings_test.py @@ -6,5 +6,8 @@ def test_settings() -> None: """Tests for settings.""" - assert settings.logging_level == os.getenv("SERIOUS_SCAFFOLD_LOGGING_LEVEL", "INFO") + assert settings.logging_level == os.getenv( + "SERIOUS_SCAFFOLD_LOGGING_LEVEL", + "INFO", + ) assert str(global_settings.ci).lower() == os.getenv("CI", "False").lower() diff --git a/tests/settings_test.py.jinja b/tests/settings_test.py.jinja index 464eb721..4ba8a225 100644 --- a/tests/settings_test.py.jinja +++ b/tests/settings_test.py.jinja @@ -6,5 +6,8 @@ from {{ module_name }}.settings import global_settings, settings def test_settings() -> None: """Tests for settings.""" - assert settings.logging_level == os.getenv("{{ module_name|upper }}_LOGGING_LEVEL", "INFO") + assert settings.logging_level == os.getenv( + "{{ module_name|upper }}_LOGGING_LEVEL", + "INFO", + ) assert str(global_settings.ci).lower() == os.getenv("CI", "False").lower() From 3becd5e109257b507d6f0b60f498e70a9603349d Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 15 Aug 2023 09:00:48 +0000 Subject: [PATCH 4/6] Refine readme. --- README.md | 40 ++++++++++++++-------------------------- README.md.jinja | 40 ++++++++++++++-------------------------- 2 files changed, 28 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 43679d3c..f518098c 100644 --- a/README.md +++ b/README.md @@ -24,32 +24,20 @@ If you find this helpful, please consider [sponsorship](https://github.com/spons ## :hammer_and_wrench: Features -- **Template Rendering** - - Leverage [`copier`](https://copier.readthedocs.io/) for project initiation and template updates. -- **Environment Management** - - Manage [virtual environment](https://docs.python.org/3/glossary.html#term-virtual-environment) with [`pipenv`](https://pipenv.pypa.io/) for daily development. - - Run CI/CD in containers with different Python versions to ensure compatibility. -- **Dependency Management** - - Categorize dependencies by purpose, allowing for selective installation. - - Use [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files) to pin dependencies on different environments to ensure reproducibility. -- **Code Quality** - - Incorporate linters such as [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). - - Integrate [`pre-commit`](https://pre-commit.com/) with [built-in hooks](https://github.com/pre-commit/pre-commit-hooks) and [local](https://pre-commit.com/#repository-local-hooks) linters for Git hooks automation. -- **Tests** - - Leverage [`pytest`](https://pytest.org/) for tests, supplemented by [`coverage`](https://coverage.readthedocs.io) reports and thresholds. -- **Package** - - Utilize [`setuptools-scm`](https://github.com/pypa/setuptools_scm/) for versioning using git metadata. -- **Documentation** - - Leverage [`sphinx`](https://www.sphinx-doc.org/) with the [`furo`](https://pradyunsg.me/furo) theme, incorporating [MyPy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation) and [Coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. - - Support integration with [Read the Docs](https://readthedocs.org/). -- **Continuous Integration** - - Provide pre-configured [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/) for features above. -- **Common Modules** - - Utilize [`typer`](https://typer.tiangolo.com/) for Command Line Interface development. - - Utilize [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/) for settings management. -- **Miscellaneous** - - Offer a unified `Makefile` as the entry point for common actions. - - Provide VSCode [settings](.vscode/settings.json) with recommended [extensions](.vscode/extensions.json). +- Project setup and template update with [`copier`](https://copier.readthedocs.io/). +- [Virtual environment](https://docs.python.org/3/glossary.html#term-virtual-environment) management with [`pipenv`](https://pipenv.pypa.io/). +- Dependency management with categorized dependencies and [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files). +- Automate Git hooks with [pre-commit hooks](https://github.com/pre-commit/pre-commit-hooks) and [local](https://pre-commit.com/#repository-local-hooks) linters. +- Lint with [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). +- Tests with [`pytest`](https://pytest.org/) and [`coverage`](https://coverage.readthedocs.io) for threshold and reports. +- Document with [`sphinx`](https://www.sphinx-doc.org/), the [`furo`](https://pradyunsg.me/furo) theme, and [mypy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation) and [coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. +- Version Package using git metadata with [`setuptools-scm`](https://github.com/pypa/setuptools_scm/). +- Continuous Integration with [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/). +- [Versioned documentation](https://docs.readthedocs.io/en/stable/versions.html) with [Read the Docs](https://readthedocs.org/) integration. +- Command Line Interface development with [`typer`](https://typer.tiangolo.com/). +- Configuration management with [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/). +- Centralize common actions with a unified [`Makefile`](Makefile). +- VSCode [settings](.vscode/settings.json) with recommended [extensions](.vscode/extensions.json). ## :wrench: Prerequisites diff --git a/README.md.jinja b/README.md.jinja index b8ce715f..e92bb2d6 100644 --- a/README.md.jinja +++ b/README.md.jinja @@ -24,32 +24,20 @@ If you find this helpful, please consider [sponsorship](https://github.com/spons ## :hammer_and_wrench: Features -- **Template Rendering** - - Leverage [`copier`](https://copier.readthedocs.io/) for project initiation and template updates. -- **Environment Management** - - Manage [virtual environment](https://docs.python.org/3/glossary.html#term-virtual-environment) with [`pipenv`](https://pipenv.pypa.io/) for daily development. - - Run CI/CD in containers with different Python versions to ensure compatibility. -- **Dependency Management** - - Categorize dependencies by purpose, allowing for selective installation. - - Use [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files) to pin dependencies on different environments to ensure reproducibility. -- **Code Quality** - - Incorporate linters such as [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). - - Integrate [`pre-commit`](https://pre-commit.com/) with [built-in hooks](https://github.com/pre-commit/pre-commit-hooks) and [local](https://pre-commit.com/#repository-local-hooks) linters for Git hooks automation. -- **Tests** - - Leverage [`pytest`](https://pytest.org/) for tests, supplemented by [`coverage`](https://coverage.readthedocs.io) reports and thresholds. -- **Package** - - Utilize [`setuptools-scm`](https://github.com/pypa/setuptools_scm/) for versioning using git metadata. -- **Documentation** - - Leverage [`sphinx`](https://www.sphinx-doc.org/) with the [`furo`](https://pradyunsg.me/furo) theme, incorporating [MyPy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation) and [Coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. - - Support integration with [Read the Docs](https://readthedocs.org/). -- **Continuous Integration** - - Provide pre-configured [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/) for features above. -- **Common Modules** - - Utilize [`typer`](https://typer.tiangolo.com/) for Command Line Interface development. - - Utilize [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/) for settings management. -- **Miscellaneous** - - Offer a unified `Makefile` as the entry point for common actions. - - Provide VSCode [settings](.vscode/settings.json) with recommended [extensions](.vscode/extensions.json). +- Project setup and template update with [`copier`](https://copier.readthedocs.io/). +- [Virtual environment](https://docs.python.org/3/glossary.html#term-virtual-environment) management with [`pipenv`](https://pipenv.pypa.io/). +- Dependency management with categorized dependencies and [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files). +- Automate Git hooks with [pre-commit hooks](https://github.com/pre-commit/pre-commit-hooks) and [local](https://pre-commit.com/#repository-local-hooks) linters. +- Lint with [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). +- Tests with [`pytest`](https://pytest.org/) and [`coverage`](https://coverage.readthedocs.io) for threshold and reports. +- Document with [`sphinx`](https://www.sphinx-doc.org/), the [`furo`](https://pradyunsg.me/furo) theme, and [mypy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation) and [coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. +- Version Package using git metadata with [`setuptools-scm`](https://github.com/pypa/setuptools_scm/). +- Continuous Integration with [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/). +- [Versioned documentation](https://docs.readthedocs.io/en/stable/versions.html) with [Read the Docs](https://readthedocs.org/) integration. +- Command Line Interface development with [`typer`](https://typer.tiangolo.com/). +- Configuration management with [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/). +- Centralize common actions with a unified [`Makefile`](Makefile). +- VSCode [settings](.vscode/settings.json) with recommended [extensions](.vscode/extensions.json). ## :wrench: Prerequisites From 262a89cd17a82ee807cb8c142f24ffbcf555a761 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 15 Aug 2023 09:03:13 +0000 Subject: [PATCH 5/6] Minor. --- README.md | 2 +- README.md.jinja | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f518098c..25a66eae 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ If you find this helpful, please consider [sponsorship](https://github.com/spons - Automate Git hooks with [pre-commit hooks](https://github.com/pre-commit/pre-commit-hooks) and [local](https://pre-commit.com/#repository-local-hooks) linters. - Lint with [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). - Tests with [`pytest`](https://pytest.org/) and [`coverage`](https://coverage.readthedocs.io) for threshold and reports. -- Document with [`sphinx`](https://www.sphinx-doc.org/), the [`furo`](https://pradyunsg.me/furo) theme, and [mypy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation) and [coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. +- Document with [`sphinx`](https://www.sphinx-doc.org/), the [`furo`](https://pradyunsg.me/furo) theme, and [mypy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation)/[coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. - Version Package using git metadata with [`setuptools-scm`](https://github.com/pypa/setuptools_scm/). - Continuous Integration with [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/). - [Versioned documentation](https://docs.readthedocs.io/en/stable/versions.html) with [Read the Docs](https://readthedocs.org/) integration. diff --git a/README.md.jinja b/README.md.jinja index e92bb2d6..5ddcb0a6 100644 --- a/README.md.jinja +++ b/README.md.jinja @@ -30,7 +30,7 @@ If you find this helpful, please consider [sponsorship](https://github.com/spons - Automate Git hooks with [pre-commit hooks](https://github.com/pre-commit/pre-commit-hooks) and [local](https://pre-commit.com/#repository-local-hooks) linters. - Lint with [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). - Tests with [`pytest`](https://pytest.org/) and [`coverage`](https://coverage.readthedocs.io) for threshold and reports. -- Document with [`sphinx`](https://www.sphinx-doc.org/), the [`furo`](https://pradyunsg.me/furo) theme, and [mypy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation) and [coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. +- Document with [`sphinx`](https://www.sphinx-doc.org/), the [`furo`](https://pradyunsg.me/furo) theme, and [mypy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation)/[coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. - Version Package using git metadata with [`setuptools-scm`](https://github.com/pypa/setuptools_scm/). - Continuous Integration with [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/). - [Versioned documentation](https://docs.readthedocs.io/en/stable/versions.html) with [Read the Docs](https://readthedocs.org/) integration. From 237b7307a73fa9500085ae1ab13d438d634f5596 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 15 Aug 2023 09:25:08 +0000 Subject: [PATCH 6/6] Minor. --- README.md | 24 +++++++++++------------- README.md.jinja | 24 +++++++++++------------- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 25a66eae..f777d87e 100644 --- a/README.md +++ b/README.md @@ -25,17 +25,17 @@ If you find this helpful, please consider [sponsorship](https://github.com/spons ## :hammer_and_wrench: Features - Project setup and template update with [`copier`](https://copier.readthedocs.io/). -- [Virtual environment](https://docs.python.org/3/glossary.html#term-virtual-environment) management with [`pipenv`](https://pipenv.pypa.io/). -- Dependency management with categorized dependencies and [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files). +- Manage [virtual environments](https://docs.python.org/3/glossary.html#term-virtual-environment) for development with [`pipenv`](https://pipenv.pypa.io/). +- Manage dependency with categorized [requirements](https://pip.pypa.io/en/stable/user_guide/#requirements-files) and [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files). - Automate Git hooks with [pre-commit hooks](https://github.com/pre-commit/pre-commit-hooks) and [local](https://pre-commit.com/#repository-local-hooks) linters. - Lint with [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). -- Tests with [`pytest`](https://pytest.org/) and [`coverage`](https://coverage.readthedocs.io) for threshold and reports. +- Test with [`pytest`](https://pytest.org/) and [`coverage`](https://coverage.readthedocs.io) for threshold and reports. - Document with [`sphinx`](https://www.sphinx-doc.org/), the [`furo`](https://pradyunsg.me/furo) theme, and [mypy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation)/[coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. -- Version Package using git metadata with [`setuptools-scm`](https://github.com/pypa/setuptools_scm/). +- Version the package using git metadata with [`setuptools-scm`](https://github.com/pypa/setuptools_scm/). - Continuous Integration with [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/). - [Versioned documentation](https://docs.readthedocs.io/en/stable/versions.html) with [Read the Docs](https://readthedocs.org/) integration. -- Command Line Interface development with [`typer`](https://typer.tiangolo.com/). -- Configuration management with [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/). +- Develop Command Line Interfaces with [`typer`](https://typer.tiangolo.com/). +- Manage configurations with [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/). - Centralize common actions with a unified [`Makefile`](Makefile). - VSCode [settings](.vscode/settings.json) with recommended [extensions](.vscode/extensions.json). @@ -46,10 +46,8 @@ Certain system-level Python applications are needed and it is recommended to use ```bash # Copier: Template rendering for projects. pipx install copier - # Pipenv: Virtual environment and package manager for Python. pipx install pipenv - # Pre-commit: Automates Git hooks for code quality checks. pipx install pre-commit ``` @@ -62,28 +60,28 @@ pipx install pre-commit copier copy gh:serious-scaffold/serious-scaffold-python /path/to/project ``` -1. Navigate to the project directory and initialize a git repository. +2. Navigate to the project directory and initialize a git repository. ```bash cd /path/to/project git init ``` -1. Set up the development environment. +3. Set up the development environment. ```bash make dev ``` -1. Commit the initialized project. +4. Commit the initialized project. ```bash git add . git commit -m "Initialize from serious-scaffold-python." ``` -1. That's it! Focus on the coding mostly within `src` folder now. +5. That's it! Feel free to focus on the coding within `src` folder. ## :scroll: License -MIT, for more details, check out the [LICENSE](LICENSE) file. +MIT, for more details, see the [LICENSE](LICENSE) file. diff --git a/README.md.jinja b/README.md.jinja index 5ddcb0a6..5b89586d 100644 --- a/README.md.jinja +++ b/README.md.jinja @@ -25,17 +25,17 @@ If you find this helpful, please consider [sponsorship](https://github.com/spons ## :hammer_and_wrench: Features - Project setup and template update with [`copier`](https://copier.readthedocs.io/). -- [Virtual environment](https://docs.python.org/3/glossary.html#term-virtual-environment) management with [`pipenv`](https://pipenv.pypa.io/). -- Dependency management with categorized dependencies and [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files). +- Manage [virtual environments](https://docs.python.org/3/glossary.html#term-virtual-environment) for development with [`pipenv`](https://pipenv.pypa.io/). +- Manage dependency with categorized [requirements](https://pip.pypa.io/en/stable/user_guide/#requirements-files) and [constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files). - Automate Git hooks with [pre-commit hooks](https://github.com/pre-commit/pre-commit-hooks) and [local](https://pre-commit.com/#repository-local-hooks) linters. - Lint with [`black`](https://github.com/psf/black), [`isort`](https://pycqa.github.io/isort/), [`mypy`](http://www.mypy-lang.org/), [`ruff`](https://github.com/charliermarsh/ruff), and [`toml-sort`](https://github.com/pappasam/toml-sort). -- Tests with [`pytest`](https://pytest.org/) and [`coverage`](https://coverage.readthedocs.io) for threshold and reports. +- Test with [`pytest`](https://pytest.org/) and [`coverage`](https://coverage.readthedocs.io) for threshold and reports. - Document with [`sphinx`](https://www.sphinx-doc.org/), the [`furo`](https://pradyunsg.me/furo) theme, and [mypy](https://mypy.readthedocs.io/en/stable/command_line.html?report-generation)/[coverage](https://coverage.readthedocs.io/en/7.3.0/cmd.html#html-reporting-coverage-html) reports. -- Version Package using git metadata with [`setuptools-scm`](https://github.com/pypa/setuptools_scm/). +- Version the package using git metadata with [`setuptools-scm`](https://github.com/pypa/setuptools_scm/). - Continuous Integration with [GitHub Actions](https://docs.github.com/actions) and [GitLab CI/CD](https://docs.gitlab.com/ee/ci/). - [Versioned documentation](https://docs.readthedocs.io/en/stable/versions.html) with [Read the Docs](https://readthedocs.org/) integration. -- Command Line Interface development with [`typer`](https://typer.tiangolo.com/). -- Configuration management with [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/). +- Develop Command Line Interfaces with [`typer`](https://typer.tiangolo.com/). +- Manage configurations with [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/). - Centralize common actions with a unified [`Makefile`](Makefile). - VSCode [settings](.vscode/settings.json) with recommended [extensions](.vscode/extensions.json). @@ -46,10 +46,8 @@ Certain system-level Python applications are needed and it is recommended to use ```bash # Copier: Template rendering for projects. pipx install copier - # Pipenv: Virtual environment and package manager for Python. pipx install pipenv - # Pre-commit: Automates Git hooks for code quality checks. pipx install pre-commit ``` @@ -62,28 +60,28 @@ pipx install pre-commit copier copy gh:serious-scaffold/serious-scaffold-python /path/to/project ``` -1. Navigate to the project directory and initialize a git repository. +2. Navigate to the project directory and initialize a git repository. ```bash cd /path/to/project git init ``` -1. Set up the development environment. +3. Set up the development environment. ```bash make dev ``` -1. Commit the initialized project. +4. Commit the initialized project. ```bash git add . git commit -m "Initialize from serious-scaffold-python." ``` -1. That's it! Focus on the coding mostly within `src` folder now. +5. That's it! Feel free to focus on the coding within `src` folder. ## :scroll: License -MIT, for more details, check out the [LICENSE](LICENSE) file. +MIT, for more details, see the [LICENSE](LICENSE) file.