irdb.publish module#
Publish and upload irdb packages.
- class irdb.publish.Password(value)#
Bases:
objectUsed for secure pwd promt.
- DEFAULT = 'Prompt if not specified'#
- irdb.publish.confirm(pkg_name: str) bool#
Ask for explicit user confirmation before pushing stable package.
- irdb.publish.main()#
Execute main CLI script.
- irdb.publish.make_package(pkg_name: str, stable: bool = False, keep_version: bool = False) str#
Make a package (todo: update this description!).
By default, make_package updates the version to today. keep_version can be set to True in order to use the existing version. This is a step towards a Continuous Deployment setup, where a new version is created first, and then a package will be uploaded (semi-)automatically.
In practice, the keep_version=True functionality can also be used to retroactively upload a package that for some reason was not successfully uploaded.
- Parameters:
pkg_name (str) – Name of the package (duh).
stable (bool, optional) – Create a release that will be considered stable. The default is False.
keep_version (bool, optional) – Keep the current version number the same. If False, the version number will be update to the current date. The default is False.
- Returns:
zip_name – Name of the package’s compiled zip file.
- Return type:
- irdb.publish.publish(pkg_names=None, compilezip=False, upload=True, login=None, password=None, update_version=True)#
Should be as easy as just calling this function to republish all packages.
- irdb.publish.push_to_server(pkg_name: str, stable: bool = False, login: str | None = None, password: Password | None = None, no_confirm: bool = False) None#
Upload a package to the univie server.
- Parameters:
pkg_name (str) – Must have a compiled version locally available.
stable (bool, optional) – If True, the latest compiled stable version will be pushed. If False, the lastest compiled dev version will be pushed. The default is False.
login (Optional[str], optional) – Univie u:space username.
password (Optional[str], optional) – Univie u:space password.
- Raises:
ValueError – Raised if no compiled (stable) version of the package is found locally.
- Return type:
None