Skip to main content

A Python library to study linear algebra

The goal of the lalib project is to create a library written in pure Python (incl. the standard library) and thereby learn about linear algebra by reading and writing code.

PyPI: Package version PyPI: Supported Python versions PyPI: Number of monthly downloads

Documentation: Status Test suite: Status Test coverage: codecov Code style: black Type checking: mypy Code linting: ruff

Installation

This project is published on PyPI. To install it, open any Python prompt and type:

pip install lalib

You may want to do so within a virtual environment or a Jupyter notebook.

Contributing & Development

This project is open for any kind of contribution, be it by writing code for new features or bugfixes, or by raising issues. All contributions become open-source themselves, under the MIT license.

Local Develop Environment

In order to play with the lalib codebase, you need to set up a develop environment on your own computer.

First, get your own copy of this repository:

git clone git@github.com:webartifex/lalib.git

While lalib comes without any dependencies except core Python and the standard library for the user, we assume a couple of packages and tools be installed to ensure code quality during development. These can be viewed in the pyproject.toml file and are managed with poetry which needs to be installed as well. poetry also creates and manages a virtual environment with the develop tools, and pins their exact installation versions in the poetry.lock file.

To replicate the project maintainer's develop environment, run:

poetry install

Maintenance Tasks

We use nox to run the test suite and other maintenance tasks during development in isolated environments. nox is similar to the popular tox. It is configured in the noxfile.py file. nox is assumed to be installed as well and is therefore not a project dependency.

To list all available tasks, called sessions in nox, simply run:

nox --list or nox -l for short

To execute all default tasks, simply invoke:

nox

This includes running the test suite for the project's main Python version (i.e., 3.12).

Code Formatting & Linting

We follow Google's Python style guide and include type hints where possible.

During development, nox -s format and nox -s lint may be helpful. Both can be speed up by re-using a previously created environment with the -R flag.

The first task formats all source code files with autoflake, black, and isort.

The second task lints all source code files with flake8, mypy, and ruff. flake8 is configured with a couple of plug-ins.

You may want to install the pre-commit hooks that come with the project:

nox -s pre-commit-install

Then, the linting and testing occurs automatically before every commit.

Test Suite

We use pytest to obtain confidence in the correctness of lalib. To run the tests for all supported Python versions in isolated (and perfectly reproducable) environments, invoke:

nox -s test

Branching Strategy

The branches in this repository follow the GitFlow model. Feature branches are rebased onto the develop branch before being merged. Whereas a rebase makes a simple fast-forward merge possible, all merges are made with explicit and empty merge commits. This ensures that past branches remain visible in the logs, for example, with git log --graph.

Versioning

The version identifiers adhere to a subset of the rules in PEP440 and follow Semantic Versioning. So, releases to PyPI come in the popular major.minor.patch format. The specific rules for this project are explained here.

Releases

v0.4.2, 2024-09-10

  • This release provides no functionality
  • Its purpose is to (re-)claim the lalib name on PyPI
  • We can not start with v0.1.0 because we already used this when learning to use PyPI years back

Metadata

Release files for lalib 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lalib 0.4.2
File Size Uploaded Provenance Actions
lalib-0.4.2.tar.gz 7.4 kB Without provenance Details for lalib-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lalib 0.4.2
File Interpreter ABI Platform Actions
lalib-0.4.2-py3-none-any.whl Python 3 none any Details for lalib-0.4.2-py3-none-any.whl

Total release size: 12.2 kB

Release files / lalib-0.4.2.tar.gz

Download URL lalib-0.4.2.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f6dda9c3f12226da3a41f345857756832141bcf4bde694161b1da61d055d2abb
BLAKE2b-256 checksum
How to use checksums
81ef839fcf4e0d1d51bc6c1a73e3dd38a2391a1f2bfe3432e5c7950595d71709
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.5 Linux/6.5.0-1025-azure

Release files / lalib-0.4.2-py3-none-any.whl

Download URL lalib-0.4.2-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af27539c7593a4e52d9b555ce5a027b5378cafe92edb2257fd1da51fd4268e40
BLAKE2b-256 checksum
How to use checksums
05183764fe9b353f01219cc6129886c4148611a10850d2ebdd3daa4c14fcdd91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.5 Linux/6.5.0-1025-azure

Security for lalib 0.4.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page