Skip to main content

Transport for the North Logo

CAF.base

CAF Status - Pre-Alpha Supported Python versions Latest release Conda

Coverage Testing Badge Documentation Status code style: black

The Common Analytical Framework (CAF) Base (formerly caf.core) is a collection of core classes and definitions used across the CAF framework of models and tools. The goal of the CAF is to create easily implementable and adaptable transport planning and appraisal functionalities. It's the beginning of a project to make a lot of the useful stuff from NorMITs Demand more widely available and easily accessible.

Caf.base is a successor to the core module within NorMITs Demand. The class central to caf.base is the DVector, which is used for storing and manipulating vectors often used in transport modelling and analysis, such as trip end and land use data. See documentation on the DVector, and it's constituent parts ZoningSystem and Segmentation for more details.

Common Analytical Framework

This package is sits within the Common Analytical Framework (CAF), which is a collaboration between transport bodies in the UK to develop and maintain commonly used transport analytics and appraisal tools.


Contributing

CAF.base happily accepts contributions.

The best way to contribute to this project is to go to the issues tab and report bugs or submit a feature request. This helps CAF.base become more stable and full-featured. Please check the closed bugs before submitting a bug report to see if your question has already been answered.

Please see our contribution guidelines for details on contributing to the codebase or documentation.

Documentation

Documentation is created using Sphinx and is hosted online at cafbase.readthedocs.

The documentation can be built locally once all the docs requirements (docs/requirements.txt) are installed into your Python environment.

The provided make batch file, (inside the docs folder), allow for building the documentation in various target formats. The command for building the documentation is make {target} (called from within docs/), where {target} is the type of documentation format to build. A full list of all available target formats can be seen by running the make command without any arguments but the two most common are detailed below.

HTML

The HTML documentation (seen on Read the Docs) can be built using the make html command, this will build the web-based documentation and provide an index.html file as the homepage, docs/build/html/index.html.

PDF

The PDF documentation has some other requirements before it can be built as Sphinx will first build a LaTeX version of the documentation and then use an installed TeX distribution to build the PDF from those. If you already have a TeX distribution setup then you can build the PDF with make latexpdf, otherwise follow the instructions below.

Installing LaTeX on Windows is best done using MiKTeX, as this provides a simple way of handling any additional TeX packages. Details of other operating systems and TeX distributions can be found on the Getting LaTeX page on LaTeX's website.

MiKTeX provides an installer on its website miktex.org/download, which will run through the process of getting it installed and setup. In addition to MiKTeX the specific process Sphinx uses for building PDFs is Latexmk, which is a Perl script and so requires Perl to be installed on your machine, this can be done with an installer provided by Strawberry Perl.

Once MiKTex and Perl are installed you are able to build the PDF from the LaTeX files, Sphinx provides a target (latexpdf) which builds the LaTeX files then immediately builds the PDF. When running make latexpdf MiKTeX may ask for permission to installed some required TeX packages. Once the command has finished the PDF will be located at docs/build/latex/cafbase.pdf.

Maintainers

  • Isaac Scott (isaac-tfn)
  • Matt Buckley (MattBuckley-TfN)

Credit

This project was created using the Common Analytical Framework cookiecutter template found here: https://github.com/Transport-for-the-North/cookiecutter-caf

Metadata

Release files for caf.base 0.5.0

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

Source distribution (sdist)

Source distribution for caf.base 0.5.0
File Size Uploaded
caf_base-0.5.0.tar.gz 102.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for caf.base 0.5.0
File Interpreter ABI Platform
caf_base-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 199.8 kB

Release files / caf_base-0.5.0.tar.gz

Download URL caf_base-0.5.0.tar.gz
Size 102.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c7232b4bff5e643b534e51249f49a04ad9b0c90e33f91970e76a6979280637b6
BLAKE2b-256 checksum
How to use checksums
a3b7cb9b2e3ff3c3e63d7b5f0940911972556c75b8a3ed865ced6f7b9a7c6d5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release files / caf_base-0.5.0-py3-none-any.whl

Download URL caf_base-0.5.0-py3-none-any.whl
Size 97.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df7a08f567f2958eee4786d00bb8df9debb175498dec5a87d239a922c1049f91
BLAKE2b-256 checksum
How to use checksums
4352d465ed6509eb896945aaab354cd13fa36d8c7a4d7e5a274277413d9c7c3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

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