From 965c8ce10a796f02663069b4d915dea240fe0e05 Mon Sep 17 00:00:00 2001 From: mahiki Date: Tue, 23 Jul 2024 10:46:06 +0200 Subject: [PATCH 1/2] pyproject homepage and repo links added --- notes/package-log.md | 12 ++++++++++++ pyproject.toml | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/notes/package-log.md b/notes/package-log.md index 1d6a7d7..9aa0084 100644 --- a/notes/package-log.md +++ b/notes/package-log.md @@ -1,6 +1,18 @@ # Package desertislandutils Log >starting an actual log + +## 2024-07-23: POETRY PLUGIN HOMEBREW-FORMULA +I think this is to solve the way install is a little different than virtualenv or pip install build things. + +```sh +git checkout -b feature/po-brew-form +pipx inject poetry poetry-homebrew-formula +poetry homebrew-formula --help + +``` + + ## 2024-07-22: GHA Working finally * `release.yml` is working on tag `v0.3.9` * good to go with pushing `release/*` tags diff --git a/pyproject.toml b/pyproject.toml index 619b539..e7f8677 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,12 +3,14 @@ name = "desertislandutils" version = "0.3.10" description = "A collection of personal convenience utilities" authors = ["mahiki "] +homepage = "https://github.com/mahiki/desertislandutils" +repository = "https://github.com/mahiki/desertislandutils" +readme = "README.md" license = "MIT" packages = [ { include = "src/toobigdatadoc" }, { include = "src/weeknumber" }, ] -readme = "README.md" [tool.poetry.dependencies] python = "^3.11" From 16bad9d69c2ed0bb76460cd6f4d5d5ec062a452f Mon Sep 17 00:00:00 2001 From: mahiki Date: Wed, 24 Jul 2024 23:36:12 +0200 Subject: [PATCH 2/2] notes --- notes/package-log.md | 45 ++++++++++++++++++++++-- notes/weeknumber/weeknumber.md | 4 +-- notes/workflow.publish-update.md | 2 +- todo/RESUME.manual-build-bump-formula.md | 2 +- 4 files changed, 46 insertions(+), 7 deletions(-) diff --git a/notes/package-log.md b/notes/package-log.md index 9aa0084..bf3c13a 100644 --- a/notes/package-log.md +++ b/notes/package-log.md @@ -9,9 +9,11 @@ I think this is to solve the way install is a little different than virtualenv o git checkout -b feature/po-brew-form pipx inject poetry poetry-homebrew-formula poetry homebrew-formula --help + # Generating formula + # No valid link found for desertislandutils. ``` - +Well, that was fun ## 2024-07-22: GHA Working finally * `release.yml` is working on tag `v0.3.9` @@ -39,10 +41,10 @@ curl -Ls $vLatest | shasum -a 256 # https://github.com/mahiki/homebrew-tap/blob/main/Formula/desertislandutils.rb code ./homebrew-tap/Formula/desertislandutils.rb -brew audit desertislandtils +brew audit desertislandutils # nothing -brew edit desertislandtils +brew edit desertislandutils # this just opens the local file /opt/homebrew/Library/Taps/mahiki/homebrew-tap/Formula/desertislandutils.rb brew developer off @@ -111,3 +113,40 @@ wn = "src.weeknumber.wn:app" ``` Looks like that needs update and fix. + + +### Poetry Creates its Own Executable Scripts +And Poetry creates an executable script as well in the virtual environment: +```sh +# bin/wn: +bat --style plain ~/Library/Caches/pypoetry/virtualenvs/desertislandutils-zyraM7-y-py3.12/bin/wn +#!~/Library/Caches/pypoetry/virtualenvs/desertislandutils-zyraM7-y-py3.12/bin/python +import sys +from src.weeknumber.wn import app + +if __name__ == '__main__': + sys.exit(app()) + +# bin/too: +bat --style plain ~/Library/Caches/pypoetry/virtualenvs/desertislandutils-zyraM7-y-py3.12/bin/too +#!~/Library/Caches/pypoetry/virtualenvs/desertislandutils-zyraM7-y-py3.12/bin/python +import sys +from src.toobigdatadoc.too import main + +if __name__ == '__main__': + sys.exit(main()) +``` + +### So what is this `--no-root` business? +```sh +cd "$(mktemp -d)" +curl -LO https://github.com/mahiki/desertislandutils/releases/download/v0.3.10/desertislandutils-0.3.10.tar.gz +tar -xf +cd desertislandutils-0.3.10 +poetry install --no-root + # Creating virtualenv desertislandutils-vB0CMQFH-py3.12 in ~/Library/Caches/pypoetry/virtualenvs + # installs all dependencies +l ~/Library/Caches/pypoetry/virtualenvs/desertislandutils-vB0CMQFH-py3.12/bin +# NOPE +# There is no executable script call for each poetry thing. +``` \ No newline at end of file diff --git a/notes/weeknumber/weeknumber.md b/notes/weeknumber/weeknumber.md index 5803627..e39560e 100644 --- a/notes/weeknumber/weeknumber.md +++ b/notes/weeknumber/weeknumber.md @@ -7,7 +7,7 @@ Also, its time to incorporate `justfile` into my package development workflow, s Typer is pretty sweet, waaay beyond Argparse. TODO: release is merged, need to GHA auto push to homebrew. See below, i think was manual change to tab formula. -The tap is referencing the mahiki/desertislandtils release page with tar.gz per version. +The tap is referencing the mahiki/desertislandutils release page with tar.gz per version. TODO: GHA create a release TODO: brew tap create tag and push updated URLs commit. @@ -100,7 +100,7 @@ just test tests/wn ✙✙✙✙✙✙✙✙ TESTING ✙✙✙✙✙✙✙✙ poetry run pytest --disable-warnings --verbose tests/wn ========================================================= test session starts ========================================================== -rootdir: /Users/merlinr/repo/the-others/desertislandutils +rootdir: /Users/hans/repo/the-others/desertislandutils collected 1 item tests/wn/test_wn.py::test_wn_options PASSED [100%] ``` diff --git a/notes/workflow.publish-update.md b/notes/workflow.publish-update.md index 70095d1..761306e 100644 --- a/notes/workflow.publish-update.md +++ b/notes/workflow.publish-update.md @@ -32,7 +32,7 @@ So new PR is automatically created for a 'release' branch pushed to remove ### PASS:test local release version in real usage ```bash -# from desertislandtils +# from desertislandutils poetry shell # /Users/segovia/Library/Caches/pypoetry/virtualenvs/desertislandutils-AVSNhiuH-py3.9 diff --git a/todo/RESUME.manual-build-bump-formula.md b/todo/RESUME.manual-build-bump-formula.md index c55d8eb..2bab1ab 100644 --- a/todo/RESUME.manual-build-bump-formula.md +++ b/todo/RESUME.manual-build-bump-formula.md @@ -15,7 +15,7 @@ TODO: ## TODO: MANUAL BUILD STEPS TO AUTOMATE ```sh -# cd ../desertislandtils +# cd ../desertislandutils git checkout tag v0.2.1 poetry run pytest # DEFINITELY INCLUDE THIS IN WORKFLOW poetry build --format sdist