Skip to content

Commit e68816e

Browse files
1 parent 5e2f551 commit e68816e

107 files changed

Lines changed: 45 additions & 13144 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎packages/google-analytics-admin/.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ docs.metadata
5050

5151
# Virtual environment
5252
env/
53-
venv/
5453

5554
# Test logs
5655
coverage.xml

‎packages/google-analytics-admin/CONTRIBUTING.rst‎

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ Running System Tests
143143
$ nox -s system
144144

145145
# Run a single system test
146-
$ nox -s system-3.8 -- -k <name of test>
146+
$ nox -s system-3.11 -- -k <name of test>
147147

148148

149149
.. note::
150150

151-
System tests are only configured to run under Python 3.8.
151+
System tests are only configured to run under Python 3.8, 3.9, 3.10 and 3.11.
152152
For expediency, we do not run them in older versions of Python 3.
153153

154154
This alone will not run the tests. You'll need to change some local
@@ -236,21 +236,9 @@ We support:
236236

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

239-
.. _config: https://github.com/googleapis/python-analytics-admin/blob/main/noxfile.py
239+
.. _config: https://github.com/googleapis/python-analytics-admin/blob/main/packages/google-analytics-admin/noxfile.py
240240

241241

242-
We also explicitly decided to support Python 3 beginning with version 3.7.
243-
Reasons for this include:
244-
245-
- Encouraging use of newest versions of Python 3
246-
- Taking the lead of `prominent`_ open-source `projects`_
247-
- `Unicode literal support`_ which allows for a cleaner codebase that
248-
works in both Python 2 and Python 3
249-
250-
.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django
251-
.. _projects: http://flask.pocoo.org/docs/0.10/python3/
252-
.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/
253-
254242
**********
255243
Versioning
256244
**********

‎packages/google-analytics-admin/README.rst‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Python Client for Analytics Admin API
2-
=====================================
1+
Python Client for Analytics Admin
2+
=================================
33

44
|preview| |pypi| |versions|
55

6-
`Analytics Admin API`_: allows you to manage Google Analytics accounts and properties.
6+
`Analytics Admin`_: allows you to manage Google Analytics accounts and properties.
77

88
- `Client Library Documentation`_
99
- `Product Documentation`_
@@ -14,7 +14,7 @@ Python Client for Analytics Admin API
1414
:target: https://pypi.org/project/google-analytics-admin/
1515
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-analytics-admin.svg
1616
:target: https://pypi.org/project/google-analytics-admin/
17-
.. _Analytics Admin API: https://developers.google.com/analytics/
17+
.. _Analytics Admin: https://developers.google.com/analytics/
1818
.. _Client Library Documentation: https://googleapis.dev/python/analyticsadmin/latest
1919
.. _Product Documentation: https://developers.google.com/analytics/
2020

@@ -25,12 +25,12 @@ In order to use this library, you first need to go through the following steps:
2525

2626
1. `Select or create a Cloud Platform project.`_
2727
2. `Enable billing for your project.`_
28-
3. `Enable the Analytics Admin API.`_
28+
3. `Enable the Analytics Admin.`_
2929
4. `Setup Authentication.`_
3030

3131
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
3232
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
33-
.. _Enable the Analytics Admin API.: https://developers.google.com/analytics/
33+
.. _Enable the Analytics Admin.: https://developers.google.com/analytics/
3434
.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
3535

3636
Installation
@@ -53,7 +53,7 @@ Code samples and snippets
5353

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

56-
.. _samples/: https://github.com/googleapis/python-analytics-admin/tree/main/samples
56+
.. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-analytics-admin/samples
5757

5858

5959
Supported Python Versions
@@ -97,12 +97,12 @@ Windows
9797
Next Steps
9898
~~~~~~~~~~
9999

100-
- Read the `Client Library Documentation`_ for Analytics Admin API
100+
- Read the `Client Library Documentation`_ for Analytics Admin
101101
to see other available methods on the client.
102-
- Read the `Analytics Admin API Product documentation`_ to learn
102+
- Read the `Analytics Admin Product documentation`_ to learn
103103
more about the product and see How-to Guides.
104104
- View this `README`_ to see the full list of Cloud
105105
APIs that we cover.
106106

107-
.. _Analytics Admin API Product documentation: https://developers.google.com/analytics/
107+
.. _Analytics Admin Product documentation: https://developers.google.com/analytics/
108108
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md

‎packages/google-analytics-admin/docs/index.rst‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ API Reference
1111
.. toctree::
1212
:maxdepth: 2
1313

14-
admin_v1alpha/services_
15-
admin_v1alpha/types_
14+
admin_v1alpha/services
15+
admin_v1alpha/types
1616

1717
API Reference
1818
-------------
1919
.. toctree::
2020
:maxdepth: 2
2121

22-
admin_v1beta/services_
23-
admin_v1beta/types_
22+
admin_v1beta/services
23+
admin_v1beta/types
2424

2525

2626
Changelog
@@ -31,4 +31,4 @@ For a list of all ``google-analytics-admin`` releases:
3131
.. toctree::
3232
:maxdepth: 2
3333

34-
changelog
34+
CHANGELOG
File renamed without changes.

‎packages/google-analytics-admin/noxfile.py‎

Lines changed: 25 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -22,43 +22,41 @@
2222
import pathlib
2323
import re
2424
import shutil
25-
from typing import Dict, List
2625
import warnings
2726

2827
import nox
2928

30-
FLAKE8_VERSION = "flake8==6.1.0"
31-
BLACK_VERSION = "black[jupyter]==23.7.0"
32-
ISORT_VERSION = "isort==5.11.0"
29+
BLACK_VERSION = "black==22.3.0"
30+
ISORT_VERSION = "isort==5.10.1"
3331
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3432

