Skip to content

Commit

Permalink
MERGE 'feature/po-brew-form' into dev
Browse files Browse the repository at this point in the history
    * just adding url and homepage to pyproject
  • Loading branch information
mahiki committed Jul 24, 2024
2 parents a64bcd9 + 16bad9d commit f68a9c1
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 7 deletions.
55 changes: 53 additions & 2 deletions notes/package-log.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# 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
# 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`
* good to go with pushing `release/*` tags
Expand All @@ -27,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
Expand Down Expand Up @@ -99,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.
```
4 changes: 2 additions & 2 deletions notes/weeknumber/weeknumber.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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%]
```
Expand Down
2 changes: 1 addition & 1 deletion notes/workflow.publish-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ name = "desertislandutils"
version = "0.3.10"
description = "A collection of personal convenience utilities"
authors = ["mahiki <[email protected]>"]
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"
Expand Down
2 changes: 1 addition & 1 deletion todo/RESUME.manual-build-bump-formula.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f68a9c1

Please sign in to comment.