为argo对象生成了openapi模型。
argo-models的Python项目详细描述
argo型号
argo-models
是带有argo.models
子包的argo
命名空间包
其中包含从Argo生成的openapi模型。
NOTE
Due to human error in the setup.py, argo
2.2.1
will be released as2.2.1a
pip install argo-models
fromargo.modelsimportV1alpha1ArtifactLocation,V1alpha1S3Artifactfromkubernetes.client.modelsimportV1SecretKeySelector# create aws credaccess_key_secret=V1SecretKeySelector(name="s3_secret",key="accesskey")secret_key_secret=V1SecretKeySelector(name="s3_secret",key="secretkey")# create artifact config for s3s3_artifact=V1alpha1S3Artifact(bucket="foobar",endpoint="s3.amazonaws.com"insecure=False,access_key_secret=access_key_secret,secret_key_secret=secret_key_secret,key="")# create artifact locationartifact_location=V1alpha1ArtifactLocation(s3=s3_artifact)
开发人员注释
要生成最新的模型,请使用所需的argo版本更新version.txt
(例如2.3.0-rc3
),然后运行./generate-api.sh
。
要将新版本发布到pypi,请创建一个带有相应版本标记的版本(例如v2.2.1
)。travis将自动发布包。
NOTE
version.txt
should hold the current/latest argo version to be generated, as it is also used bysetup.py
as theargo-models
package version.