Skip to main content

A set of tools for building models at the TransLink Forecasting Team

Project description

TransLink's Python Tools

Python tools to read data, yaml configuration, logging, and much more.

Getting Started

To use the tools within this package, you must first install this package:

Method 1: precompiled wheel

Install with precompiled wheels from PyPI is the fastest way to get started:

pip install tlpytools --upgrade

Method 2: build from source

Build and install from source allow you to access the latest version or a specific version without any available precompiled wheels:

git clone https://github.com/TransLinkForecasting/tlpytools.git --depth=1
cd tlpytools
python -m pip install --upgrade build
python -m build
pip install dist/tlpytools-0.1.5-py3-none-any.whl --upgrade --force-reinstall

Method 3: editable install for development

If you are developing and testing tlpytools to work with downstream code, you may install the package as an editable install. This allows you to continuously make changes to the tlpytools package in your local development folder, while integrating these changes in real time with your downstream code.

git clone https://github.com/TransLinkForecasting/tlpytools.git --depth=1
cd tlpytools
pip install -e ./

Note that after this installation, any code changes you make within the tlpytools folder will take effect immeidately witin your development environment.

Usage

After installation, you can access the tlpytools namespace within your data project and importing parts of the package in your python script:

from tlpytools.log import logger
from tlpytools.config import run_yaml

Build and Distribution Process

  1. Review setup.cfg and pyproject.toml to ensure dependencies and versions are up to date.
  2. Generate distribution archives
conda activate base
python -m pip install --upgrade build
python -m build
  1. Upload to PyPI
python -m pip install --upgrade twine
python -m twine upload dist/*

Review the newly upload package on https://test.pypi.org/project/tlpytools/

If you are having problem authenticating to PyPI, you should register on PyPI and create a new token. Set up the token in ~/.pypirc by following package distribution guide

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tlpytools-0.1.5.tar.gz (12.0 kB view hashes)

Uploaded Source

Built Distribution

tlpytools-0.1.5-py3-none-any.whl (11.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page