Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): 0.5.5 #219

Merged
merged 8 commits into from
Jan 25, 2025
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: make download-poetry

- name: Set up pip cache
uses: actions/cache@v4.0.0
uses: actions/cache@v4.1.1
with:
path: ~/.cache/pypoetry/virtualenvs
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
run: make download-poetry

- name: Set up pip cache
uses: actions/cache@v4.0.0
uses: actions/cache@v4.1.1
with:
path: ~/.cache/pypoetry/virtualenvs
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: make download-poetry

- name: Set up pip cache
uses: actions/cache@v4.0.0
uses: actions/cache@v4.1.1
with:
path: ~/.cache/pypoetry/virtualenvs
key: venv-${{ env.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pr_agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ jobs:
steps:
- name: PR Agent action step
id: pragent
uses: Codium-ai/pr-agent@main
uses: docker://codiumai/pr-agent:0.24-github_action
env:
OPENAI_KEY: ${{ secrets.AZURE_API_KEY }}
OPENAI.API_TYPE: "azure"
OPENAI.DEPLOYMENT_ID: ${{ secrets.AZURE_DEPLOYMENT_ID }} # custom name of the deployed model on Azure
OPENAI.API_BASE: ${{ secrets.AZURE_API_BASE }}
OPENAI.API_VERSION: ${{ secrets.AZURE_API_VERSION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTION_CONFIG.AUTO_DESCRIBE: false
GITHUB_ACTION_CONFIG.AUTO_REVIEW: true
GITHUB_ACTION_CONFIG.AUTO_IMPROVE: true
17 changes: 1 addition & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
# This workflow triggers the CI, updates the version, and uploads the release to GitHub and
# Google Artifact Registry when a push is made to either the 'main' or 'develop' branch.
#
# Workflow Steps:
#
# 1. Ci is triggered using the CI workflow defined in .github/workflows/ci.yaml
# 2. If it succeeds, the version is updated using Python Semantic Release
# 3. The release is uploaded to GitHub (same step and GitHub action)
# 5. Authentication to Google Cloud is achieved using Workload Identity Federation
# 6. The release is uploaded to Google Artifact Registry
#
# For more details on setting up Workload Identity Federation for GitHub,
# visit https://github.com/google-github-actions/auth#setting-up-workload-identity-federation
# WIF service account must have roles/artifactregistry.write access to the Artifact Registry repository

name: CI and Release on main

on:
Expand Down Expand Up @@ -47,7 +32,7 @@ jobs:

- name: Python Semantic Release
id: python-semantic-release
uses: python-semantic-release/python-semantic-release@v9.6.0 # need python >=3.12 to use latest versions
uses: python-semantic-release/python-semantic-release@v9.11.0
with:
github_token: ${{ secrets.RELEASE_ACCESS_TOKEN }}

Expand Down
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
default_language_version:
python: python3.10
default_stages: [commit, push]

repos:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PYTHON_VERSION = 3.10
.PHONY: download-poetry
## Download poetry
download-poetry:
curl -sSL https://install.python-poetry.org | python3 -
curl -sSL https://install.python-poetry.org | python3 - --version 1.8.4


.PHONY: install
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,11 @@ You can configure the deployer using the `pyproject.toml` file to better fit you
This will overwrite default values. It can be useful if you always use the same options, e.g. always the same `--scheduler-timezone`

```toml
[tool.vertex-deployer]
[tool.vertex_deployer]
vertex_folder_path = "my/path/to/vertex"
log_level = "INFO"

[tool.vertex-deployer.deploy]
[tool.vertex_deployer.deploy]
scheduler_timezone = "Europe/Paris"
```

Expand Down
4 changes: 2 additions & 2 deletions deployer/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def deploy( # noqa: C901
Optional[str],
typer.Option(
help="Cron expression for scheduling the pipeline."
" To pass it to the CLI, use hyphens e.g. '0-10-*-*-*'."
" To pass it to the CLI, use underscore e.g. '0_10_*_*_*'."
),
] = None,
delete_last_schedule: Annotated[
Expand Down Expand Up @@ -319,7 +319,7 @@ def deploy( # noqa: C901

if schedule:
with console.status("Scheduling pipeline..."):
cron = cron.replace("-", " ") # ugly fix to allow cron expression as env variable
cron = cron.replace("_", " ") # ugly fix to allow cron expression as env variable
deployer.schedule(
cron=cron,
enable_caching=enable_caching,
Expand Down
2 changes: 1 addition & 1 deletion deployer/pipeline_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def _convert_artifact_type_to_str(annotation: type) -> type:
"""Convert a kfp.dsl.Artifact type to a string.

This is mandatory for type checking, as kfp.dsl.Artifact types should be passed as strings
to VertexAI. See https://cloud.google.com/python/docs/reference/aiplatform/latest/google.cloud.aiplatform.PipelineJob
to VertexAI. See <https://cloud.google.com/python/docs/reference/aiplatform/latest/google.cloud.aiplatform.PipelineJob>
for details.
"""
if isinstance(annotation, _AnnotatedAlias):
Expand Down
2 changes: 1 addition & 1 deletion docs/CLI_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ $ vertex-deployer deploy [OPTIONS] PIPELINE_NAMES...
* `-u, --upload / -nu, --no-upload`: Whether to upload the pipeline to Google Artifact Registry. [default: no-upload]
* `-r, --run / -nr, --no-run`: Whether to run the pipeline. [default: no-run]
* `-s, --schedule / -ns, --no-schedule`: Whether to create a schedule for the pipeline. [default: no-schedule]
* `--cron TEXT`: Cron expression for scheduling the pipeline. To pass it to the CLI, use hyphens e.g. '0-10-*-*-*'.
* `--cron TEXT`: Cron expression for scheduling the pipeline. To pass it to the CLI, use underscore e.g. '0_10_*_*_*'.
* `-dls, --delete-last-schedule`: Whether to delete the previous schedule before creating a new one.
* `--scheduler-timezone TEXT`: Timezone for scheduling the pipeline. Must be a valid string from IANA time zone database [default: Europe/Paris]
* `--tags TEXT`: The tags to use when uploading the pipeline.
Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions docs/api/pipeline_checks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
::: deployer.pipeline_checks
options:
allow_inspection: false
merge_init_into_class: false
group_by_category: false
members:
- Pipelines
- Pipeline
- ConfigsDynamicModel
- ConfigDynamicModel
- _convert_artifact_type_to_str
26 changes: 26 additions & 0 deletions docs/api/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
::: deployer.utils.models
options:
show_root_heading: true
members:
- create_model_from_func

::: deployer.utils.utils
options:
show_root_heading: true
members:
- make_enum_from_python_package_dir
- import_pipeline_from_dir

::: deployer.utils.config
options:
show_root_heading: true
merge_init_into_class: false
allow_inspection: true
members:
- VertexPipelinesSettings
- load_vertex_settings
- list_config_filepaths
- load_config
- _load_config_python
- _load_config_yaml
- _load_config_toml
6 changes: 6 additions & 0 deletions docs/api/vertex_deployer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
::: deployer.pipeline_deployer.VertexPipelineDeployer
options:
show_root_heading: true
allow_inspection: true
merge_init_into_class: false
group_by_category: false
22 changes: 20 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ theme:

plugins:
- search
- mkdocstrings:
handlers:
python:
paths: [.]
options:
members_order: source
separate_signature: true
filters: ["!^_"]
docstring_options:
ignore_init_summary: true
merge_init_into_class: true
show_signature_annotations: true
signature_crossrefs: true
show_symbol_type_heading: true

markdown_extensions:
- admonition
Expand Down Expand Up @@ -81,8 +95,12 @@ nav:
- Folder Structure: folder_structure.md
- Basic Usage: usage.md
- Advanced User Guide:
- Vertex DevOps: advanced_user_guide.md
- Understand settings and configurations: configuration.md
- Vertex DevOps: advanced/advanced_user_guide.md
- Understand settings and configurations: advanced/configuration.md
- CLI Reference: CLI_REFERENCE.md
- API Documentation:
- VertexPipelineDeployer: api/vertex_deployer.md
- pipeline_checks: api/pipeline_checks.md
- utils: api/utils.md
- Contributing: contributing.md
- Changelog: changelog.md
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ rich = "^13.5"
loguru = "^0.7"
pydantic-settings = "^2.0, <2.9.0"
pydantic = "^2.3"
pyinstrument = { version = "^4.5", optional = true }
pyinstrument = { version = ">=4.5,<6.0", optional = true }
toml = "^0.10"
tomlkit = "^0.12"
tomlkit = ">=0.12,<0.14"
jinja2 = "^3.1.3"
numpy = [ # numpy is not a direct dependency but is required by some of the generated code
{ version = ">1.24", markers = "python_version >= '3.9'" },
Expand All @@ -49,6 +49,7 @@ codespell = "^2.2"
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.5"
mkdocs-material = {extras = ["pygments"], version = "^9.5.17"}
mkdocstrings = "^0.26"

[tool.poetry.extras]
profiling = ["pyinstrument"]
Expand Down Expand Up @@ -109,7 +110,7 @@ version_variables = ["deployer/__init__.py:__version__"]
version_toml = ["pyproject.toml:tool.poetry.version"]
upload_to_pypi = false
upload_to_release = true
build_command = "pip install poetry && poetry env use 3.10 && poetry build"
build_command = "pip install poetry && poetry build"
commit_message = "chore(release): {version}\n\n[skip ci]\nAutomatically generated by semantic-release"
tag_format = "{version}"

Expand Down
Loading