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

docs: Minor formatting #11630

Merged
merged 9 commits into from
Sep 30, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.3" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.3" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.3" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-ai-generativelanguage",
"version": "0.3.3"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-ai-generativelanguage",
"version": "0.3.3"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
14 changes: 13 additions & 1 deletion packages/google-apps-script-type/.OwlBot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,17 @@
# limitations under the License.

deep-copy-regex:
- source: /google/apps/script/type/(.*-py)
- source: /google/apps/script/type/calendar/(.*-py)
dest: /owl-bot-staging/google-apps-script-type/$1
- source: /google/apps/script/type/docs/(.*-py)
dest: /owl-bot-staging/google-apps-script-type/$1
- source: /google/apps/script/type/drive/(.*-py)
dest: /owl-bot-staging/google-apps-script-type/$1
- source: /google/apps/script/type/gmail(.*-py)
dest: /owl-bot-staging/google-apps-script-type/$1
- source: /google/apps/script/type/sheets(.*-py)
dest: /owl-bot-staging/google-apps-script-type/$1
- source: /google/apps/script/type/slides(.*-py)
dest: /owl-bot-staging/google-apps-script-type/$1
- source: /google/apps/script/type/(type-py)
dest: /owl-bot-staging/google-apps-script-type/$1
4 changes: 2 additions & 2 deletions packages/google-apps-script-type/.coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ branch = True
[report]
show_missing = True
omit =
google/apps/script/type/slides/__init__.py
google/apps/script/type/slides/gapic_version.py
google/apps/script/type/__init__.py
google/apps/script/type/gapic_version.py
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
Expand Down
2 changes: 1 addition & 1 deletion packages/google-apps-script-type/.flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2020 Google LLC
# 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.
Expand Down
6 changes: 3 additions & 3 deletions packages/google-apps-script-type/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ Running System Tests
$ nox -s system

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


.. note::

System tests are only configured to run under Python.
System tests are only configured to run under Python 3.8, 3.9, 3.10 and 3.11.
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 @@ -236,7 +236,7 @@ We support:

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

.. _config: https://github.com/googleapis/google-cloud-python/blob/main/noxfile.py
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/google-apps-script-type/noxfile.py


**********
Expand Down
2 changes: 1 addition & 1 deletion packages/google-apps-script-type/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2020 Google LLC
# 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.
Expand Down
27 changes: 14 additions & 13 deletions packages/google-apps-script-type/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,24 @@ In order to use this library, you first need to go through the following steps:
Installation
~~~~~~~~~~~~

Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.
Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
creates isolated Python environments. These isolated environments can have separate
versions of Python packages, which allows you to isolate one project's dependencies
from the dependencies of other projects.

With `virtualenv`_, it's possible to install this library without needing system
With `venv`_, it's possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.

.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
.. _`venv`: https://docs.python.org/3/library/venv.html


Code samples and snippets
~~~~~~~~~~~~~~~~~~~~~~~~~

Code samples and snippets live in the `samples/` folder.
Code samples and snippets live in the `samples/`_ folder.

.. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-apps-script-type/samples


Supported Python Versions
Expand All @@ -77,21 +80,19 @@ Mac/Linux

.. code-block:: console

pip install virtualenv
virtualenv <your-env>
python3 -m venv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install google-apps-script-type
pip install google-apps-script-type


Windows
^^^^^^^

.. code-block:: console

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-apps-script-type
py -m venv <your-env>
.\<your-env>\Scripts\activate
pip install google-apps-script-type

Next Steps
~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion packages/google-apps-script-type/docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2021 Google LLC
# 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import proto # type: ignore

import google.apps.script.type.types # type: ignore
from google.apps.script.type.types import extension_point