35-
DEFAULT_PYTHON_VERSION = "3.8"
33+
DEFAULT_PYTHON_VERSION = "3.9"
3634

37-
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11"]
35+
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"]
3836
UNIT_TEST_STANDARD_DEPENDENCIES = [
3937
"mock",
4038
"asyncmock",
4139
"pytest",
4240
"pytest-cov",
4341
"pytest-asyncio",
4442
]
45-
UNIT_TEST_EXTERNAL_DEPENDENCIES: List[str] = []
46-
UNIT_TEST_LOCAL_DEPENDENCIES: List[str] = []
47-
UNIT_TEST_DEPENDENCIES: List[str] = []
48-
UNIT_TEST_EXTRAS: List[str] = []
49-
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
50-
51-
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8"]
52-
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
43+
UNIT_TEST_EXTERNAL_DEPENDENCIES = []
44+
UNIT_TEST_LOCAL_DEPENDENCIES = []
45+
UNIT_TEST_DEPENDENCIES = []
46+
UNIT_TEST_EXTRAS = []
47+
UNIT_TEST_EXTRAS_BY_PYTHON = {}
48+
49+
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"]
50+
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
5351
"mock",
5452
"pytest",
5553
"google-cloud-testutils",
5654
]
57-
SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = []
58-
SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = []
59-
SYSTEM_TEST_DEPENDENCIES: List[str] = []
60-
SYSTEM_TEST_EXTRAS: List[str] = []
61-
SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
55+
SYSTEM_TEST_EXTERNAL_DEPENDENCIES = []
56+
SYSTEM_TEST_LOCAL_DEPENDENCIES = []
57+
SYSTEM_TEST_DEPENDENCIES = []
58+
SYSTEM_TEST_EXTRAS = []
59+
SYSTEM_TEST_EXTRAS_BY_PYTHON = {}
6260

6361
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
6462

@@ -71,7 +69,6 @@
7169
"lint_setup_py",
7270
"blacken",
7371
"docs",
74-
"format",
7572
]
7673

7774
# Error if a python version is missing
@@ -85,7 +82,7 @@ def lint(session):
8582
Returns a failure if the linters find linting errors or sufficiently
8683
serious code quality issues.
8784
"""
88-
session.install(FLAKE8_VERSION, BLACK_VERSION)
85+
session.install("flake8", BLACK_VERSION)
8986
session.run(
9087
"black",
9188
"--check",
@@ -190,6 +187,7 @@ def unit(session):
190187

191188

192189
def install_systemtest_dependencies(session, *constraints):
190+
193191
# Use pre-release gRPC for system tests.
194192
# Exclude version 1.52.0rc1 which has a known issue.
195193
# See https://github.com/grpc/grpc/issues/32163
@@ -275,7 +273,7 @@ def cover(session):
275273
session.run("coverage", "erase")
276274

277275

278-
@nox.session(python="3.9")
276+
@nox.session(python=DEFAULT_PYTHON_VERSION)
279277
def docs(session):
280278
"""Build the docs for this library."""
281279

@@ -301,7 +299,7 @@ def docs(session):
301299
)
302300

303301

304-
@nox.session(python="3.9")
302+
@nox.session(python=DEFAULT_PYTHON_VERSION)
305303
def docfx(session):
306304
"""Build the docfx yaml files for this library."""
307305

@@ -338,7 +336,7 @@ def docfx(session):
338336
)
339337

340338

341-
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
339+
@nox.session(python="3.11")
342340
def prerelease_deps(session):
343341
"""Run all tests with prerelease versions of dependencies installed."""
344342

@@ -347,7 +345,9 @@ def prerelease_deps(session):
347345
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
348346
session.install(*unit_deps_all)
349347
system_deps_all = (
350-
SYSTEM_TEST_STANDARD_DEPENDENCIES + SYSTEM_TEST_EXTERNAL_DEPENDENCIES
348+
SYSTEM_TEST_STANDARD_DEPENDENCIES
349+
+ SYSTEM_TEST_EXTERNAL_DEPENDENCIES
350+
+ SYSTEM_TEST_EXTRAS
351351
)
352352
session.install(*system_deps_all)
353353

@@ -405,24 +405,3 @@ def prerelease_deps(session):
405405
session.run("python", "-c", "import google.auth; print(google.auth.__version__)")
406406

407407
session.run("py.test", "tests/unit")
408-
409-
system_test_path = os.path.join("tests", "system.py")
410-
system_test_folder_path = os.path.join("tests", "system")
411-
412-
# Only run system tests if found.
413-
if os.path.exists(system_test_path):
414-
session.run(
415-
"py.test",
416-
"--verbose",
417-
f"--junitxml=system_{session.python}_sponge_log.xml",
418-
system_test_path,
419-
*session.posargs,
420-
)
421-
if os.path.exists(system_test_folder_path):
422-
session.run(
423-
"py.test",
424-
"--verbose",
425-
f"--junitxml=system_{session.python}_sponge_log.xml",
426-
system_test_folder_path,
427-
*session.posargs,
428-
)

‎packages/google-analytics-admin/samples/generated_samples/analyticsadmin_v1beta_generated_analytics_admin_service_acknowledge_user_data_collection_async.py‎

Lines changed: 0 additions & 53 deletions
This file was deleted.

‎packages/google-analytics-admin/samples/generated_samples/analyticsadmin_v1beta_generated_analytics_admin_service_acknowledge_user_data_collection_sync.py‎

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)