Skip to content

Commit

Permalink
chore: group all renovate PRs together (#911)
Browse files Browse the repository at this point in the history
This excludes `renovate.json` from templated updates. If this works well, we
can update the core templates (perhaps with a configuration option to
`py_library`).

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-bigquery/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕
  • Loading branch information
tswast authored Aug 25, 2021
1 parent 121c2c2 commit a3a85da
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
28 changes: 17 additions & 11 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
s.replace(
library / f"google/cloud/bigquery_{library.name}/types/standard_sql.py",
r"type_ ",
"type "
"type ",
)

s.move(
Expand All @@ -78,8 +78,8 @@
"noxfile.py",
"setup.py",
f"scripts/fixup_bigquery_{library.name}_keywords.py",
f"google/cloud/bigquery/__init__.py",
f"google/cloud/bigquery/py.typed",
"google/cloud/bigquery/__init__.py",
"google/cloud/bigquery/py.typed",
# There are no public API endpoints for the generated ModelServiceClient,
# thus there's no point in generating it and its tests.
f"google/cloud/bigquery_{library.name}/services/**",
Expand All @@ -98,9 +98,9 @@
microgenerator=True,
split_system_tests=True,
intersphinx_dependencies={
"pandas": 'http://pandas.pydata.org/pandas-docs/dev',
"pandas": "http://pandas.pydata.org/pandas-docs/dev",
"geopandas": "https://geopandas.org/",
}
},
)

# BigQuery has a custom multiprocessing note
Expand All @@ -113,7 +113,11 @@
# Include custom SNIPPETS_TESTS job for performance.
# https://github.com/googleapis/python-bigquery/issues/191
".kokoro/presubmit/presubmit.cfg",
]
# Group all renovate PRs together. If this works well, remove this and
# update the shared templates (possibly with configuration option to
# py_library.)
"renovate.json",
],
)

# ----------------------------------------------------------------------------
Expand All @@ -125,28 +129,29 @@
s.replace(
"docs/conf.py",
r'\{"members": True\}',
'{"members": True, "inherited-members": True}'
'{"members": True, "inherited-members": True}',
)

# Tell Sphinx to ingore autogenerated docs files.
s.replace(
"docs/conf.py",
r'"samples/snippets/README\.rst",',
'\g<0>\n "bigquery_v2/services.rst", # generated by the code generator',
'\\g<0>\n "bigquery_v2/services.rst", # generated by the code generator',
)

# ----------------------------------------------------------------------------
# pytype-related changes
# ----------------------------------------------------------------------------

# Add .pytype to .gitignore
s.replace(".gitignore", r"\.pytest_cache", "\g<0>\n.pytype")
s.replace(".gitignore", r"\.pytest_cache", "\\g<0>\n.pytype")

# Add pytype config to setup.cfg
s.replace(
"setup.cfg",
r"universal = 1",
textwrap.dedent(""" \g<0>
textwrap.dedent(
""" \\g<0>
[pytype]
python_version = 3.8
Expand All @@ -160,7 +165,8 @@
# There's some issue with finding some pyi files, thus disabling.
# The issue https://github.com/google/pytype/issues/150 is closed, but the
# error still occurs for some reason.
pyi-error""")
pyi-error"""
),
)

s.shell.run(["nox", "-s", "blacken"], hide_output=False)
2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": [
"config:base", ":preserveSemverRanges"
"config:base", "group:all", ":preserveSemverRanges"
],
"ignorePaths": [".pre-commit-config.yaml"],
"pip_requirements": {
Expand Down

0 comments on commit a3a85da

Please sign in to comment.