Toolbox Python per l'analisi dei dati di laboratorio
Project description
mespy
Documentation: giancarmine-sparso.github.io/mespy
Small Python toolbox for mechanics laboratory data analysis.
mespy started as a set of helper functions that kept reappearing across mechanics lab notebooks and classroom scripts: loading CSV measurements, computing descriptive and weighted statistics, plotting histograms, and running linear fits with uncertainties. The library brings those recurring tasks together into a single typed package with a small public API that is easy to use in notebooks, scripts, and teaching material.
What It Provides
- CSV loading with explicit missing-data policies
- Descriptive and weighted statistics for one-dimensional data
- Histogram plotting for quick exploratory analysis
- Weighted linear fitting with a typed result object
- Clear validation errors instead of silent
nanpropagation
Public API
The root package exports:
load_csvmedianweighted_meanvariancecovariancestandard_deviationhistogramlin_fit
The root namespace stays intentionally small. Additional public types, such as mespy.fit_utils.LinearFitResult, live in submodules.
Installation
mespy requires Python >= 3.12.
pip install git+https://github.com/giancarmine-sparso/mespy.git
Development Setup
To set up a local development environment:
Unix / macOS
git clone https://github.com/giancarmine-sparso/mespy
cd mespy
make setup
To activate the virtual environment manually:
source .venv/bin/activate
Windows
git clone https://github.com/giancarmine-sparso/mespy
cd mespy
python -m venv .venv
.venv\Scripts\activate
pip install -e ".[dev]"
Documentation
The Sphinx source lives in docs/source, and the generated site is written to docs/build/html.
Build the documentation with:
make docs
The generated site includes both English and Italian outputs, with English as the default landing page. The documentation also includes usage examples for the available functions. Complete usage workflows and notebooks are available in docs/source/examples.
Project Structure
mespy/
├── .github/
│ └── workflows/ # automation for documentation publishing
├── data/
│ └── reference/ # reference datasets used by tests and examples
├── docs/
│ ├── source/ # Sphinx source, examples, and translations
│ ├── Makefile
│ └── make.bat
├── figures/ # exported example figures
├── src/
│ └── mespy/ # library package
├── tests/ # pytest suite
├── tools/ # release and smoke-test helpers
├── LICENSE
├── Makefile # local setup, testing, release, and docs tasks
├── pyproject.toml # package metadata and dependencies
├── README.md
└── uv.lock
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mespy-1.1.3.tar.gz.
File metadata
- Download URL: mespy-1.1.3.tar.gz
- Upload date:
- Size: 22.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cd11dd08c9773d291a2ff44f4c231fd6abc4a617b69672ff92980307f224148
|
|
| MD5 |
fafb150fc23e79a0ce6fb58ac4e4f329
|
|
| BLAKE2b-256 |
9bccdfa68afd89f83a621adcef87f5e2dbc518878aa74d6703368d67b0f97dfb
|
File details
Details for the file mespy-1.1.3-py3-none-any.whl.
File metadata
- Download URL: mespy-1.1.3-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
733e40eaf4a47042b31c6562ba08d0077406a58fed9d113e0cbab5d4a5543fcc
|
|
| MD5 |
7fb47799476427e86981cd209392fa7e
|
|
| BLAKE2b-256 |
4105eb80348f2cc3d1249b97851788ee93fc126b3f138c957bc11e5860aaf17b
|