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: synchronize with Python templates #6

Merged
merged 25 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bfd7eab
chore: synchronize with Python templates
tswast Apr 9, 2024
7a71d71
add owlbot configuration
tswast Apr 9, 2024
216de82
remove unknown paths from linter
tswast Apr 9, 2024
9d63abb
use templated noxfile
tswast Apr 9, 2024
1191a22
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 9, 2024
7971648
multiple teams: see: https://github.com/googleapis/synthtool/issues/946
tswast Apr 9, 2024
71df8f3
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 9, 2024
d4ddffb
chore: grant api-bigquery and api-bigquery-dataframe teams write acce…
tswast Apr 9, 2024
eb85cce
Merge remote-tracking branch 'origin/tswast-templates' into tswast-te…
tswast Apr 9, 2024
04519fb
add python 3.7
tswast Apr 10, 2024
6aacdb2
Merge remote-tracking branch 'origin/main' into tswast-templates
tswast Apr 10, 2024
f59fef7
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 10, 2024
fa3ce9f
chore: copy magics unit tests from google-cloud-bigquery
tswast Apr 10, 2024
49089ae
include google-cloud-testutils in unittests
tswast Apr 10, 2024
50b2266
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 10, 2024
c61d466
use bqstorage extras
tswast Apr 10, 2024
25e59aa
Merge remote-tracking branch 'origin/tswast-templates' into tswast-te…
tswast Apr 10, 2024
2c0443a
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 10, 2024
5f4d1ce
use extras by python for everything
tswast Apr 10, 2024
c68db28
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 10, 2024
b23de2a
update tests to use bigquery_magics module
tswast Apr 10, 2024
8ef9b2c
remove auth from unit tests
tswast Apr 11, 2024
ae835f6
fix coverage
tswast Apr 11, 2024
51fe9b3
Merge branch 'tswast-unit-tests' into tswast-templates
tswast Apr 11, 2024
e5fbd46
Merge branch 'main' into tswast-templates
tswast Apr 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024 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.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:db05f70829de86fe8e34ba972b7fe56da57eaccf1691f875ed4867db80d5cec9
# created: 2024-04-05T19:51:26.466869535Z
18 changes: 18 additions & 0 deletions .github/.OwlBot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2021 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.

docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest

begin-after-commit-hash: 1afeb53252641dc35a421fa5acc59e2f3229ad6d
12 changes: 12 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Code owners file.
# This file controls who is tagged for review for any given pull request.
#
# For syntax help see:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
# Note: This file is autogenerated. To make changes to the codeowner team, please update .repo-metadata.json.

# @googleapis/yoshi-python @googleapis/api-bigquery @googleapis/api-bigquery-dataframe are the default owners for changes in this repo
* @googleapis/yoshi-python @googleapis/api-bigquery @googleapis/api-bigquery-dataframe

# @googleapis/python-samples-reviewers @googleapis/api-bigquery @googleapis/api-bigquery-dataframe are the default owners for samples changes
/samples/ @googleapis/python-samples-reviewers @googleapis/api-bigquery @googleapis/api-bigquery-dataframe
28 changes: 28 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# How to Contribute

We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.

## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution;
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.

## Code reviews

All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.

## Community Guidelines

