calculate pi via the monte carlo method
Project description
calculating pi with modern tooling
We need a few things:
- a CLI tool to specify the number of iterations and the number of cores it runs on:
picarlo --cores 4 --iterations 10000
- a library that can be imported in a notebook
basic tooling setup (runs on each commit)
-
uv self update
&uv sync
- linting/format checking:
uv run ruff check
- auto-formatting:
uv run ruff format
- type checking:
uv run pyright
- testing:
uv run pytest
, run them in parallel - integrate into pre-commit
pre-commit run --all-files
Checks
- check that the package can be installed:
uv run --with picarlo --no-project -- python -c "import picarlo"
Goal
- run from command-line (uvx)
- import lib into notebook (either via pypy or from local dist)
- published module
required
- split between dev and prod dependencies:
uv add --dev
- add a build system, hatchling in pyproject.toml
- run a build
uv build
- try maturing build backend
useful stuff
- create docstrings via LLM
- create docs from docstrings
- calculate test coverage
- tracing
release preparation
- generate changelog from commit messages
- update version indicator
- build package/wheel
- publish assets
vscode extensions
- Ruff
- TOML syntax highlighting
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
picarlo-0.3.0.tar.gz
(47.6 kB
view details)
Built Distribution
File details
Details for the file picarlo-0.3.0.tar.gz
.
File metadata
- Download URL: picarlo-0.3.0.tar.gz
- Upload date:
- Size: 47.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 809842c0834da11b1a421cacdb0cc2b0bd102b90a58384b853642c6bc6a1639a |
|
MD5 | 13cea3fa6b75044ff4a6affd0400f5c9 |
|
BLAKE2b-256 | 659f5f22bba3351a7f9e58b29695cdf2fe4e1f201b5d957cce51735f516fe9a3 |
File details
Details for the file picarlo-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: picarlo-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe46747069ad953fe0c7fecbd02ff4b339e72a83be86f67b69fd3c2d6f233d10 |
|
MD5 | dd75e9c9a2a983336c17b131f7e5e301 |
|
BLAKE2b-256 | 9af89aa8846e0eb7f51e69c921cc177aae25fe36734eda768d419dceb9895279 |