Skip to content

About

This repository contains some utility functions for the workflow orchestrator project.

Topics

Resources

Stars

2 stars

Watchers

16 watching

Forks

Repository files navigation

Network Automation Standard Library

pypi_version Supported python versions codecov

This library contains the functions and utilities that are shared by most Network Automation projects built at SURF.

Installation

To install the package from PyPI:

pip install nwa-stdlib

Development

Virtual Environment

Steps to setup a virtual environment.

Install uv and create the development environment:

uv sync --locked --group test --group dev

Run project commands through that environment with uv run, for example:

uv run pytest

Unit tests

Run the unit tests through the uv-managed environment:

uv run pytest

Pre-commit

This project uses prek, a fast drop-in replacement for pre-commit, to automatically run a number of checks before making a git commit. The same checks will be performed in the CI pipeline so this can save you some time.

prek is part of the dev dependency group, so it is available after uv sync. Go into the project root and enable it:

uv run prek install

This should output prek installed at .git/hooks/pre-commit. The next time you run git commit the hooks will validate your changes. To run the hooks manually on all files, use uv run prek run --all-files.

Set the package version

When a release version has been assigned, update the package metadata on a clean branch with uv version:

uv version 1.12.2

Specify the full version explicitly so release candidates can be represented, for example uv version 1.12.2rc1.

Supported Python versions

nwa-stdlib must support the same python versions as orchestrator-core.

Exceptions to this rule are:

  • A new python version is released: nwa-stdlib should support the new version before orchestrator-core does
  • Support for an old python version is dropped: nwa-stdlib should drop the python version after orchestrator-core does

About

This repository contains some utility functions for the workflow orchestrator project.

Topics

Resources

Stars

2 stars

Watchers

16 watching

Forks

Releases

Packages

Used by

Contributors

Languages