Skip to content

Commit

Permalink
Merge branch 'main' into kokoro-keys
Browse files Browse the repository at this point in the history
  • Loading branch information
ron-gal authored Sep 20, 2024
2 parents 5f1c170 + 0143cb9 commit 4477973
Show file tree
Hide file tree
Showing 38 changed files with 1,304 additions and 263 deletions.
8 changes: 8 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[run]
branch = true
omit =
*/__init__.py

[report]
show_missing = true
fail_under = 90
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# For syntax help see:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax

* @googleapis/senseai-eco
* @googleapis/senseai-eco @googleapis/langchain-bigtable
4 changes: 4 additions & 0 deletions .github/blunderbuss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
assign_issues:
- googleapis/langchain-bigtable
assign_prs:
- googleapis/langchain-bigtable
3 changes: 2 additions & 1 deletion .github/header-checker-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ sourceFileExtensions:
- "proto"
- "Dockerfile"
- "py"
- "html"
- "text"
ignoreFiles:
- ".github/blunderbuss.yml"
- ".github/release-please.yml"
- ".github/release-trigger.yml"
- ".github/header-checker-lint.yml"
- ".github/sync-repo-settings.yaml"
- ".github/workflows/docs.yml"
- ".kokoro/**"
- "**/requirements.txt"
- "**/requirements-test.txt"
6 changes: 1 addition & 5 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@
"group:allNonMajor", // https://docs.renovatebot.com/presets-group/#groupallnonmajor
":separateMajorReleases", // https://docs.renovatebot.com/presets-default/#separatemajorreleases
":prConcurrentLimitNone", // View complete backlog as PRs. https://docs.renovatebot.com/presets-default/#prconcurrentlimitnone
":prNotPending", // https://docs.renovatebot.com/presets-default/#prnotpending
":prHourlyLimitNone", // https://docs.renovatebot.com/presets-default/#prhourlylimitnone
":preserveSemverRanges",
],

// Synchronized with a 2 week sprint cycle and outside business hours.
// https://docs.renovatebot.com/configuration-options/#schedule
"schedule": ["every 2 weeks on Saturday"],
"ignorePaths": [".kokoro/**"],

// Give ecosystem time to catch up.
// npm allows maintainers to unpublish a release up to 3 days later.
Expand Down
3 changes: 2 additions & 1 deletion .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ branchProtectionRules:
requiredStatusCheckContexts:
- "cla/google"
- "lint"
- "integration-test-pr-py38 (langchain-bigtable-testing)"
- "integration-test-pr-py39 (langchain-bigtable-testing)"
- "integration-test-pr-py310 (langchain-bigtable-testing)"
- "integration-test-pr-py311 (langchain-bigtable-testing)"
Expand All @@ -43,3 +42,5 @@ branchProtectionRules:
permissionRules:
- team: senseai-eco
permission: admin
- team: langchain-bigtable
permission: push
38 changes: 38 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
pull_request:
branches:
- main
name: docs
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
with:
python-version: "3.9"
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
- name: Run docs
run: |
nox -s docs
docfx:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
with:
python-version: "3.10"
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
- name: Run docfx
run: |
nox -s docfx
33 changes: 2 additions & 31 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ on:
- "*.md"
- ".kokoro/**"
- ".github/**"
pull_request_target:
types: [labeled]
paths-ignore:
- "*.md"
- ".kokoro/**"
- ".github/**"

jobs:
lint:
Expand All @@ -34,36 +28,13 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label)
if: "${{ (github.event.action != 'labeled' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) || github.event.label.name == 'tests: run' }}"

steps:
- name: Remove PR label
if: "${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
await github.rest.issues.removeLabel({
name: 'tests: run',
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number
});
} catch (e) {
console.log('Failed to remove label. Another job may have already removed it!');
}
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GITHUB_TOKEN }}
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Setup Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.11"

Expand Down
1 change: 1 addition & 0 deletions .kokoro/docker/docs/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nox
38 changes: 38 additions & 0 deletions .kokoro/docker/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes requirements.in
#
argcomplete==3.3.0 \
--hash=sha256:c168c3723482c031df3c207d4ba8fa702717ccb9fc0bfe4117166c1f537b4a54 \
--hash=sha256:fd03ff4a5b9e6580569d34b273f741e85cd9e072f3feeeee3eba4891c70eda62
# via nox
colorlog==6.8.2 \
--hash=sha256:3e3e079a41feb5a1b64f978b5ea4f46040a94f11f0e8bbb8261e3dbbeca64d44 \
--hash=sha256:4dcbb62368e2800cb3c5abd348da7e53f6c362dda502ec27c560b2e58a66bd33
# via nox
distlib==0.3.8 \
--hash=sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784 \
--hash=sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64
# via virtualenv
filelock==3.14.0 \
--hash=sha256:43339835842f110ca7ae60f1e1c160714c5a6afd15a2873419ab185334975c0f \
--hash=sha256:6ea72da3be9b8c82afd3edcf99f2fffbb5076335a5ae4d03248bb5b6c3eae78a
# via virtualenv
nox==2024.4.15 \
--hash=sha256:6492236efa15a460ecb98e7b67562a28b70da006ab0be164e8821177577c0565 \
--hash=sha256:ecf6700199cdfa9e5ea0a41ff5e6ef4641d09508eda6edb89d9987864115817f
# via -r requirements.in
packaging==24.0 \
--hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \
--hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9
# via nox
platformdirs==4.2.1 \
--hash=sha256:031cd18d4ec63ec53e82dceaac0417d218a6863f7745dfcc9efe7793b7039bdf \
--hash=sha256:17d5a1161b3fd67b390023cb2d3b026bbd40abde6fdb052dfbd3a29c3ba22ee1
# via virtualenv
virtualenv==20.26.1 \
--hash=sha256:604bfdceaeece392802e6ae48e69cec49168b9c5f4a44e483963f9242eb0e78b \
--hash=sha256:7aa9982a728ae5892558bff6a2839c00b9ed145523ece2274fad6f414690ae75
# via nox
4 changes: 2 additions & 2 deletions .kokoro/docs/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ env_vars: {

env_vars: {
key: "V2_STAGING_BUCKET"
# Push non-cloud library docs to `docs-staging-v2-staging` instead of the
# Push non-cloud library docs to `docs-staging-v2` instead of the
# Cloud RAD bucket `docs-staging-v2`
value: "docs-staging-v2-staging"
value: "docs-staging-v2"
}

# It will upload the docker image after successful builds.
Expand Down
7 changes: 4 additions & 3 deletions .kokoro/publish-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ python3 -m nox --version
# build docs
nox -s docs

VERSION=$(python -c "import langchain_google_bigtable;print(langchain_google_bigtable.__version__)")
python3 -m pip install .
VERSION=$(python3 -c "import langchain_google_bigtable;print(langchain_google_bigtable.__version__)")

# create metadata
python3 -m docuploader create-metadata \
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
--version=$VERSION \
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
--distribution-name=$(yq -oy '.project.name' pyproject.toml) \
--distribution-name=$(jq --raw-output '.distribution_name // empty' .repo-metadata.json) \
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)
Expand All @@ -53,7 +54,7 @@ python3 -m docuploader create-metadata \
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
--version=$VERSION \
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
--distribution-name=$(yq -oy '.project.name' pyproject.toml) \
--distribution-name=$(jq --raw-output '.distribution_name // empty' .repo-metadata.json) \
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)
Expand Down
Loading

0 comments on commit 4477973

Please sign in to comment.