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.2.0.tar.gz
(47.5 kB
view details)
Built Distribution
File details
Details for the file picarlo-0.2.0.tar.gz
.
File metadata
- Download URL: picarlo-0.2.0.tar.gz
- Upload date:
- Size: 47.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb6059f115bd9968e0252a9932baf097d1a013456a0524e38ab70f052a4c853b |
|
MD5 | 78644f719764e7d2a7091f1d1e48f7cb |
|
BLAKE2b-256 | e81c9afbb3ed6034e0094ed473ddafb6f07f1d027348f9cc2acee2c610f90bf1 |
File details
Details for the file picarlo-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: picarlo-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd66c4b20ef25964f253f9534daf25b012ba91b8b1dc6606ec4bc78a5e55e2ce |
|
MD5 | 7c97182c31215ad86b781921b54cc8d8 |
|
BLAKE2b-256 | 0b4e4666577d4cad6af63127f4997ab0f035862ae24b73e6b1c580dc00d43629 |