GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Moving core into designated package. by dhermes · Pull Request #2367 · googleapis/google-cloud-python Conversation
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @@ -0,0 +1,58 @@ | |||
| import os | |||
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) | ||
|
|
||
| with open(os.path.join(PACKAGE_ROOT, 'README.rst')) as file_obj: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| REQUIREMENTS = [ | ||
| 'httplib2 >= 0.9.1', | ||
| 'googleapis-common-protos', | ||
| 'oauth2client >= 2.0.1', |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@dhermes do you want to try to address those still missing items in this PR or another? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I'd like to iron out the strategy during this PR and I'd love to hear from @tseaver. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
bdd4ab0 to
d24c138
Compare
|
FYI I folded the license header change and the upper bound for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
For the tests, I would suggest:
Even if you decide to use nox to automate across the packages, you can still use tox within each package. The sample I sent you earlier does just that (nox is top-level, but nox just shells out to tox for each sub-folder). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
D'oh! Forgot |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
d24c138 to
796226a
Compare
|
@tseaver @jonparrott Isolating |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
796226a to
3ff2b58
Compare
There was an error while loading. Please reload this page.
|
PTAL. I created a No longer true:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| - tox -e lint | ||
| - tox -e cover | ||
| - cd core && tox -e cover | ||
| - (cd core && tox -e cover) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -0,0 +1,3 @@ | |||
| include README.rst | |||
| graft google | |||
| global-exclude *.pyc | |||
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
f35ce35 to
7fbc61f
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm really uncomfortable with where the core subdirectory change is going: it is causing us to replicate files / testing logic, etc. all over the place.
Could we avoid that, and have separate files in the root, instead? E.g. setup_core.py, tox-core.ini, README-core.py, etc.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # Packages in the "google.cloud" package that we don't own. | ||
| */google/cloud/gapic/* | ||
| fail_under = 100 | ||
| show_missing = True |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| - (cd core && tox -e py34) | ||
| - tox -e lint | ||
| - tox -e cover | ||
| - (cd core && tox -e cover) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| DEFAULT_USER_AGENT = 'gcloud-python/{0}'.format( | ||
| get_distribution('google-cloud').version) | ||
| get_distribution('google-cloud-core').version) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@tseaver how does that avoid duplication? That only makes things more complicated because the package-specific setup.py and manifest will have to go out of its way to exclude the other packages. It also breaks the convention of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tseaver Regarding duplication, these are the things right now that are being duplicated
The As far as the isolation, you even see with some of the commits in this PR that putting This way we can be sure what each subpackage depends on and what needs to be tested for users that don't install the umbrella package. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
f9a8a5c to
b950f8f
Compare
| IGNORED_FILES = [ | ||
| os.path.join('docs', 'conf.py'), | ||
| os.path.join('google', '__init__.py'), | ||
| os.path.join('google', 'cloud', '__init__.py'), |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| setup( | ||
| name='google-cloud-core', | ||
| version='0.19.0', |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 'Programming Language :: Python :: 3.5', | ||
| 'Topic :: Internet', | ||
| ], | ||
| } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| def __exit__(self, exc_type, exc_val, exc_tb): | ||
| import os | ||
| os.remove(self.name) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| --cov-append \ | ||
| --cov-config {toxinidir}/.coveragerc \ | ||
| core/unit_tests | ||
| coverage report --show-missing --fail-under=100 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
e760490 to
02087b0
Compare
02087b0 to
bb30d08
Compare
bb30d08 to
055716f
Compare
Only files have been moved for now. Will be made into a proper package shortly. Done via: $ mkdir -p core/google/cloud/streaming $ cp google/__init__.py core/google/__init__.py $ git add core/google/__init__.py $ cp google/cloud/__init__.py core/google/cloud/__init__.py $ git add core/google/cloud/__init__.py $ git mv google/cloud/_helpers.py core/google/cloud/_helpers.py $ git mv google/cloud/_testing.py core/google/cloud/_testing.py $ git mv google/cloud/client.py core/google/cloud/client.py $ git mv google/cloud/connection.py core/google/cloud/connection.py $ git mv google/cloud/credentials.py core/google/cloud/credentials.py $ git mv google/cloud/environment_vars.py core/google/cloud/environment_vars.py $ git mv google/cloud/exceptions.py core/google/cloud/exceptions.py $ git mv google/cloud/iterator.py core/google/cloud/iterator.py $ git mv google/cloud/operation.py core/google/cloud/operation.py $ git mv google/cloud/streaming/__init__.py core/google/cloud/streaming/__init__.py $ git mv google/cloud/streaming/buffered_stream.py core/google/cloud/streaming/buffered_stream.py $ git mv google/cloud/streaming/exceptions.py core/google/cloud/streaming/exceptions.py $ git mv google/cloud/streaming/http_wrapper.py core/google/cloud/streaming/http_wrapper.py $ git mv google/cloud/streaming/stream_slice.py core/google/cloud/streaming/stream_slice.py $ git mv google/cloud/streaming/transfer.py core/google/cloud/streaming/transfer.py $ git mv google/cloud/streaming/util.py core/google/cloud/streaming/util.py
Also changing the version from 0.19.0 to 0.20.0dev. Done by adding new setup.py, MANIFEST and README to core subdirectory, adding core to the list of packages in verify_included_modules, updating the umbrella setup to depend on core and adding the local core package to the umbrella tox config.
See googleapis#2391 for larger discussion.
Done via: $ mkdir -p core/unit_tests/streaming $ cp unit_tests/__init__.py core/unit_tests/__init__.py $ git add core/unit_tests/__init__.py $ cp unit_tests/streaming/__init__.py core/unit_tests/streaming/__init__.py $ git add core/unit_tests/streaming/__init__.py $ git mv unit_tests/test__helpers.py core/unit_tests/test__helpers.py $ git mv unit_tests/test_client.py core/unit_tests/test_client.py $ git mv unit_tests/test_connection.py core/unit_tests/test_connection.py $ git mv unit_tests/test_credentials.py core/unit_tests/test_credentials.py $ git mv unit_tests/test_exceptions.py core/unit_tests/test_exceptions.py $ git mv unit_tests/test_iterator.py core/unit_tests/test_iterator.py $ git mv unit_tests/test_operation.py core/unit_tests/test_operation.py $ git mv unit_tests/streaming/test_buffered_stream.py core/unit_tests/streaming/test_buffered_stream.py $ git mv unit_tests/streaming/test_exceptions.py core/unit_tests/streaming/test_exceptions.py $ git mv unit_tests/streaming/test_http_wrapper.py core/unit_tests/streaming/test_http_wrapper.py $ git mv unit_tests/streaming/test_stream_slice.py core/unit_tests/streaming/test_stream_slice.py $ git mv unit_tests/streaming/test_transfer.py core/unit_tests/streaming/test_transfer.py $ git mv unit_tests/streaming/test_util.py core/unit_tests/streaming/test_util.py
The coverage RC file for the core subpackage intentionally leaves out google.cloud._testing. This is because the core tests don't use the entire functionality of the _testing module, but the umbrella package does. By leaving the module in the google-cloud-core package, every other package can depend on it and have the test helpers ready to access.
This was necessary because some lines were only tested transitively in the umbrella package, rather than directly by the core tests.
Also updating Travis config to incorporate core package.
055716f to
8643a91
Compare
|
@tseaver Rebased all the lower PRs so this is ready to go. Any remaining issues that haven't been punted on? Do you want me to have a tracking issue for the remaining work:
Also @tseaver how do you feel about my manually making a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tseaver We are green after rebase, all systems go. PTAL. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@dhermes LGTM. One question: wouldn't we logically have different versions / tags for the different API libraries, separate from |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@tseaver Yes. The idea was laid out here: https://github.com/GoogleCloudPlatform/gcloud-common/issues/138#issuecomment-220830613 I was thinking we'd get all packages at UPDATE: As for the tags, I figured we'd have a script that literally parses the tag name for a tag build and then determines which package needs to be pushed in that tag release. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Moving core into designated package.
This change is removing the error message from vendor sqlglot codes. See screenshot/6pJ3X25XNE8uurW
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.