Uh oh!
There was an error while loading. Please reload this page.
Moving core into designated package. - #2367
Conversation
| @@ -0,0 +1,58 @@ | |||
| import os | |||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
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: |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| REQUIREMENTS = [ | ||
| 'httplib2 >= 0.9.1', | ||
| 'googleapis-common-protos', | ||
| 'oauth2client >= 2.0.1', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
theacodes
commented
Sep 20, 2016
@dhermes do you want to try to address those still missing items in this PR or another? |
dhermes
commented
Sep 20, 2016
I'd like to iron out the strategy during this PR and I'd love to hear from @tseaver. |
bdd4ab0 to
d24c138Comparedhermes
commented
Sep 20, 2016
FYI I folded the license header change and the upper bound for |
theacodes
commented
Sep 20, 2016
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). |
dhermes
commented
Sep 20, 2016
D'oh! Forgot |
d24c138 to
796226aComparedhermes
commented
Sep 21, 2016
@tseaver@jonparrott Isolating |
796226a to
3ff2b58ComparePTAL. I created a No longer true:
|
| - tox -e lint | ||
| - tox -e cover | ||
| - cd core && tox -e cover | ||
| - (cd core && tox -e cover) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| @@ -0,0 +1,3 @@ | |||
| include README.rst | |||
| graft google | |||
| global-exclude *.pyc | |||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
f35ce35 to
7fbc61fCompare
tseaver
left a comment
There was a problem hiding this comment.
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.
| # Packages in the "google.cloud" package that we don't own. | ||
| */google/cloud/gapic/* | ||
| fail_under = 100 | ||
| show_missing = True |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
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) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
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) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
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 |
dhermes
commented
Sep 22, 2016
@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. |
f9a8a5c to
b950f8fCompare| IGNORED_FILES = [ | ||
| os.path.join('docs', 'conf.py'), | ||
| os.path.join('google', '__init__.py'), | ||
| os.path.join('google', 'cloud', '__init__.py'), |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| setup( | ||
| name='google-cloud-core', | ||
| version='0.19.0', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| 'Programming Language :: Python :: 3.5', | ||
| 'Topic :: Internet', | ||
| ], | ||
| } |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
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) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
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 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
e760490 to
02087b0Compare02087b0 to
bb30d08Comparebb30d08 to
055716fCompareOnly 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
8643a91Comparedhermes
commented
Sep 23, 2016
@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 |
dhermes
commented
Sep 23, 2016
@tseaver We are green after rebase, all systems go. PTAL. |
tseaver
commented
Sep 23, 2016
@dhermes LGTM. One question: wouldn't we logically have different versions / tags for the different API libraries, separate from |
@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. |
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
This is a tiny chunk of #2357 that should be easier to review and discuss.
Still missing (per discussion with @jonparrott):
core/tox.iniand run that separately, though this will become too slow, so maybe we'll switch to usingnox)NOTE: Has #2394 as diffbase.