Skip to content

Commit

Permalink
Rename as bulletproof-python.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamwil committed Jan 2, 2023
1 parent 10471fa commit d5255c8
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package
name: Lint, type-check and test

on:
push:
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# practical-python
# bulletproof-python

A practical python project template using tox, ruff, pytest and pip-tools.
A magic-free, understandable python project template using tox, ruff, pytest and
pip-tools. This template requires you to manage your own virtual environment,
but the configuration is explicit and easy to understand.

This is not production ready, but it's a good starting point. Requirements
should be specified in pyproject.toml and then pinned using pip-tools in
Expand All @@ -16,7 +18,7 @@ should be specified in pyproject.toml and then pinned using pip-tools in
1. Install the package in editable mode: `pip install -e .`
1. Install the pre-commit hooks: `pre-commit install`
1. Run the test suite with tox: `tox`
1. Replace the name practical_python/practical-python with your project name
1. Replace the name bulletproof_python/bulletproof-python with your project name
1. Update project metadata in pyproject.toml and README.md
1. Write some code and lint it: `tox -e fix`.

Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
requires = ["setuptools", "wheel"]

[project]
name = "practical-python"
name = "bulletproof-python"
version = "0.1.0"
description = 'Update me...'
readme = "README.md"
Expand Down Expand Up @@ -30,12 +30,12 @@ dev = [
]

[project.scripts]
practical-python = "practical_python.main:main"
bulletproof-python = "bulletproof_python.main:main"

[project.urls]
Documentation = "https://github.com/jamwil/practical-python#readme"
Issues = "https://github.com/jamwil/practical-python/issues"
Source = "https://github.com/jamwil/practical-python"
Documentation = "https://github.com/jamwil/bulletproof-python#readme"
Issues = "https://github.com/jamwil/bulletproof-python/issues"
Source = "https://github.com/jamwil/bulletproof-python"

[tool.setuptools]
package-dir = { "" = "src" }
Expand Down Expand Up @@ -124,4 +124,4 @@ src = ["src", "tests"]
"tests/*.py" = ["S101"]

[tool.ruff.isort]
known-first-party = ["practical_python"]
known-first-party = ["bulletproof_python"]
14 changes: 7 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
attrs==22.2.0
# via pytest
black==22.12.0
# via practical-python (pyproject.toml)
# via bulletproof-python (pyproject.toml)
build==0.9.0
# via pip-tools
cfgv==3.3.1
Expand All @@ -27,7 +27,7 @@ identify==2.5.11
iniconfig==1.1.1
# via pytest
mypy==0.991
# via practical-python (pyproject.toml)
# via bulletproof-python (pyproject.toml)
mypy-extensions==0.4.3
# via
# black
Expand All @@ -43,25 +43,25 @@ pathspec==0.10.3
pep517==0.13.0
# via build
pip-tools==6.12.1
# via practical-python (pyproject.toml)
# via bulletproof-python (pyproject.toml)
platformdirs==2.6.2
# via
# black
# virtualenv
pluggy==1.0.0
# via pytest
pre-commit==2.21.0
# via practical-python (pyproject.toml)
# via bulletproof-python (pyproject.toml)
pytest==7.2.0
# via
# practical-python (pyproject.toml)
# bulletproof-python (pyproject.toml)
# pytest-cov
pytest-cov==4.0.0
# via practical-python (pyproject.toml)
# via bulletproof-python (pyproject.toml)
pyyaml==6.0
# via pre-commit
ruff==0.0.206
# via practical-python (pyproject.toml)
# via bulletproof-python (pyproject.toml)
typing-extensions==4.4.0
# via mypy
virtualenv==20.17.1
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import pytest

from practical_python import main
from bulletproof_python import main


def test_main(caplog: pytest.LogCaptureFixture) -> None:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ setenv =
PYTHONWARNINGS = ignore
commands =
pytest --cov-report=term-missing --cov-config={toxinidir}{/}pyproject.toml \
--cov={envsitepackagesdir}{/}practical_python \
--cov={envsitepackagesdir}{/}bulletproof_python \
--cov={toxinidir}{/}tests {posargs}

[testenv:lint]
Expand Down

0 comments on commit d5255c8

Please sign in to comment.