-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update versions * migrate makefile to poethepoet * minor pyproject.toml updates * version/year bump * read through docs and github actions * system install * system * update github action os
- Loading branch information
1 parent
317e71b
commit 1838457
Showing
9 changed files
with
98 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ Make sure you have python 3.12 available and on your path. Then: | |
python -m pip install -U pip | ||
|
||
# if it's local file or a github link... | ||
pip install path/to/pyscaffold-0.0.1-py3-none-any.whl | ||
pip install path/to/pyscaffold-0.0.3-py3-none-any.whl | ||
# if it's on pypi | ||
pip install pyscaffold | ||
|
||
|
@@ -39,29 +39,29 @@ pyscaffold bottles --num 20 | |
|
||
## Developer setup | ||
|
||
Make sure you have python 3.12 available and on your path. Then: | ||
Make sure you have uv available on your path. Then: | ||
|
||
```bash | ||
# clone project | ||
git clone [email protected]:shapiromatron/pyscaffold.git | ||
cd pyscaffold | ||
|
||
# create virtual environment and activate | ||
python -m venv venv --prompt pyscaffold | ||
uv venv --python=3.12 --prompt pyscaffold .venv | ||
source venv/bin/activate # or venv\Scripts\activate on windows. | ||
|
||
# install packages | ||
python -m pip install -U pip uv | ||
uv pip install -e ".[dev]" | ||
|
||
# test local install | ||
pyscaffold hello | ||
|
||
# these should work on mac/linux/windows | ||
make test # run tests | ||
make lint # identify formatting errors | ||
make format # fix formatting errors when possible | ||
make build # build a python wheel | ||
# run assorted commands | ||
poe --help | ||
poe test # run tests | ||
poe lint # identify formatting errors | ||
poe format # fix formatting errors when possible | ||
poe build # build a python wheel | ||
``` | ||
|
||
Github actions are setup to execute whenever code is pushed to check code formatting and successful tests. In addition, when code is pushed to the `main` branch, a wheel artifact is created and stored on github. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
[build-system] | ||
requires = ["flit_core >=3.9,<4"] | ||
build-backend = "flit_core.buildapi" | ||
|
||
[project] | ||
name = "pyscaffold" | ||
authors = [{name = "My pyscaffold", email = "[email protected]"}] | ||
|
@@ -23,23 +19,28 @@ dependencies = [ | |
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"flit~=3.9.0", | ||
"coverage~=7.5.1", | ||
"pytest~=8.2.1", | ||
"ruff~=0.4.5", | ||
"flit~=3.10.1", | ||
"coverage~=7.6.10", | ||
"pytest~=8.3.4", | ||
"ruff~=0.9.2", | ||
"poethepoet~=0.32.1", | ||
] | ||
|
||
[project.urls] | ||
Home = "https://github.com/shapiromatron/pyscaffold" | ||
Changes = "https://github.com/shapiromatron/pyscaffold/blob/main/HISTORY.md" | ||
"Source Code" = "https://github.com/shapiromatron/pyscaffold" | ||
"Changelog" = "https://github.com/shapiromatron/pyscaffold/blob/main/HISTORY.md" | ||
"Issue Tracker" = "https://github.com/shapiromatron/pyscaffold/issues" | ||
|
||
[project.scripts] | ||
pyscaffold = "pyscaffold.cli:app" | ||
|
||
[build-system] | ||
requires = ["flit_core >=3.10,<4"] | ||
build-backend = "flit_core.buildapi" | ||
|
||
[tool.ruff] | ||
line-length = 100 | ||
target-version = "py311" | ||
target-version = "py312" | ||
|
||
[tool.ruff.lint] | ||
select = ["F", "E", "W", "I", "UP", "S", "B", "T20", "RUF"] | ||
|
@@ -64,3 +65,43 @@ omit = [ | |
[tool.coverage.report] | ||
fail_under=99 | ||
precision=1 | ||
|
||
[tool.poe.tasks.lint] | ||
help = "Check formatting issues" | ||
sequence = [ | ||
{cmd = "ruff format . --check"}, | ||
{cmd = "ruff check ."}, | ||
] | ||
|
||
[tool.poe.tasks.format] | ||
help = "Fix formatting issues (where possible)" | ||
sequence = [ | ||
{cmd = "ruff format ."}, | ||
{cmd = "ruff check . --fix --show-fixes"}, | ||
] | ||
|
||
[tool.poe.tasks.test] | ||
help = "Run tests" | ||
cmd = "pytest" | ||
|
||
[tool.poe.tasks.coverage] | ||
help = "Generate test coverage report" | ||
sequence = [ | ||
{cmd = "coverage run -m pytest"}, | ||
{cmd = "coverage html"}, | ||
] | ||
|
||
[tool.poe.tasks.loc] | ||
help = "Lines of Code Report" | ||
cmd = """ | ||
cloc | ||
--exclude-dir=venv,build,dist | ||
--exclude-ext=json,yaml,svg,toml,ini | ||
--vcs=git \ | ||
--md \ | ||
. | ||
""" | ||
|
||
[tool.poe.tasks.build] | ||
help = "Build wheel package" | ||
cmd = "uv build" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"""The pyscaffold project is your entrypoint into simple python packages""" | ||
|
||
__version__ = "0.0.2" | ||
__version__ = "0.0.3" |