Small CLI to help users migrate from plenoptic 1.x to 2.0
Project description
plenoptic-migrate
Migrate from plenoptic 1.x to 2.0.
Rewrites all occurrences of old API names to their new equivalents, in-place, for each file passed as a command-line argument. After rewriting, reports any deprecated usages that could not be automatically resolved and must be updated manually.
This tool only changes fully resolvable plenoptic objects. For example, it will
replace plenoptic.synth.Metamer with plenoptic.Metamer, but will not
touch from plenoptic.synthesize import Metamer.
We overwrite all files in-place. We therefore recommend that you track your files
using git or make use of the --backup-dir option to create a backup. You are then
encouraged to double-check all the changes! This tool worked for the developers of
plenoptic but has not been tested on a wide variety of setups.
Installation
The recommended way to use the tool is via uvx or pipx, both of which will create a temporary isolated virtual environment for the tool:
$ pipx run plenoptic-migrate --help
or
$ uvx plenoptic-migrate --help
Module aliases
The tool handles the standard module aliases used in plenoptic's tutorials and examples:
import plenoptic as po
import plenoptic.synthesize as synth
import plenoptic.simulate as simul
Non-standard aliases (e.g. import plenoptic as plen) are not handled and
must be updated manually.
Usage:
$ plenoptic-migrate [OPTIONS] PATHS...
Arguments:
PATHS...: Directory or text files to update (e.g., .py scripts, .ipynb notebooks, .md files). Non-text files will be skipped. [required]
Options:
--backup-dir PATH: Path where we will create a directory to copy existing paths into. Must not exist.--help: Show this message and exit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plenoptic_migrate-0.2.0.tar.gz.
File metadata
- Download URL: plenoptic_migrate-0.2.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c84940ac3527f4dc651d0c79827562108e8c75c2516d36c313077b0b585ec080
|
|
| MD5 |
11b067c164dce2abd8a4b42965bd45ca
|
|
| BLAKE2b-256 |
2a107fca22269758863a3d8be1bbaa97df6ddf9ac8f57b18e2286e1357e21d36
|
Provenance
The following attestation bundles were made for plenoptic_migrate-0.2.0.tar.gz:
Publisher:
deploy.yml on plenoptic-org/plenoptic-migrate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plenoptic_migrate-0.2.0.tar.gz -
Subject digest:
c84940ac3527f4dc651d0c79827562108e8c75c2516d36c313077b0b585ec080 - Sigstore transparency entry: 1359168775
- Sigstore integration time:
-
Permalink:
plenoptic-org/plenoptic-migrate@133f3d2dd14448a7bfc7c7828ccd57b1a776c3b5 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/plenoptic-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@133f3d2dd14448a7bfc7c7828ccd57b1a776c3b5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file plenoptic_migrate-0.2.0-py3-none-any.whl.
File metadata
- Download URL: plenoptic_migrate-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8eb751d4a4716decb69135c2eab7262f779b61941b7923c71b7a158ea3f001a
|
|
| MD5 |
22bb77530f53bf4d9f4e74d39ab2c6c0
|
|
| BLAKE2b-256 |
32ae5e08d228a4d57061d456113bb02f32ff9d002298eb4ce46b4ac451175fa7
|
Provenance
The following attestation bundles were made for plenoptic_migrate-0.2.0-py3-none-any.whl:
Publisher:
deploy.yml on plenoptic-org/plenoptic-migrate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plenoptic_migrate-0.2.0-py3-none-any.whl -
Subject digest:
d8eb751d4a4716decb69135c2eab7262f779b61941b7923c71b7a158ea3f001a - Sigstore transparency entry: 1359168783
- Sigstore integration time:
-
Permalink:
plenoptic-org/plenoptic-migrate@133f3d2dd14448a7bfc7c7828ccd57b1a776c3b5 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/plenoptic-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@133f3d2dd14448a7bfc7c7828ccd57b1a776c3b5 -
Trigger Event:
release
-
Statement type: