Skip to content

Commit

Permalink
Switch from Poetry to PDM (#22)
Browse files Browse the repository at this point in the history
* Add Alacritty to dev tools
* Switch from Poetry to PDM
* Make tests parallel
* Use Homebrew Bundle
* Update dev docs
  • Loading branch information
makukha authored Aug 2, 2024
1 parent afb6a48 commit d3eb8de
Show file tree
Hide file tree
Showing 13 changed files with 701 additions and 364 deletions.
5 changes: 1 addition & 4 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[tool.bumpversion]
current_version = "0.6.0"
current_version = "0.6.1"
allow_dirty = true

[[tool.bumpversion.files]]
filename = "pyproject.toml"

[[tool.bumpversion.files]]
filename = "src/caseutil.py"

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dist/
.idea/
.pdm-python
__pycache__/
.task/
tmp/
Expand Down
11 changes: 11 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# dev core
brew "pdm"
brew "pyenv"
brew "tox"

# pyenv deps not covered by formula
brew "zlib"

# dev ux
cask "alacritty"
cask "font-jetbrains-mono-nerd-font"
252 changes: 252 additions & 0 deletions Brewfile.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
{
"entries": {
"brew": {
"pdm": {
"version": "2.17.3",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_sonoma": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pdm/blobs/sha256:d842c1c53b05426e7a692170d867af85a4fb670fb50983f6f51d5421620860f1",
"sha256": "d842c1c53b05426e7a692170d867af85a4fb670fb50983f6f51d5421620860f1"
},
"arm64_ventura": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pdm/blobs/sha256:bc15a8b800b2bed910cedd59ba23a5a71c6540d3d89fb91904561db6e75f2b19",
"sha256": "bc15a8b800b2bed910cedd59ba23a5a71c6540d3d89fb91904561db6e75f2b19"
},
"arm64_monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pdm/blobs/sha256:44b0517d6308a391ee11a9b7e01e364149992a75cae017b2ebeac8454c767b07",
"sha256": "44b0517d6308a391ee11a9b7e01e364149992a75cae017b2ebeac8454c767b07"
},
"sonoma": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pdm/blobs/sha256:8586635e0ff1628031de4aaeaae57d858e88a87e5177cf2f2dee64acaa4d5bed",
"sha256": "8586635e0ff1628031de4aaeaae57d858e88a87e5177cf2f2dee64acaa4d5bed"
},
"ventura": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pdm/blobs/sha256:f442373308f31b6e0a08c657a40ba3c076841ea965037145c2976163d8c42438",
"sha256": "f442373308f31b6e0a08c657a40ba3c076841ea965037145c2976163d8c42438"
},
"monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pdm/blobs/sha256:73754cbcd56b4ced3dc151ecc1f725364d2abddad9df8abf74632ddb339a3346",
"sha256": "73754cbcd56b4ced3dc151ecc1f725364d2abddad9df8abf74632ddb339a3346"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pdm/blobs/sha256:b6235de62bf8e2a251f949e4886378b92447df20e6f79cbf1073e8e62d287b2a",
"sha256": "b6235de62bf8e2a251f949e4886378b92447df20e6f79cbf1073e8e62d287b2a"
}
}
}
},
"tox": {
"version": "4.16.0",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_sonoma": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/tox/blobs/sha256:c0725abf571c05f07e535b7b402596124b63f0c09057245755c1edc8bf6309ef",
"sha256": "c0725abf571c05f07e535b7b402596124b63f0c09057245755c1edc8bf6309ef"
},
"arm64_ventura": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/tox/blobs/sha256:c0725abf571c05f07e535b7b402596124b63f0c09057245755c1edc8bf6309ef",
"sha256": "c0725abf571c05f07e535b7b402596124b63f0c09057245755c1edc8bf6309ef"
},
"arm64_monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/tox/blobs/sha256:c0725abf571c05f07e535b7b402596124b63f0c09057245755c1edc8bf6309ef",
"sha256": "c0725abf571c05f07e535b7b402596124b63f0c09057245755c1edc8bf6309ef"
},
"sonoma": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/tox/blobs/sha256:15eebb0187595aee905d7b787afd50c10d3fa8ba93990aed0f42eb4696cdb9ad",
"sha256": "15eebb0187595aee905d7b787afd50c10d3fa8ba93990aed0f42eb4696cdb9ad"
},
"ventura": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/tox/blobs/sha256:15eebb0187595aee905d7b787afd50c10d3fa8ba93990aed0f42eb4696cdb9ad",
"sha256": "15eebb0187595aee905d7b787afd50c10d3fa8ba93990aed0f42eb4696cdb9ad"
},
"monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/tox/blobs/sha256:15eebb0187595aee905d7b787afd50c10d3fa8ba93990aed0f42eb4696cdb9ad",
"sha256": "15eebb0187595aee905d7b787afd50c10d3fa8ba93990aed0f42eb4696cdb9ad"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/tox/blobs/sha256:97756a56596b220232be07a2249133228fe51a72575afad3ebf51998c7e5a32d",
"sha256": "97756a56596b220232be07a2249133228fe51a72575afad3ebf51998c7e5a32d"
}
}
}
},
"zlib": {
"version": "1.3.1",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_sonoma": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/zlib/blobs/sha256:f867540472a59ab3fb1201625df546593e5fae2e98948c4c16c6154b0468b682",
"sha256": "f867540472a59ab3fb1201625df546593e5fae2e98948c4c16c6154b0468b682"
},
"arm64_ventura": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/zlib/blobs/sha256:9033eedbd240076116fea9fa181882e75edee7fe0c5d2e3850258a185c52792f",
"sha256": "9033eedbd240076116fea9fa181882e75edee7fe0c5d2e3850258a185c52792f"
},
"arm64_monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/zlib/blobs/sha256:ebf10e203575beb64d6a8637ec2dc31774fa3141cfccab8ae7039f88b9efa7f6",
"sha256": "ebf10e203575beb64d6a8637ec2dc31774fa3141cfccab8ae7039f88b9efa7f6"
},
"sonoma": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/zlib/blobs/sha256:217f4245cd1da65a3388f512530089f526cd63a38d49ee5f29a90576dfeb3bb7",
"sha256": "217f4245cd1da65a3388f512530089f526cd63a38d49ee5f29a90576dfeb3bb7"
},
"ventura": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/zlib/blobs/sha256:6012d7831245716d8507da3d1eb14ad274f8aa0b71b59275fe6bbbd6cebd787f",
"sha256": "6012d7831245716d8507da3d1eb14ad274f8aa0b71b59275fe6bbbd6cebd787f"
},
"monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/zlib/blobs/sha256:56bbfa3d7bd6a5ccf17ffa53ab926e67f24e74bd64b4740b56fd96c312e37c44",
"sha256": "56bbfa3d7bd6a5ccf17ffa53ab926e67f24e74bd64b4740b56fd96c312e37c44"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/zlib/blobs/sha256:38f2469db2ce63b70855a98e5ee27b5b5a92874e52542cbdc0b230bba1e7195f",
"sha256": "38f2469db2ce63b70855a98e5ee27b5b5a92874e52542cbdc0b230bba1e7195f"
}
}
}
},
"pyenv": {
"version": "2.4.8",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_sonoma": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/pyenv/blobs/sha256:45459a58894d865fd97cc43dbb4287a8d3f5265e1d3c3ac592c74ecba39c3f0c",
"sha256": "45459a58894d865fd97cc43dbb4287a8d3f5265e1d3c3ac592c74ecba39c3f0c"
},
"arm64_ventura": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/pyenv/blobs/sha256:02d6d5e67a592310ee4ab8f0405ba63a7db910f56967db15a682d42c5aabad94",
"sha256": "02d6d5e67a592310ee4ab8f0405ba63a7db910f56967db15a682d42c5aabad94"
},
"arm64_monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/pyenv/blobs/sha256:7b985c2ff3d7506779b65a2a9661486de02b582dc4e690f81e7e01dbe2278ed4",
"sha256": "7b985c2ff3d7506779b65a2a9661486de02b582dc4e690f81e7e01dbe2278ed4"
},
"sonoma": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/pyenv/blobs/sha256:dba07d3dd1836c8adb0125e2657ba0fc71c54faab569b84d49e6de41d675691e",
"sha256": "dba07d3dd1836c8adb0125e2657ba0fc71c54faab569b84d49e6de41d675691e"
},
"ventura": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/pyenv/blobs/sha256:e09ad870f5ba2196d07e15474c7a3979792813d0ad2c157bf868e19a18f52201",
"sha256": "e09ad870f5ba2196d07e15474c7a3979792813d0ad2c157bf868e19a18f52201"
},
"monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/pyenv/blobs/sha256:467da6451af0f41b32cd1d851573f059e53c9ed3f23cbd9ccc0c356bd341989f",
"sha256": "467da6451af0f41b32cd1d851573f059e53c9ed3f23cbd9ccc0c356bd341989f"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/pyenv/blobs/sha256:7020e8bbede18f41c3e3a1520d845c2675f50fa8b758e020b044980d5aa2e13d",
"sha256": "7020e8bbede18f41c3e3a1520d845c2675f50fa8b758e020b044980d5aa2e13d"
}
}
}
},
"yq": {
"version": "4.44.2",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_sonoma": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/yq/blobs/sha256:977679430d5dafca5fcb26f8c0f085ca4d6b0378a8ba6e948a4bf77ac210093d",
"sha256": "977679430d5dafca5fcb26f8c0f085ca4d6b0378a8ba6e948a4bf77ac210093d"
},
"arm64_ventura": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/yq/blobs/sha256:398c8ab340dbff5808bbd4b03b9abe6c6c2898577cd1a01d276bee8750749519",
"sha256": "398c8ab340dbff5808bbd4b03b9abe6c6c2898577cd1a01d276bee8750749519"
},
"arm64_monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/yq/blobs/sha256:308f642333ed2b98edc08cd9949a4be30b68077e4a094cc44388f1a5c42e5e5c",
"sha256": "308f642333ed2b98edc08cd9949a4be30b68077e4a094cc44388f1a5c42e5e5c"
},
"sonoma": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/yq/blobs/sha256:6e5ef90594c34eaff5beb3474d28a12dc593f63695518b2e762ef837323a6ffa",
"sha256": "6e5ef90594c34eaff5beb3474d28a12dc593f63695518b2e762ef837323a6ffa"
},
"ventura": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/yq/blobs/sha256:1ffca458716ecbce38c8c66758af3dc3b2e365299305ba5c5ce9e5fa604ffd61",
"sha256": "1ffca458716ecbce38c8c66758af3dc3b2e365299305ba5c5ce9e5fa604ffd61"
},
"monterey": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/yq/blobs/sha256:03059d9e8e1fd024e4dd27d72e82b2f5b38fae67a0d0c0e72d8fd79ac68a337c",
"sha256": "03059d9e8e1fd024e4dd27d72e82b2f5b38fae67a0d0c0e72d8fd79ac68a337c"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/yq/blobs/sha256:03a1e8274841cb3122204e9e637bcf81b393de0efd8cc17a3201dea362a29808",
"sha256": "03a1e8274841cb3122204e9e637bcf81b393de0efd8cc17a3201dea362a29808"
}
}
}
}
},
"cask": {
"alacritty": {
"version": "0.13.2",
"options": {
"full_name": "alacritty"
}
},
"font-jetbrains-mono-nerd-font": {
"version": "3.2.1",
"options": {
"full_name": "font-jetbrains-mono-nerd-font"
}
}
}
},
"system": {
"macos": {
"monterey": {
"HOMEBREW_VERSION": "4.3.12",
"HOMEBREW_PREFIX": "/usr/local",
"Homebrew/homebrew-core": "api",
"CLT": "14.2.0.0.1.1668646533",
"Xcode": "14.2",
"macOS": "12.7.5"
}
}
}
}
30 changes: 17 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# caseutil ⇄ 🐍🐫🍢
[![license](https://img.shields.io/github/license/makukha/caseutil.svg)](https://github.com/makukha/caseutil/blob/main/LICENSE)
[![Tests](https://raw.githubusercontent.com/makukha/caseutil/0.6.0/docs/badge/tests.svg)](https://github.com/makukha/caseutil)
[![Coverage](https://raw.githubusercontent.com/makukha/caseutil/0.6.0/docs/badge/coverage.svg)](https://github.com/makukha/caseutil)
[![Tests](https://raw.githubusercontent.com/makukha/caseutil/0.6.1/docs/badge/tests.svg)](https://github.com/makukha/caseutil)
[![Coverage](https://raw.githubusercontent.com/makukha/caseutil/0.6.1/docs/badge/coverage.svg)](https://github.com/makukha/caseutil)
[![pypi](https://img.shields.io/pypi/v/caseutil.svg)](https://pypi.python.org/pypi/caseutil)
[![versions](https://img.shields.io/pypi/pyversions/caseutil.svg)](https://pypi.org/project/caseutil)

Expand All @@ -20,7 +20,7 @@ Case convert and verify for Python: snake_case, camelCase, kebab-case, and more.

## Supported Cases

| case name | example | functions |
| Case | Example | Functions |
|-------------|------------------|--------------------------|
| snake_case | my_variable_name | `is_snake`, `to_snake` |
| CONST_CASE | MY_VARIABLE_NAME | `is_const`, `to_const` |
Expand Down Expand Up @@ -115,25 +115,29 @@ For custom separators, use `words()` function:
Only ASCII names are supported. Unicode support is planned.


## Developer's Corner
## Developer Notes

### On Mac OS X
### Mac OS X

Requires Docker and Homebrew.
This project requires [Homebrew](https://brew.sh). Other tools like [PDM](https://pdm-project.org), [Tox](https://tox.wiki), and even [Alacritty](https://alacritty.org), will be installed automatically.

```bash
git clone https://github.com/makukha/caseutil.git
brew install go-task
task init
cd caseutil
brew bundle
task init install
```

### Testing
### Operations

Tox for all supported Python versions and coverage included.
| Command | Description |
|----------------|-------------------------------|
| `task init` | Initialize system environment |
| `task install` | Install Python environment |
| `task test` | Run tests |
| `task version` | Bump project version |
| `task publish` | Publish package on PyPi |

```bash
task test
```

### Plans

Expand Down
Loading

0 comments on commit d3eb8de

Please sign in to comment.