Skip to content

Commit

Permalink
chore: update templates (#38)
Browse files Browse the repository at this point in the history
* changes without context

        autosynth cannot find the source of changes triggered by earlier changes in this
        repository, or by version upgrades to tools such as linters.

* chore(py-library): enable snippet-bot

Co-authored-by: Benjamin E. Coe <[email protected]>

Source-Author: Takashi Matsuo <[email protected]>
Source-Date: Tue Sep 1 17:14:08 2020 +0000
Source-Repo: googleapis/synthtool
Source-Sha: d91dd8aac77f7a9c5506c238038a26fa4f9e361e
Source-Link: googleapis/synthtool@d91dd8a

* chore(py-library): update decrypt secrets file

* chore(py-library): update decrypt secrets file

From https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/scripts/decrypt-secrets.sh

* docs: explain conditional

Co-authored-by: Jeffrey Rennie <[email protected]>

Source-Author: Bu Sun Kim <[email protected]>
Source-Date: Tue Sep 8 11:35:59 2020 -0600
Source-Repo: googleapis/synthtool
Source-Sha: d302f93d7f47e2852e585ac35ab2d15585717ec0
Source-Link: googleapis/synthtool@d302f93

* chore(python-library): use sphinx 1.5.5 for the docfx job

Originally tested at:
googleapis/python-texttospeech#89

This change will fix the missing docstring in the yaml files.

Source-Author: Takashi Matsuo <[email protected]>
Source-Date: Thu Sep 10 04:12:14 2020 +0000
Source-Repo: googleapis/synthtool
Source-Sha: ffcee7952b74f647cbb3ef021d95422f10816fca
Source-Link: googleapis/synthtool@ffcee79

* build(python): use release-publish app for notifying GitHub of releas…

* build(python): use release-publish app for notifying GitHub of release status

* fix: re-add pypi password

Source-Author: Bu Sun Kim <[email protected]>
Source-Date: Wed Sep 16 08:46:42 2020 -0600
Source-Repo: googleapis/synthtool
Source-Sha: 257fda18168bedb76985024bd198ed1725485488
Source-Link: googleapis/synthtool@257fda1

* build(python): add secret manager in kokoro

Source-Author: Bu Sun Kim <[email protected]>
Source-Date: Wed Sep 16 10:24:40 2020 -0600
Source-Repo: googleapis/synthtool
Source-Sha: dba48bb9bc6959c232bec9150ac6313b608fe7bd
Source-Link: googleapis/synthtool@dba48bb

* chore(python): add sphinx doctest extension

Source-Author: Bu Sun Kim <[email protected]>
Source-Date: Mon Sep 21 13:09:57 2020 -0600
Source-Repo: googleapis/synthtool
Source-Sha: 27f4406999b1eee29e04b09b2423a8e4646c7e24
Source-Link: googleapis/synthtool@27f4406

* chore(python): remove note about editable installs

`pip install -e .` is supported and is how we install the library for tests.

Source-Author: Bu Sun Kim <[email protected]>
Source-Date: Tue Sep 22 12:06:12 2020 -0600
Source-Repo: googleapis/synthtool
Source-Sha: a651c5fb763c69a921aecdd3e1d8dc51dbf20f8d
Source-Link: googleapis/synthtool@a651c5f

* chore(python): use BUILD_SPECIFIC_GCLOUD_PROJECT for samples

https://github.com/googleapis/python-talent/blob/ef045e8eb348db36d7a2a611e6f26b11530d273b/samples/snippets/noxfile_config.py#L27-L32

`BUILD_SPECIFIC_GCLOUD_PROJECT` is an alternate project used for sample tests that do poorly with concurrent runs on the same project.

Source-Author: Bu Sun Kim <[email protected]>
Source-Date: Wed Sep 30 13:06:03 2020 -0600
Source-Repo: googleapis/synthtool
Source-Sha: 9b0da5204ab90bcc36f8cd4e5689eff1a54cc3e4
Source-Link: googleapis/synthtool@9b0da52

* chore(python): use 'setup.py' to detect repo root

Closes #792

Source-Author: Bu Sun Kim <[email protected]>
Source-Date: Fri Oct 9 15:06:33 2020 -0600
Source-Repo: googleapis/synthtool
Source-Sha: e0ae456852bf22f38796deb79cff30b516fde244
Source-Link: googleapis/synthtool@e0ae456

* build(python): samples tests should pass if no samples exist

Source-Author: Daniel Sanche <[email protected]>
Source-Date: Wed Oct 14 08:00:06 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 477764cc4ee6db346d3febef2bb1ea0abf27de52
Source-Link: googleapis/synthtool@477764c

* chore(python_library): change the docs bucket name

Source-Author: Takashi Matsuo <[email protected]>
Source-Date: Fri Oct 16 09:58:05 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: da5c6050d13b4950c82666a81d8acd25157664ae
Source-Link: googleapis/synthtool@da5c605

* chore(docs): update code of conduct of synthtool and templates

Source-Author: Christopher Wilcox <[email protected]>
Source-Date: Thu Oct 22 14:22:01 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 5f6ef0ec5501d33c4667885b37a7685a30d41a76
Source-Link: googleapis/synthtool@5f6ef0e

* docs: add proto-plus to intersphinx mapping

Source-Author: Tim Swast <[email protected]>
Source-Date: Tue Oct 27 12:01:14 2020 -0500
Source-Repo: googleapis/synthtool
Source-Sha: ea52b8a0bd560f72f376efcf45197fb7c8869120
Source-Link: googleapis/synthtool@ea52b8a

* fix(python_library): fix external unit test dependencies

I recently submitted https://github.com/googleapis/synthtool/pull/811/files, allowing external dependencies for unit tests. This fixes a small missing comma bug

Source-Author: Daniel Sanche <[email protected]>
Source-Date: Thu Oct 29 16:58:01 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 6542bd723403513626f61642fc02ddca528409aa
Source-Link: googleapis/synthtool@6542bd7

* chore: add type hint check

Source-Author: Leah E. Cole <[email protected]>
Source-Date: Wed Nov 4 17:36:32 2020 -0800
Source-Repo: googleapis/synthtool
Source-Sha: 3d3e94c4e02370f307a9a200b0c743c3d8d19f29
Source-Link: googleapis/synthtool@3d3e94c

* chore: add blacken to template

Source-Author: Leah E. Cole <[email protected]>
Source-Date: Thu Nov 5 15:22:03 2020 -0800
Source-Repo: googleapis/synthtool
Source-Sha: 1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b
Source-Link: googleapis/synthtool@1f1148d

* fix: address lint issues

Source-Author: Leah E. Cole <[email protected]>
Source-Date: Thu Nov 12 11:30:49 2020 -0800
Source-Repo: googleapis/synthtool
Source-Sha: e89175cf074dccc4babb4eca66ae913696e47a71
Source-Link: googleapis/synthtool@e89175c
  • Loading branch information
yoshi-automation authored and dandhlee committed Nov 17, 2022
1 parent e27f65b commit aa20110
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion error_reporting/fluent_on_compute/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
# You can opt out from the test for specific Python versions.
'ignored_versions': ["2.7"],

# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
'enforce_type_hints': False,

# An envvar key for determining the project id to use. Change it
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
# build specific Cloud project. You can also use your own string
Expand Down Expand Up @@ -132,7 +136,10 @@ def _determine_local_import_names(start_dir):

@nox.session
def lint(session):
session.install("flake8", "flake8-import-order")
if not TEST_CONFIG['enforce_type_hints']:
session.install("flake8", "flake8-import-order")
else:
session.install("flake8", "flake8-import-order", "flake8-annotations")

local_names = _determine_local_import_names(".")
args = FLAKE8_COMMON_ARGS + [
Expand All @@ -141,8 +148,18 @@ def lint(session):
"."
]
session.run("flake8", *args)
#
# Black
#


@nox.session
def blacken(session):
session.install("black")
python_files = [path for path in os.listdir(".") if path.endswith(".py")]

session.run("black", *python_files)

#
# Sample Tests
#
Expand Down Expand Up @@ -201,6 +218,11 @@ def _get_repo_root():
break
if Path(p / ".git").exists():
return str(p)
# .git is not available in repos cloned via Cloud Build
# setup.py is always in the library's root, so use that instead
# https://github.com/googleapis/synthtool/issues/792
if Path(p / "setup.py").exists():
return str(p)
p = p.parent
raise Exception("Unable to detect repository root.")

Expand Down

0 comments on commit aa20110

Please sign in to comment.