build settings, makefile, precommit
Authored by
mfwolffe <wolffemf@dukes.jmu.edu>
- SHA
320e14da4fd5cf29d24248fa2075dd371a44d8dd- Tree
e7bab57
320e14d
320e14da4fd5cf29d24248fa2075dd371a44d8dde7bab57| Status | File | + | - |
|---|---|---|---|
| A |
.gitignore
|
4 | 0 |
| A |
.pre-commit-config.yaml
|
6 | 0 |
| A |
Makefile
|
27 | 0 |
| A |
pyproject.toml
|
52 | 0 |
.gitignoreadded@@ -0,0 +1,4 @@ | ||
| 1 | +dist/* | |
| 2 | +build/* | |
| 3 | +**/*/*.egg-info/* | |
| 4 | +**/*/__pycache__/* | |
.pre-commit-config.yamladded@@ -0,0 +1,6 @@ | ||
| 1 | +repos: | |
| 2 | + - repo: https://github.com/psf/black | |
| 3 | + rev: 25.1.0 | |
| 4 | + hooks: | |
| 5 | + - id: black | |
| 6 | + language_version: python3.9 | |
Makefileadded@@ -0,0 +1,27 @@ | ||
| 1 | +.PHONY: help install uninstall clean reinstall reshim | |
| 2 | + | |
| 3 | +help: | |
| 4 | + @echo "Shtick Makefile" | |
| 5 | + @echo " make install - pip install -e . && asdf reshim python" | |
| 6 | + @echo " make uninstall - pip uninstall shtick" | |
| 7 | + @echo " make clean - rm -rf **/*/*.egg-info" | |
| 8 | + @echo " make reshim - asdf reshim python" | |
| 9 | + @echo " make reinstall - Uninstall, clean, then install & reshim" | |
| 10 | + | |
| 11 | +install: | |
| 12 | + pip install -e . | |
| 13 | + asdf reshim python | |
| 14 | + | |
| 15 | +uninstall: | |
| 16 | + pip uninstall -y shtick | |
| 17 | + | |
| 18 | +clean: | |
| 19 | + rm -rf **/*/*.egg-info | |
| 20 | + | |
| 21 | +reshim: | |
| 22 | + asdf reshim python | |
| 23 | + | |
| 24 | +reinstall: uninstall clean install | |
| 25 | + | |
| 26 | +test: | |
| 27 | + pytest tests/ | |
pyproject.tomladded@@ -0,0 +1,52 @@ | ||
| 1 | +[build-system] | |
| 2 | +requires = ["setuptools>=61.0", "wheel"] | |
| 3 | +build-backend = "setuptools.build_meta" | |
| 4 | + | |
| 5 | +[project] | |
| 6 | +name = "shtick" | |
| 7 | +version = "1.0.0" | |
| 8 | +description = "Shell alias manager - generates shell configuration files from TOML" | |
| 9 | +readme = "README.md" | |
| 10 | +authors = [{name = "Matthew Forrester Wolffe", email = "espadonne@outlook.com"}] | |
| 11 | +license = {text = "MIT"} | |
| 12 | +requires-python = ">=3.11" | |
| 13 | +keywords = ["shell", "alias", "bash", "zsh", "fish", "configuration", "dotfiles"] | |
| 14 | + | |
| 15 | +classifiers = [ | |
| 16 | + "Development Status :: 4 - Beta", | |
| 17 | + "Environment :: Console", | |
| 18 | + "Intended Audience :: Developers", | |
| 19 | + "Intended Audience :: System Administrators", | |
| 20 | + "License :: OSI Approved :: MIT License", | |
| 21 | + "Operating System :: POSIX", | |
| 22 | + "Programming Language :: Python :: 3", | |
| 23 | + "Programming Language :: Python :: 3.11", | |
| 24 | + "Programming Language :: Python :: 3.12", | |
| 25 | + "Topic :: System :: Shells", | |
| 26 | + "Topic :: Utilities", | |
| 27 | +] | |
| 28 | + | |
| 29 | +# make 'shtick' command available globally | |
| 30 | +[project.scripts] | |
| 31 | +shtick = "shtick.cli:main" | |
| 32 | + | |
| 33 | +[project.optional-dependencies] | |
| 34 | +dev = ["pytest", "black", "flake8", "mypy"] | |
| 35 | + | |
| 36 | +# Tell setuptools where to find packages | |
| 37 | +[tool.setuptools.packages.find] | |
| 38 | +where = ["src"] | |
| 39 | + | |
| 40 | +[tool.setuptools.package-dir] | |
| 41 | +"" = "src" | |
| 42 | + | |
| 43 | + | |
| 44 | +[tool.black] | |
| 45 | +line-length = 88 | |
| 46 | +target-version = ['py311'] | |
| 47 | + | |
| 48 | +# type checking | |
| 49 | +[tool.mypy] | |
| 50 | +python_version = "3.11" | |
| 51 | +warn_return_any = true | |
| 52 | +warn_unused_configs = true | |