Skip to content

Excluding system tests from being installed. - #1373

Merged
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:exclude-sys-tests
Feb 12, 2016
Merged

Excluding system tests from being installed.#1373
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:exclude-sys-tests

Conversation

@dhermes

Copy link
Copy Markdown
Contributor

@tseaver I noticed this while trying to from system_tests import populate_datastore and the import failed due to reasons that were "resolved" in #1349.

Then I peaked and realized that the error was coming from

/usr/local/lib/python2.7/dist-packages/system_tests/populate_datastore.py
/usr/local/lib/python2.7/dist-packages/gcloud/datastore/client.py

Notice that in our repo:

>>>fromsetuptoolsimportfind_packages>>>find_packages()
['gcloud',
'system_tests',
'gcloud.storage',
'gcloud.pubsub',
'gcloud.dns',
'gcloud.bigtable',
'gcloud.bigquery',
'gcloud.resource_manager',
'gcloud.search',
'gcloud.datastore',
'gcloud.streaming',
'gcloud.storage.demo',
'gcloud.bigtable.happybase',
'gcloud.bigtable._generated',
'gcloud.datastore.demo',
'gcloud.datastore._generated']

(This is due to the fact that system_tests/__init__.py was added in #954 / #273)

@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 8, 2016
@tseaver

Copy link
Copy Markdown
Contributor

Note that excluding in MANIFEST.in will exclude them from the sdist, which can make it hard for downstreams to test (if that matters).

On what host were those /usr/local/lib/python2.7/dist-lib/ paths found?

@dhermes

Copy link
Copy Markdown
ContributorAuthor

Ubuntu 14.04

@dhermes

Copy link
Copy Markdown
ContributorAuthor

@tseaver PTAL. I did a hacky thing my modifying sys.path in __main__.

@tseaver

Copy link
Copy Markdown
Contributor

We still don't want to ship /usr/local/lib/python2.7/dist-packages/system_tests/ to people

You mean we don't want those files to be there after they run sudo pip install gcloud? I'm thinking of downstream packagers, who might want to be able to run all the tests after creating a .deb/.rpm from the sdist.

@dhermes

Copy link
Copy Markdown
ContributorAuthor

You mean we don't want those files to be there after they run sudo pip install gcloud

Yep. Is there a middle ground?

@dhermes

Copy link
Copy Markdown
ContributorAuthor

@tseaver Bump

1 similar comment
@dhermes

Copy link
Copy Markdown
ContributorAuthor

@tseaver Bump

@dhermes

Copy link
Copy Markdown
ContributorAuthor

@tseaver PTAL

@tseaver

Copy link
Copy Markdown
Contributor

I'm still against stripping the system tests from the sdist. Can we move the importable support code into a subpackage of gcloud, and just keep system_tests off the PYTHONPATH?

@dhermes

Copy link
Copy Markdown
ContributorAuthor

Why do we want to ship our system tests?

@tseaver

Copy link
Copy Markdown
Contributor

So that downstream packagers (e.g., .deb/.rpm) can run them to verify they have working code?

@dhermes

Copy link
Copy Markdown
ContributorAuthor

Our system tests? These require a ton of set-up, including having to go to the Cloud Console and download a key.

@tseaver

Copy link
Copy Markdown
Contributor

I've gotten feedback from .deb/.rpm maintainers in the past that they wanted to be able to verify the working state of the code they package by running tests afterward. Maybe they wouldn't run the system tests.

OTOH, as the APIs change over time, asking users to run them to help debug configuration issues vs. software might be reasonable.

@dhermes

Copy link
Copy Markdown
ContributorAuthor

It's not like git clone is difficult for the .deb/.rpm maintainers, or for users that are able to offer useful help

@dhermes

Copy link
Copy Markdown
ContributorAuthor

@tseaver WDYT of my comment above?

@theacodes

Copy link
Copy Markdown
Contributor

LGTM, on the basis that gcloud isn't the type of library we would expect to see as an OS-level dependency. Nor do I think it's a good idea to pursue that path, as it would hold our releases and support subject to OS release cycles (which are generally very slow).

@dhermes

Copy link
Copy Markdown
ContributorAuthor

Filed #1451 for discussion of the possibility to ship the system tests as gcloud.system_tests. Merging for now.

dhermes added a commit that referenced this pull request Feb 12, 2016
Excluding system tests from being installed.
@dhermes
dhermes merged commit 62ba7c5 into googleapis:masterFeb 12, 2016
@dhermes
dhermes deleted the exclude-sys-tests branch February 12, 2016 20:22
dhermes added a commit to dhermes/google-cloud-python that referenced this pull request Feb 13, 2016
dhermes added a commit to dhermes/google-cloud-python that referenced this pull request Feb 19, 2016
Also removing system_tests/__init__.py so it is no longer
a package and making all imports happen locally (rather
than from the root of the project).
Changes originally inspired by emulator script breakages in googleapis#1373.
dhermes added a commit to dhermes/google-cloud-python that referenced this pull request Feb 19, 2016
Also removing system_tests/__init__.py so it is no longer
a package and making all imports happen locally (rather
than from the root of the project).
Changes originally inspired by emulator script breakages in googleapis#1373.
parthea pushed a commit that referenced this pull request Nov 24, 2025
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Mar 9, 2026
…1373)
This reverts commit 06ed15b33dc884da6dffbef5119e47f0fc4e1285.
parthea pushed a commit that referenced this pull request Apr 1, 2026
* feat: support non vectorized managed function
* fix mf tests
* fix dataframe apply
* fix series apply
* fix the decorator in tests
* fix test remote func
* add more tests
* remove unused import
* refactor rf in bff session
* del udf args
* fix docstring
* resolve the comments
* fix the attribute naming
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* resolve all comments
* resolve comments
* resolve comments
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* fix lint
* type ignore
* resolve comments
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yesThis human has signed the Contributor License Agreement.packagingtesting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@dhermes@tseaver@theacodes@googlebot