__protobuf__ = proto.module(
package="google.apps.script.type.calendar",
Expand Down Expand Up @@ -93,12 +93,10 @@ class EventAccess(proto.Enum):
WRITE = 4
READ_WRITE = 5

homepage_trigger: google.apps.script.type.types.HomepageExtensionPoint = (
proto.Field(
proto.MESSAGE,
number=6,
message=google.apps.script.type.types.HomepageExtensionPoint,
)
homepage_trigger: extension_point.HomepageExtensionPoint = proto.Field(
proto.MESSAGE,
number=6,
message=extension_point.HomepageExtensionPoint,
)
conference_solution: MutableSequence["ConferenceSolution"] = proto.RepeatedField(
proto.MESSAGE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import proto # type: ignore

import google.apps.script.type.types # type: ignore
from google.apps.script.type.types import extension_point

__protobuf__ = proto.module(
package="google.apps.script.type.docs",
Expand All @@ -43,12 +43,10 @@ class DocsAddOnManifest(proto.Message):
pair.
"""

homepage_trigger: google.apps.script.type.types.HomepageExtensionPoint = (
proto.Field(
proto.MESSAGE,
number=1,
message=google.apps.script.type.types.HomepageExtensionPoint,
)
homepage_trigger: extension_point.HomepageExtensionPoint = proto.Field(
proto.MESSAGE,
number=1,
message=extension_point.HomepageExtensionPoint,
)
on_file_scope_granted_trigger: "DocsExtensionPoint" = proto.Field(
proto.MESSAGE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import proto # type: ignore

import google.apps.script.type.types # type: ignore
from google.apps.script.type.types import extension_point

__protobuf__ = proto.module(
package="google.apps.script.type.drive",
Expand All @@ -43,12 +43,10 @@ class DriveAddOnManifest(proto.Message):
(e.g. the My Drive Doclist).
"""

homepage_trigger: google.apps.script.type.types.HomepageExtensionPoint = (
proto.Field(
proto.MESSAGE,
number=1,
message=google.apps.script.type.types.HomepageExtensionPoint,
)
homepage_trigger: extension_point.HomepageExtensionPoint = proto.Field(
proto.MESSAGE,
number=1,
message=extension_point.HomepageExtensionPoint,
)
on_items_selected_trigger: "DriveExtensionPoint" = proto.Field(
proto.MESSAGE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import proto # type: ignore

import google.apps.script.type.types # type: ignore
from google.apps.script.type.types import extension_point

__protobuf__ = proto.module(
package="google.apps.script.type.gmail",
Expand Down Expand Up @@ -74,12 +74,10 @@ class GmailAddOnManifest(proto.Message):
experience.
"""

homepage_trigger: google.apps.script.type.types.HomepageExtensionPoint = (
proto.Field(
proto.MESSAGE,
number=14,
message=google.apps.script.type.types.HomepageExtensionPoint,
)
homepage_trigger: extension_point.HomepageExtensionPoint = proto.Field(
proto.MESSAGE,
number=14,
message=extension_point.HomepageExtensionPoint,
)
contextual_triggers: MutableSequence["ContextualTrigger"] = proto.RepeatedField(
proto.MESSAGE,
Expand Down Expand Up @@ -183,11 +181,11 @@ class DraftAccess(proto.Enum):
METADATA = 2

actions: MutableSequence[
google.apps.script.type.types.MenuItemExtensionPoint
extension_point.MenuItemExtensionPoint
] = proto.RepeatedField(
proto.MESSAGE,
number=5,
message=google.apps.script.type.types.MenuItemExtensionPoint,
message=extension_point.MenuItemExtensionPoint,
)
draft_access: DraftAccess = proto.Field(
proto.ENUM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import proto # type: ignore

import google.apps.script.type.types # type: ignore
from google.apps.script.type.types import extension_point

__protobuf__ = proto.module(
package="google.apps.script.type.sheets",
Expand All @@ -43,12 +43,10 @@ class SheetsAddOnManifest(proto.Message):
pair.
"""

homepage_trigger: google.apps.script.type.types.HomepageExtensionPoint = (
proto.Field(
proto.MESSAGE,
number=3,
message=google.apps.script.type.types.HomepageExtensionPoint,
)
homepage_trigger: extension_point.HomepageExtensionPoint = proto.Field(
proto.MESSAGE,
number=3,
message=extension_point.HomepageExtensionPoint,
)
on_file_scope_granted_trigger: "SheetsExtensionPoint" = proto.Field(
proto.MESSAGE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import proto # type: ignore

import google.apps.script.type.types # type: ignore
from google.apps.script.type.types import extension_point

__protobuf__ = proto.module(
package="google.apps.script.type.slides",
Expand All @@ -43,12 +43,10 @@ class SlidesAddOnManifest(proto.Message):
pair.
"""

homepage_trigger: google.apps.script.type.types.HomepageExtensionPoint = (
proto.Field(
proto.MESSAGE,
number=1,
message=google.apps.script.type.types.HomepageExtensionPoint,
)
homepage_trigger: extension_point.HomepageExtensionPoint = proto.Field(
proto.MESSAGE,
number=1,
message=extension_point.HomepageExtensionPoint,
)
on_file_scope_granted_trigger: "SlidesExtensionPoint" = proto.Field(
proto.MESSAGE,
Expand Down
25 changes: 2 additions & 23 deletions packages/google-apps-script-type/noxfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2018 Google LLC
# 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.
Expand Down Expand Up @@ -46,7 +46,7 @@
UNIT_TEST_EXTRAS = []
UNIT_TEST_EXTRAS_BY_PYTHON = {}

SYSTEM_TEST_PYTHON_VERSIONS = []
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"]
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
"mock",
"pytest",
Expand Down Expand Up @@ -405,24 +405,3 @@ def prerelease_deps(session):
session.run("python", "-c", "import google.auth; print(google.auth.__version__)")

session.run("py.test", "tests/unit")

system_test_path = os.path.join("tests", "system.py")
system_test_folder_path = os.path.join("tests", "system")

# Only run system tests if found.
if os.path.exists(system_test_path):
session.run(
"py.test",
"--verbose",
f"--junitxml=system_{session.python}_sponge_log.xml",
system_test_path,
*session.posargs,
)
if os.path.exists(system_test_folder_path):
session.run(
"py.test",
"--verbose",
f"--junitxml=system_{session.python}_sponge_log.xml",
system_test_folder_path,
*session.posargs,
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright 2015 Google Inc. All rights reserved.
# Copyright 2023 Google LLC All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
google-api-core
proto-plus
protobuf
google-apps-script-type
Loading
Loading