openlayer.OpenlayerClient.commit#

OpenlayerClient.commit(message, project_id, force=False)#

Adds a commit message to staged resources.

Parameters
messagestr

The commit message, between 1 and 140 characters.

forcebool

If commit is called when there is already a commit message, when force=True, the existing message will be overwritten by the new one. When force=False, the user will be prompted to confirm the overwrite.

Notes

Examples

A commit message is associated with a project version. We have a new project version every time any of its resources (namely, model and/or dataset) are updated. The commit message is supposed to be a short description of the changes from one version to the next.

Let’s say you have a project with a model and a dataset staged. You can confirm these resources are indeed in the staging area using the status method:

>>> project.status()

Now, you can add a commit message to the staged resources.

>>> project.commit("Initial commit.")

After adding the commit message, the resources are ready to be pushed to the platform. You use the push method to do so:

>>> project.push()