A tool to perform upgrades of AiiDA plugins to new aiida-core versions.
Project description
aiida-upgrade
In Development!
A tool to aide upgrades of plugins to new aiida-core versions
Usage
To use the command line tool, it is recommended to install via pipx:
$ pipx install aiida-upgrade
Once installed, you can simply run aiida-upgrade
on any PATH
, which can be a single file or a directory:
$ aiida-upgrade --help
Usage: aiida-upgrade [OPTIONS] PATH
The command line interface of aiida-upgrade.
Options:
--help Show this message and exit.
In case PATH
is a directory, aiida-upgrade
will recursively update all .py
files inside that directory.
Supported migrations
Currently, aiida-upgrade
performs the following code refactoring:
- Look for deprecated
aiida-core
entry points loaded by plugin factories and add thecore.
prefix, see the corresponding section in the plugin migration guide. - Similarly, find and correct full deprecated entry point strings e.g.
'aiida.data:structure'
. - Remove
dict
andlist
keywords from theDict
andList
node constructors, respectively. See PR #5165 onaiida-core
, which removed the requirement of using these keywords.
Migration steps that are not (yet) supported are:
- Adding the
core.
prefix in shell scripts. - Update
'name'
to'label'
when querying for aComputer
with theQueryBuilder
. - Small changes in the API of Transport and Scheduler plugins.
- Removal of the
PluginTestCase
class.
If you find any problems with the current refactoring, or any migration steps that are missing, please let us know by opening an issue.
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
Hashes for aiida_upgrade-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50ee01acab714c7786f36d56f3a6c27c1591dcb3dce61dbe2e95f2f7f4c98470 |
|
MD5 | 93c251cf8aa641548712752d8aa8517a |
|
BLAKE2b-256 | 63bc6cc6e975a10f394f74e8474b4417813ad9beb8b5909e07445e1857f81b3a |