This project follows [Google's Open Source Community
Guidelines](https://opensource.google.com/conduct/).
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Bug report
about: Create a report to help us improve

---

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

- Search the issues already opened: https://github.com/googleapis/python-bigquery-magics/issues
- Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python

If you are still having issues, please be sure to include as much information as possible:

#### Environment details

- OS type and version:
- Python version: `python --version`
- pip version: `pip --version`
- `bigquery-magics` version: `pip show bigquery-magics`

#### Steps to reproduce

1. ?
2. ?

#### Code example

```python
# example
```

#### Stack trace
```
# example
```

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Feature request
about: Suggest an idea for this library

---

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/support_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Support request
about: If you have a support contract with Google, please create an issue in the Google Cloud Support console.

---

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
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-magics/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> 🦕
3 changes: 3 additions & 0 deletions .github/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/auto-approve
processes:
- "OwlBotTemplateChanges"
20 changes: 20 additions & 0 deletions .github/auto-label.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2023 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.
requestsize:
enabled: true

path:
pullrequest: true
paths:
samples: "samples"
17 changes: 17 additions & 0 deletions .github/blunderbuss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Blunderbuss config
#
# This file controls who is assigned for pull requests and issues.
# Note: This file is autogenerated. To make changes to the assignee
# team, please update `codeowner_team` in `.repo-metadata.json`.
assign_issues:
- googleapis/api-bigquery googleapis/api-bigquery-dataframe

assign_issues_by:
- labels:
- "samples"
to:
- googleapis/python-samples-reviewers
- googleapis/api-bigquery googleapis/api-bigquery-dataframe
tswast marked this conversation as resolved.
Show resolved Hide resolved

assign_prs:
- googleapis/api-bigquery googleapis/api-bigquery-dataframe
15 changes: 15 additions & 0 deletions .github/header-checker-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{"allowedCopyrightHolders": ["Google LLC"],
"allowedLicenses": ["Apache-2.0", "MIT", "BSD-3"],
"ignoreFiles": ["**/requirements.txt", "**/requirements-test.txt", "**/__init__.py", "samples/**/constraints.txt", "samples/**/constraints-test.txt"],
"sourceFileExtensions": [
"ts",
"js",
"java",
"sh",
"Dockerfile",
"yaml",
"py",
"html",
"txt"
]
}
2 changes: 2 additions & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
releaseType: python
handleGHRelease: true
1 change: 1 addition & 0 deletions .github/release-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enabled: true
Empty file added .github/snippet-bot.yml
Empty file.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pip-log.txt
.nox
.cache
.pytest_cache
.pytype


# Mac
Expand Down
20 changes: 9 additions & 11 deletions .repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"name": "bigquery",
"name_pretty": "Google Cloud BigQuery",
"name": "bigquery-magics",
"name_pretty": "Google BigQuery connector for Jupyter and IPython",
"product_documentation": "https://cloud.google.com/bigquery",
"client_documentation": "https://cloud.google.com/python/docs/reference/bigquery/latest",
"issue_tracker": "https://issuetracker.google.com/savedsearches/559654",
"client_documentation": "https://googleapis.dev/python/bigquery-magics/latest/",
"issue_tracker": "https://github.com/googleapis/python-bigquery-magics/issues",
"release_level": "stable",
"language": "python",
"library_type": "GAPIC_COMBO",
"repo": "googleapis/python-bigquery",
"distribution_name": "google-cloud-bigquery",
"library_type": "INTEGRATION",
"repo": "googleapis/python-bigquery-magics",
"distribution_name": "bigquery-magics",
"api_id": "bigquery.googleapis.com",
"requires_billing": false,
"default_version": "v2",
"codeowner_team": "@googleapis/api-bigquery",
"api_shortname": "bigquery",
"api_description": "is a fully managed, NoOps, low cost data analytics service.\nData can be streamed into BigQuery at millions of rows per second to enable real-time analysis.\nWith BigQuery you can easily deploy Petabyte-scale Databases."
"default_version": "",
"codeowner_team": "@googleapis/api-bigquery @googleapis/api-bigquery-dataframe"
}
36 changes: 16 additions & 20 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions:
3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows.
3.7, 3.8, 3.11 and 3.12 on both UNIX and Windows.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious: why the de-emphasis on versions 3.9 and 3.10?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is taking the unit test versions from owlbot. We do want it to work on these, but I wonder if it's worth testing against so many versions?


