Skip to content

Commit

Permalink
build(python): update docfx job to use new plugin (#57)
Browse files Browse the repository at this point in the history
* changes without context

* test(python): use constraints files to check dependency lower bounds

Use a constraints file when installing dependencies for system and unit tests nox sessions.

https://pip.pypa.io/en/stable/user_guide/#constraints-files
> Constraints files are requirements files that **only control which version of a requirement is installed, not whether it is installed or not**. Their syntax and contents is nearly identical to Requirements Files. There is one key difference: Including a package in a constraints file does not trigger installation of the package.

```
testing
├── constraints-3.10.txt
├── constraints-3.11.txt
├── constraints-3.6.txt
├── constraints-3.7.txt
├── constraints-3.8.txt
└── constraints-3.9.txt
```

Going forward, one constraints file (currently 3.6) will be populated with every library requirement and extra listed in the `setup.py`. The constraints file will pin each requirement to the lower bound. This ensures that library maintainers will see test failures if they forget to update a lower bound on a dependency.

See googleapis/python-bigquery#263 for an example

Source-Author: Bu Sun Kim <[email protected]>
Source-Date: Tue Mar 23 10:52:02 2021 -0600
Source-Repo: googleapis/synthtool
Source-Sha: 86ed43d4f56e6404d068e62e497029018879c771
Source-Link: googleapis/synthtool@86ed43d

* build(python): update docfx job to use new plugin

Source-Author: Dan Lee <[email protected]>
Source-Date: Tue Mar 30 19:36:37 2021 -0400
Source-Repo: googleapis/synthtool
Source-Sha: 4501974ad08b5d693311457e2ea4ce845676e329
Source-Link: googleapis/synthtool@4501974
  • Loading branch information
yoshi-automation authored Mar 31, 2021
1 parent 1f1fd7f commit ddc9afb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@
"ListNamespacesResponse",
"ListServicesRequest",
"ListServicesResponse",
"LookupServiceClient",
"Namespace",
"RegistrationServiceClient",
"ResolveServiceRequest",
"ResolveServiceResponse",
"Service",
"UpdateEndpointRequest",
"UpdateNamespaceRequest",
"UpdateServiceRequest",
"RegistrationServiceClient",
"LookupServiceClient",
)
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@
"ListNamespacesResponse",
"ListServicesRequest",
"ListServicesResponse",
"LookupServiceClient",
"Namespace",
"RegistrationServiceClient",
"ResolveServiceRequest",
"ResolveServiceResponse",
"Service",
"UpdateEndpointRequest",
"UpdateNamespaceRequest",
"UpdateServiceRequest",
"LookupServiceClient",
"RegistrationServiceClient",
)
4 changes: 1 addition & 3 deletions packages/google-cloud-service-directory/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ def docfx(session):
"""Build the docfx yaml files for this library."""

session.install("-e", ".")
# sphinx-docfx-yaml supports up to sphinx version 1.5.5.
# https://github.com/docascode/sphinx-docfx-yaml/issues/97
session.install("sphinx==1.5.5", "alabaster", "recommonmark", "sphinx-docfx-yaml")
session.install("sphinx", "alabaster", "recommonmark", "gcp-sphinx-docfx-yaml")

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
Expand Down
6 changes: 3 additions & 3 deletions packages/google-cloud-service-directory/synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/python-service-directory.git",
"sha": "db77e88a44ffdabd284d61775960079309071617"
"sha": "7504fee2fef1108b1856bf5efa00799c48c1a4a8"
}
},
{
Expand All @@ -19,14 +19,14 @@
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "86ed43d4f56e6404d068e62e497029018879c771"
"sha": "4501974ad08b5d693311457e2ea4ce845676e329"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "86ed43d4f56e6404d068e62e497029018879c771"
"sha": "4501974ad08b5d693311457e2ea4ce845676e329"
}
}
],
Expand Down

0 comments on commit ddc9afb

Please sign in to comment.