AnomalousLib is a Python library designed for the study of anomalous diffusion. It enables dataset generation, statistical analysis, model inference, and integrated result visualization.
Project description
AnomalousLib
AnomalousLib is a Python library designed for the study of anomalous diffusion.
It supports dataset generation, statistical analysis, model inference, and integrated result visualization.
The library is published on PyPI under the name AnomalousLib and uses Python version 3.12.10 or later.
Repository Structure
The following diagram shows the structure of the repository:
AnomalousLib
│ # Package builds
├───dist
│ # Source code
├───src
│ └───anomalouslib
│ │ # Analytical tools and metrics
│ ├───analysis
│ │ # Dataset handling and generation
│ ├───data
│ │ # Model definitions and inference
│ ├───models
│ │ # Output handling and reporting
│ ├───results
│ │ # Utility functions and helpers
│ └───utils
│ # QA and testing
└───tests
Development Setup
To test the library locally, follow these steps. All commands should be run from the root of the project, where the pyproject.toml file is located.
1. Set Up the Virtual Environment
First, create a virtual environment:
python -m venv venv
Then activate it:
- On Linux/macOS:
source venv/bin/activate
- On Windows:
.\venv\Scripts\Activate.ps1
💡 Note: To deactivate the environment at any time (on both Linux and Windows), use:
deactivate
2. Install Dependencies
Install the required libraries listed in requirements.txt:
pip install -r requirements.txt
To verify the installation, you can regenerate the requirements.txt and check for any differences:
- On Linux/macOS:
pip freeze | grep -vE "^-e |@ file://" > requirements.txt
- On Windows:
pip freeze | Select-String -NotMatch '^-e |@ file://' > requirements.txt
💡 Note: This filtering step avoids including the local installation of the library itself.
If no changes appear in the file, the setup is correct.
Local Build & Installation
1. Build the Library
Generate the distribution packages:
python -m build
2. Install the Library Locally
- First-time installation (or to force reinstall):
pip install ./dist/anomalouslib-{lib_version}-py3-none-any.whl --force-reinstall
- Subsequent updates (faster and applies only changes):
pip install --upgrade ./dist/anomalouslib-{lib_version}-py3-none-any.whl
💡 Note: Replace
{lib_version}with the actual library version, e.g.:pip install --upgrade ./dist/anomalouslib-0.1.0-py3-none-any.whl
Publishing to PyPI
To publish the package to PyPI, run:
twine upload ./dist/*
⚠️ Important: Make sure no version in the
./dist/folder has already been uploaded to PyPI.
As stated on the PyPI page, to install AnomalousLib on other environments:
pip install anomalouslib
💡 It is strongly recommended not to install the public PyPI version in the same local environment to avoid confusion with the local development version.
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 anomalouslib-0.2.2.tar.gz.
File metadata
- Download URL: anomalouslib-0.2.2.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b513cc7b60e956fc313bb1bf573be043f4f008821aeb21e879a40259929c9459
|
|
| MD5 |
3e4f987399f747213589851a443b2669
|
|
| BLAKE2b-256 |
a84498e8a411fb72b57f2b0d2e57f21f2cb35a58d20c990c91df5dad8a31c2f5
|
File details
Details for the file anomalouslib-0.2.2-py3-none-any.whl.
File metadata
- Download URL: anomalouslib-0.2.2-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f374c2d5322015f4878eccee6f4043d3ad232beda60e4ff18b71b7c0a4d24e20
|
|
| MD5 |
dad8bc21c599b1f778ca81671c94c028
|
|
| BLAKE2b-256 |
65f5d10bfcc3b4cb2dde8bc54459161fddcc0cc940bb7329101eb9123fb5c418
|