- The feature must not add unnecessary dependencies (where
"unnecessary" is of course subjective, but new dependencies should
Expand All @@ -35,21 +35,21 @@ Using a Development Checkout
You'll have to create a development environment using a Git checkout:

- While logged into your GitHub account, navigate to the
``python-bigquery`` `repo`_ on GitHub.
``python-bigquery-magics`` `repo`_ on GitHub.

- Fork and clone the ``python-bigquery`` repository to your GitHub account by
- Fork and clone the ``python-bigquery-magics`` repository to your GitHub account by
clicking the "Fork" button.

- Clone your fork of ``python-bigquery`` from your GitHub account to your local
- Clone your fork of ``python-bigquery-magics`` from your GitHub account to your local
computer, substituting your account username and specifying the destination
as ``hack-on-python-bigquery``. E.g.::
as ``hack-on-python-bigquery-magics``. E.g.::

$ cd ${HOME}
$ git clone git@github.com:USERNAME/python-bigquery.git hack-on-python-bigquery
$ cd hack-on-python-bigquery
# Configure remotes such that you can pull changes from the googleapis/python-bigquery
$ git clone git@github.com:USERNAME/python-bigquery-magics.git hack-on-python-bigquery-magics
$ cd hack-on-python-bigquery-magics
# Configure remotes such that you can pull changes from the googleapis/python-bigquery-magics
# repository into your local repository.
$ git remote add upstream git@github.com:googleapis/python-bigquery.git
$ git remote add upstream git@github.com:googleapis/python-bigquery-magics.git
# fetch and merge changes from upstream into main
$ git fetch upstream
$ git merge upstream/main
Expand All @@ -60,7 +60,7 @@ repo, from which you can submit a pull request.
To work on the codebase and run the tests, we recommend using ``nox``,
but you can also use a ``virtualenv`` of your own creation.

.. _repo: https://github.com/googleapis/python-bigquery
.. _repo: https://github.com/googleapis/python-bigquery-magics

Using ``nox``
=============
Expand Down Expand Up @@ -113,7 +113,7 @@ Coding Style
export GOOGLE_CLOUD_TESTING_BRANCH="main"

By doing this, you are specifying the location of the most up-to-date
version of ``python-bigquery``. The
version of ``python-bigquery-magics``. The
remote name ``upstream`` should point to the official ``googleapis``
checkout and the branch should be the default branch on that remote (``main``).

Expand Down Expand Up @@ -143,12 +143,12 @@ Running System Tests
$ nox -s system

# Run a single system test
$ nox -s system-3.8 -- -k <name of test>
$ nox -s system-3.12 -- -k <name of test>


.. note::

System tests are only configured to run under Python 3.8.
System tests are only configured to run under Python 3.8, 3.11 and 3.12.
For expediency, we do not run them in older versions of Python 3.

This alone will not run the tests. You'll need to change some local
Expand Down Expand Up @@ -209,10 +209,10 @@ The `description on PyPI`_ for the project comes directly from the
``README``. Due to the reStructuredText (``rst``) parser used by
PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst``
instead of
``https://github.com/googleapis/python-bigquery/blob/main/CONTRIBUTING.rst``)
``https://github.com/googleapis/python-bigquery-magics/blob/main/CONTRIBUTING.rst``)
may cause problems creating links or rendering the description.

.. _description on PyPI: https://pypi.org/project/google-cloud-bigquery
.. _description on PyPI: https://pypi.org/project/bigquery-magics


*************************
Expand All @@ -223,22 +223,18 @@ We support:

- `Python 3.7`_
- `Python 3.8`_
- `Python 3.9`_
- `Python 3.10`_
- `Python 3.11`_
- `Python 3.12`_

.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/
.. _Python 3.9: https://docs.python.org/3.9/
.. _Python 3.10: https://docs.python.org/3.10/
.. _Python 3.11: https://docs.python.org/3.11/
.. _Python 3.12: https://docs.python.org/3.12/


Supported versions can be found in our ``noxfile.py`` `config`_.

.. _config: https://github.com/googleapis/python-bigquery/blob/main/noxfile.py
.. _config: https://github.com/googleapis/python-bigquery-magics/blob/main/noxfile.py


We also explicitly decided to support Python 3 beginning with version 3.7.
Expand Down
Loading
Loading