ocpiupdate


Nameocpiupdate JSON
Version 0.4.2 PyPI version JSON
download
home_pageNone
SummaryAn updater for OpenCPI Projects
upload_time2024-12-23 01:29:53
maintainerDom Walters
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords ocpi opencpi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # `ocpiupdate` - An updater for OpenCPI projects

[![pypi](https://img.shields.io/pypi/v/ocpiupdate)](https://pypi.org/project/ocpiupdate/)
[![release](https://gitlab.com/dawalters/ocpiupdate/-/badges/release.svg)](https://gitlab.com/dawalters/ocpiupdate/-/releases)
[![gitlab](https://gitlab.com/dawalters/ocpiupdate/badges/develop/pipeline.svg)](https://gitlab.com/dawalters/ocpiupdate/-/pipelines?page=1&scope=all&ref=develop)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/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 `Makefile`s.

## 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`](https://docs.astral.sh/uv).
- Download and run the containerised version.

## Installation

### `pip`

You can install the latest release from [PyPi](https://pypi.org/project/ocpiupdate):

```bash
pip install ocpiupdate
```

Or, you can install this repository directly:

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

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

#### 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](https://gitlab.com/dawalters/ocpiupdate/-/issues/23#note_2268462996).
This is fixable by coping the headers locally before installing:

```bash
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`](https://gitlab.com/dawalters/ocpiupdate/-/tree/develop/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](https://gitlab.com/dawalters/ocpiupdate/container_registry).
This will happen automatically when a registry image is run:

```bash
project_directory=/path/to/project/root

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

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`](https://gitlab.com/dawalters/ocpiupdate/-/tree/develop/containers/scripts/ocpiupdate.sh)
for a more complex example.

### Source tarball

You can download source releases from the
[Gitlab Releases page](https://gitlab.com/dawalters/ocpiupdate/-/releases).

## Configuration

Until documentation becomes available, you can follow the release posts
available on
[the OpenCPI forum](https://opencpi.dev/t/script-to-automate-updating-aspects-of-older-opencpi-projects).

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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ocpiupdate",
    "maintainer": "Dom Walters",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "ocpi, opencpi",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/52/9c/9e5cda3ffd1596dfb7383edca05adfba27f2d9cc109619b4b806d5d78f86/ocpiupdate-0.4.2.tar.gz",
    "platform": null,
    "description": "# `ocpiupdate` - An updater for OpenCPI projects\n\n[![pypi](https://img.shields.io/pypi/v/ocpiupdate)](https://pypi.org/project/ocpiupdate/)\n[![release](https://gitlab.com/dawalters/ocpiupdate/-/badges/release.svg)](https://gitlab.com/dawalters/ocpiupdate/-/releases)\n[![gitlab](https://gitlab.com/dawalters/ocpiupdate/badges/develop/pipeline.svg)](https://gitlab.com/dawalters/ocpiupdate/-/pipelines?page=1&scope=all&ref=develop)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n\n`ocpiupdate` updates OpenCPI Projects to use style associated with newer\nversions of OpenCPI.\n\nFor example:\n\n- Using `<worker>-<model>.xml` for the Worker Description files, instead of\n  `<worker>.xml`.\n- Using `<component>.comp/<component>-comp.xml` for Component Specification\n  files instead of `specs/<component>[-_]spec.xml`.\n- Using `xml` files instead of `Makefile`s.\n\n## Dependencies\n\nThis library requires Python 3.11 or newer. This means it doesn't support the\ndefault system `python3` install on Ubuntu 20.04 or Ubuntu 22.04.\n\nIf you use a system with Python 3.10 or older, you need to either:\n\n- Install a newer `python3` just for this library.\n    - I'd recommend using a tool like [`uv`](https://docs.astral.sh/uv).\n- Download and run the containerised version.\n\n## Installation\n\n### `pip`\n\nYou can install the latest release from [PyPi](https://pypi.org/project/ocpiupdate):\n\n```bash\npip install ocpiupdate\n```\n\nOr, you can install this repository directly:\n\n```bash\n# Installs `develop` branch\npip install git+https://gitlab.com/dawalters/ocpiupdate\n\n# Installs `v0.4.2` branch\npip install git+https://gitlab.com/dawalters/ocpiupdate@v0.4.2\n```\n\n#### Issues on Ubuntu 20.04 and 22.04\n\nUbuntu 20.04 and 22.04 experience segfaults when using the pre-compiled wheels\nfor `tree-sitter-make` that download from PyPi.\n\nThis problem is avoidable by instructing `pip` to install `tree-sitter-make`\nfrom source. Unfortunately the source is\n[missing some required include files](https://gitlab.com/dawalters/ocpiupdate/-/issues/23#note_2268462996).\nThis is fixable by coping the headers locally before installing:\n\n```bash\ngit clone https://github.com/Freed-Wu/tree-sitter-make /tmp/tree-sitter-make\ncp -rf /tmp/tree-sitter-make/src/tree_sitter /usr/local/include/.\n\n# For `pip` when installing just `ocpiupdate\npip3 install --no-binary tree-sitter-make ocpiupdate\n\n# Or for `uv` when developing for `ocpiupdate`\nuv sync --no-binary-package tree-sitter-make\n```\n\nNote: these headers are specific to `tree-sitter-make` and could cause\nconflicts when building other tree sitter bindings.\n\n### `docker` or `podman`\n\nThe [`containers`](https://gitlab.com/dawalters/ocpiupdate/-/tree/develop/containers)\ndirectory contains a variety of containers, relying only on a local\ninstallation of `docker` or `podman`.\n\nYou can download built containers from the\n[Gitlab Container Registry](https://gitlab.com/dawalters/ocpiupdate/container_registry).\nThis will happen automatically when a registry image is run:\n\n```bash\nproject_directory=/path/to/project/root\n\ncontainer_name=registry.gitlab.com/dawalters/ocpiupdate:v0.4.2\n\nadditional_arguments=\"--dry-run --verbose\"\n\n# for `podman`, just replace `docker`\ndocker run \\\n    --volume \"$project_directory\":\"$project_directory\" \\\n    --workdir \"$project_directory\" \\\n    \"$container_name\" \\\n    \"$additional_arguments\"\n```\n\nSee [`containers/scripts/ocpiupdate.sh`](https://gitlab.com/dawalters/ocpiupdate/-/tree/develop/containers/scripts/ocpiupdate.sh)\nfor a more complex example.\n\n### Source tarball\n\nYou can download source releases from the\n[Gitlab Releases page](https://gitlab.com/dawalters/ocpiupdate/-/releases).\n\n## Configuration\n\nUntil documentation becomes available, you can follow the release posts\navailable on\n[the OpenCPI forum](https://opencpi.dev/t/script-to-automate-updating-aspects-of-older-opencpi-projects).\n\nThis includes examples of usage, and discussion of how to write configuration\nfiles.\n\n## Disclaimer\n\nThis repository has no affiliation with OpenCPI.\n\nThe maintainer doesn't maintain OpenCPI.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "An updater for OpenCPI Projects",
    "version": "0.4.2",
    "project_urls": {
        "Repository": "https://gitlab.com/dawalters/ocpiupdate"
    },
    "split_keywords": [
        "ocpi",
        " opencpi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4060b134837869f59f55ee96b475d9bcc3e0e49c8e9e289a9ddffed0896d020e",
                "md5": "c799bd8f54b72926053fb449428ab77a",
                "sha256": "c8adb33beb6383f087d6d7c53c3059e9090aeeca6ee082388b717b47068835cc"
            },
            "downloads": -1,
            "filename": "ocpiupdate-0.4.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c799bd8f54b72926053fb449428ab77a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 22630,
            "upload_time": "2024-12-23T01:29:51",
            "upload_time_iso_8601": "2024-12-23T01:29:51.966152Z",
            "url": "https://files.pythonhosted.org/packages/40/60/b134837869f59f55ee96b475d9bcc3e0e49c8e9e289a9ddffed0896d020e/ocpiupdate-0.4.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "529c9e5cda3ffd1596dfb7383edca05adfba27f2d9cc109619b4b806d5d78f86",
                "md5": "77a72c55b6cb97f9cde76d68fbd9e779",
                "sha256": "168d637644c7a4c0dc2ef60d783434931807fb5e4397be1978ec86318521fa32"
            },
            "downloads": -1,
            "filename": "ocpiupdate-0.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "77a72c55b6cb97f9cde76d68fbd9e779",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 17310,
            "upload_time": "2024-12-23T01:29:53",
            "upload_time_iso_8601": "2024-12-23T01:29:53.970413Z",
            "url": "https://files.pythonhosted.org/packages/52/9c/9e5cda3ffd1596dfb7383edca05adfba27f2d9cc109619b4b806d5d78f86/ocpiupdate-0.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-23 01:29:53",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "dawalters",
    "gitlab_project": "ocpiupdate",
    "lcname": "ocpiupdate"
}
        
Elapsed time: 0.41183s