8000 python-language/synth.py at release-v1.4.0 · googleapis/python-language · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":".kokoro","path":".kokoro","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"google","path":"google","contentType":"directory"},{"name":"samples","path":"samples","contentType":"directory"},{"name":"scripts","path":"scripts","contentType":"directory"},{"name":"testing","path":"testing","contentType":"directory"},{"name":"tests","path":"tests","contentType":"directory"},{"name":".coveragerc","path":".coveragerc","contentType":"file"},{"name":".flake8","path":".flake8","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".repo-metadata.json","path":".repo-metadata.json","contentType":"file"},{"name":".trampolinerc","path":".trampolinerc","contentType":"file"},{"name":"CHANGELOG.md","path":"CHANGELOG.md","contentType":"file"},{"name":"CODE_OF_CONDUCT.md","path":"CODE_OF_CONDUCT.md","contentType":"file"},{"name":"CONTRIBUTING.rst","path":"CONTRIBUTING.rst","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"MANIFEST.in","path":"MANIFEST.in","contentType":"file"},{"name":"README.rst","path":"README.rst","contentType":"file"},{"name":"UPGRADING.md","path":"UPGRADING.md","contentType":"file"},{"name":"mypy.ini","path":"mypy.ini","contentType":"file"},{"name":"noxfile.py","path":"noxfile.py","contentType":"file"},{"name":"pylint.config.py","path":"pylint.config.py","contentType":"file"},{"name":"renovate.json","path":"renovate.json","contentType":"file"},{"name":"setup.cfg","path":"setup.cfg","contentType":"file"},{"name":"setup.py","path":"setup.py","contentType":"file"},{"name":"synth.metadata","path":"synth.metadata","contentType":"file"},{"name":"synth.py","path":"synth.py","contentType":"file"}],"totalCount":28}},"fileTreeProcessingTime":21.09904,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":238575442,"defaultBranch":"main","name":"python-language","ownerLogin":"googleapis","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2020-02-06T00:21:44.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/16785467?v=4","public":true,"private":false,"isOrgOwned":true},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"release-v1.4.0","listCacheKey":"v0:1688680326.0","canEdit":false,"refType":"branch","currentOid":"8562d4c61ec75a2d5f560abcd9f47925b609e197"},"path":"synth.py","currentUser":null,"blob":{"rawLines":["# Copyright 2018 Google LLC","#","# Licensed under the Apache License, Version 2.0 (the \"License\");","# you may not use this file except in compliance with the License.","# You may obtain a copy of the License at","#","# http://www.apache.org/licenses/LICENSE-2.0","#","# Unless required by applicable law or agreed to in writing, software","# distributed under the License is distributed on an \"AS IS\" BASIS,","# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.","# See the License for the specific language governing permissions and","# limitations under the License.","","\"\"\"This script is used to synthesize generated parts of this library.\"\"\"","","import synthtool as s","from synthtool import gcp","from synthtool.languages import python","","gapic = gcp.GAPICBazel()","common = gcp.CommonTemplates()","versions = [\"v1beta2\", \"v1\"]","","","# ----------------------------------------------------------------------------","# Generate language GAPIC layer","# ----------------------------------------------------------------------------","for version in versions:"," library = gapic.py_library("," service=\"language\","," version=version,"," bazel_target=f\"//google/cloud/language/{version}:language-{version}-py\","," include_protos=True,"," )"," s.move(library, excludes=[\"docs/index.rst\", \"README.rst\", \"setup.py\"]) ","","# ----------------------------------------------------------------------------","# Add templated files","# ----------------------------------------------------------------------------","templated_files = common.py_library(cov_level=99, samples=True, microgenerator=True,)","","s.move(templated_files, excludes=['.coveragerc'])","","s.shell.run([\"nox\", \"-s\", \"blacken\"], hide_output=False)","","# ----------------------------------------------------------------------------","# Samples templates","# ----------------------------------------------------------------------------","","python.py_samples(skip_readmes=True)","","s.shell.run([\"nox\", \"-s\", \"blacken\"], hide_output=False)"],"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/googleapis/python-language/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"synth.py","displayUrl":"https://github.com/googleapis/python-language/blob/release-v1.4.0/synth.py?raw=true","headerInfo":{"blobSize":"1.92 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"d1aec55","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-language%2Fblob%2Frelease-v1.4.0%2Fsynth.py","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"53","truncatedSloc":"42"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"Python","languageID":303,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/googleapis/python-language/blob/release-v1.4.0/synth.py","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/googleapis/python-language/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/googleapis/python-language/raw/refs/heads/release-v1.4.0/synth.py","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":null},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"csrf_tokens":{"/googleapis/python-language/branches":{"post":"nyXk8j3o4LfAeoph1y9Ni_RbwRXrkUpFYR-MrURLYMQZPMOlJFGu8UEcf9USL_TU8WYMD2hFUNRXczWWYjVPDg"},"/repos/preferences":{"post":"lVz2LHdN4GnCktZO8_-7ZcM1tJNmCQN1kuvMbeQf8y1QUKlAZH2EduRSVb6iR5LnKPC8XmYHpFB0h9ouAiyqGA"}}},"title":"python-language/synth.py at release-v1.4.0 · googleapis/python-language","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0