Skip to main content

An updater for OpenCPI Projects

Project description

ocpiupdate - An updater for OpenCPI projects

pypi release gitlab pre-commit

ocpiupdate updates OpenCPI Projects to use style associated with newer versions of OpenCPI.

For example:

  • Using <worker>-<model>.xml for the Worker Description files, instead of <worker>.xml.
  • Using <component>.comp/<component>-comp.xml for Component Specification files instead of specs/<component>[-_]spec.xml.
  • Using xml files instead of Makefiles.

Dependencies

This library requires Python 3.11 or newer. This means it doesn't support the default system python3 install on Ubuntu 20.04 or Ubuntu 22.04.

If you use a system with Python 3.10 or older, you need to either:

  • Install a newer python3 just for this library.
    • I'd recommend using a tool like uv.
  • Download and run the containerised version.

Installation

pip

You can install the latest release from PyPi:

pip install ocpiupdate

Or, you can install this repository directly:

# Installs `develop` branch
pip install git+https://gitlab.com/dawalters/ocpiupdate

# Installs `v0.4.1` branch
pip install git+https://gitlab.com/dawalters/ocpiupdate@v0.4.1

Issues on Ubuntu 20.04 and 22.04

Ubuntu 20.04 and 22.04 experience segfaults when using the pre-compiled wheels for tree-sitter-make that download from PyPi.

This problem is avoidable by instructing pip to install tree-sitter-make from source. Unfortunately the source is missing some required include files. This is fixable by coping the headers locally before installing:

git clone https://github.com/Freed-Wu/tree-sitter-make /tmp/tree-sitter-make
cp -rf /tmp/tree-sitter-make/src/tree_sitter /usr/local/include/.

# For `pip` when installing just `ocpiupdate
pip3 install --no-binary tree-sitter-make ocpiupdate

# Or for `uv` when developing for `ocpiupdate`
uv sync --no-binary-package tree-sitter-make

Note: these headers are specific to tree-sitter-make and could cause conflicts when building other tree sitter bindings.

docker or podman

The containers directory contains a variety of containers, relying only on a local installation of docker or podman.

You can download built containers from the Gitlab Container Registry. This will happen automatically when a registry image is run:

project_directory=/path/to/project/root

container_name=registry.gitlab.com/dawalters/ocpiupdate:v0.4.1

additional_arguments="--dry-run --verbose"

# for `podman`, just replace `docker`
docker run \
    --volume "$project_directory":"$project_directory" \
    --workdir "$project_directory" \
    "$container_name" \
    "$additional_arguments"

See containers/scripts/ocpiupdate.sh for a more complex example.

Source tarball

You can download source releases from the Gitlab Releases page.

Configuration

Until documentation becomes available, you can follow the release posts available on the OpenCPI forum.

This includes examples of usage, and discussion of how to write configuration files.

Disclaimer

This repository has no affiliation with OpenCPI.

The maintainer doesn't maintain OpenCPI.

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

ocpiupdate-0.4.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocpiupdate-0.4.1-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file ocpiupdate-0.4.1.tar.gz.

File metadata

  • Download URL: ocpiupdate-0.4.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for ocpiupdate-0.4.1.tar.gz
Algorithm Hash digest
SHA256 4e3a35d5ac2e86abaeea74086065416d972db6d60216848fa44155feb4a52817
MD5 d300051c8d018c57a3a1a3c8e86df5ec
BLAKE2b-256 75cbb6ff2a976926e886a3c0a19ff9adebf7f2324b2a1e089830c7d804a8b065

See more details on using hashes here.

File details

Details for the file ocpiupdate-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: ocpiupdate-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for ocpiupdate-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c91433d50626b6d4612254965cf1ef5672d4479215928f713fc83178f6cb0e3
MD5 92da6ce93fd7956fd269a92b2b19076f
BLAKE2b-256 0ab6efb03c4328311ed1e6c20b5f4bb8829a4728b2ddcba13a4452c0884da6ec

See more details on using hashes here.

Supported by

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