-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change gcloud package to google.cloud #2223
Commits on Sep 6, 2016
-
Renaming gcloud/ directory to google/cloud/.
Done via: $ mkdir google $ git mv gcloud google/cloud
Configuration menu - View commit details
-
Copy full SHA for 261c969 - Browse repository at this point
Copy the full SHA 261c969View commit details -
Renaming "import gcloud" statements as google.cloud.
Done via: $ git grep -l 'import gcloud' | \ > xargs sed -i s/'import gcloud'/'import google.cloud'/g
Configuration menu - View commit details
-
Copy full SHA for e55a1d8 - Browse repository at this point
Copy the full SHA e55a1d8View commit details -
Renaming "from gcloud import *" statements as google.cloud.
Done via: $ git grep -l 'from gcloud import' | \ > xargs sed -i s/'from gcloud import'/'from google.cloud import'/g
Configuration menu - View commit details
-
Copy full SHA for 416071b - Browse repository at this point
Copy the full SHA 416071bView commit details -
Renaming ">>> from gcloud.foo.bar import *" statements as google.cloud.
Done via: $ git grep -l '>>> from gcloud.' | \ > xargs sed -i s/'>>> from gcloud.'/'>>> from google.cloud.'/g
Configuration menu - View commit details
-
Copy full SHA for 835578f - Browse repository at this point
Copy the full SHA 835578fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d05a9d4 - Browse repository at this point
Copy the full SHA d05a9d4View commit details -
Rename remaining "gcloud" imports as "google.cloud".
This was done entirely via sed. First checked that the remaining imports were at the start of their respective lines: $ git grep 'from gcloud.*import' > anywhere.txt $ git grep '^[[:space:]]*from gcloud.*import' > line_start.txt $ diff -s anywhere.txt line_start.txt Files anywhere.txt and line_start.txt are identical $ rm -f anywhere.txt line_start.txt Then put all the imports in a text file $ git grep -h '^[[:space:]]*from gcloud.*import' > imports.txt Then parsed that file to get a list of the modules: $ cat << EOF > get_mods.py > def get_import(line): > a, b, c, d = line.strip().split(None, 3) > assert a == 'from' > assert c == 'import' > try: > e, f, g = b.split('.', 2) > except ValueError: > e, f = b.split('.') > assert e == 'gcloud' > return f > > with open('imports.txt', 'rb') as file_obj: > imported = sorted(set(map(get_import, file_obj.readlines()))) > > for mod in imported: > print(mod) > > EOF $ python get_mods.py > mods.txt $ rm -f imports.txt get_mods.py Then using the list of modules to rewrite the imports $ cat << 'EOF' > all-sed.sh > for mod in $(cat mods.txt); do > git grep -l "from gcloud.${mod}" | \ > xargs sed -i s/"from gcloud.${mod}"/"from google.cloud.${mod}"/g > done > > EOF $ /bin/bash all-sed.sh $ rm -f all-sed.sh mods.txt
Configuration menu - View commit details
-
Copy full SHA for 822e719 - Browse repository at this point
Copy the full SHA 822e719View commit details -
Renaming mentions of "gcloud-python" as "google-cloud-python".
Done via: $ git grep -l 'gcloud-python' | \ > xargs sed -i s/gcloud-python/google-cloud-python/g
Configuration menu - View commit details
-
Copy full SHA for ab18ce8 - Browse repository at this point
Copy the full SHA ab18ce8View commit details -
Renaming mentions of "hack-on-gcloud" as "hack-on-google-cloud-python".
Done via: $ git grep -l 'hack-on-gcloud' | \ > xargs sed -i s/hack-on-gcloud/hack-on-google-cloud-python/g
Configuration menu - View commit details
-
Copy full SHA for c13d2ec - Browse repository at this point
Copy the full SHA c13d2ecView commit details -
Renaming mentions of "gcloud" docs automodules as "google.cloud".
Done via: $ git grep -l 'automodule:: gcloud' | \ > xargs sed -i s/'automodule:: gcloud'/'automodule:: google.cloud'/g
Configuration menu - View commit details
-
Copy full SHA for f29999a - Browse repository at this point
Copy the full SHA f29999aView commit details -
Renaming docs mentions of "gcloud" as "google-cloud".
Done via: $ git grep -l '<gcloud.' | \ > xargs sed -i s/'<gcloud.'/'<google.cloud.'/g $ git grep -l '`gcloud\.' | \ > xargs sed -i s/'`gcloud\.'/'`google.cloud.'/g
Configuration menu - View commit details
-
Copy full SHA for f12fee4 - Browse repository at this point
Copy the full SHA f12fee4View commit details -
Renaming docs path in JSON docs (gcloud->google/cloud).
Done via: $ git grep -l '"gcloud/' | \ > xargs sed -i s/'"gcloud\/'/'"google\/cloud\/'/g
Configuration menu - View commit details
-
Copy full SHA for ae89f77 - Browse repository at this point
Copy the full SHA ae89f77View commit details -
Configuration menu - View commit details
-
Copy full SHA for 381d236 - Browse repository at this point
Copy the full SHA 381d236View commit details -
Replacing gcloud with google-cloud in scripts directory.
Many usages were ad-hoc so this was done by hand rather than via a sed script.
Configuration menu - View commit details
-
Copy full SHA for 3649f3a - Browse repository at this point
Copy the full SHA 3649f3aView commit details -
Renaming all GCLOUD_* env. vars. as GOOGLE_CLOUD_*.
Done via: $ git grep -l 'GCLOUD_' | \ > xargs sed -i s/'GCLOUD_'/'GOOGLE_CLOUD_'/g
Configuration menu - View commit details
-
Copy full SHA for ab59f8d - Browse repository at this point
Copy the full SHA ab59f8dView commit details -
Renaming all GCloudError as GoogleCloudError.
Done via: $ git grep -l GCloudError | \ > xargs sed -i s/GCloudError/GoogleCloudError/g
Configuration menu - View commit details
-
Copy full SHA for e12cc95 - Browse repository at this point
Copy the full SHA e12cc95View commit details -
Renaming all ~gcloud references as google.cloud.
Done via: $ git grep -l '~gcloud' | \ > xargs sed -i s/'~gcloud'/'~google.cloud'/g
Configuration menu - View commit details
-
Copy full SHA for faab61c - Browse repository at this point
Copy the full SHA faab61cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5910b22 - Browse repository at this point
Copy the full SHA 5910b22View commit details -
Configuration menu - View commit details
-
Copy full SHA for e6139ac - Browse repository at this point
Copy the full SHA e6139acView commit details -
Adding __init__.py to make google/ a package.
commit 6faf161 Author: Danny Hermes <[email protected]> Date: Tue Aug 30 12:39:46 2016 -0700 Converting almost all packages to namespace packages. As a result, the module objects for those packages can no longer contain members. Hence the following is no longer possible: >>> from google.cloud import storage >>> client = storage.Client() The "_generated" packages have not been converted to namespace packages and neither have "google.cloud.logging.handlers" nor "google.cloud.logging.handlers.transports". In addition, some members of "google.cloud.logging" have been moved into "google.cloud.logging.client" in order to be importable. Finally, the unit tests all pass at this commit, but `tox` fails to run them: the namespace imports appear broken to `tox` even though they aren't broken to the `virtualenv` for the given `tox` environment.
Configuration menu - View commit details
-
Copy full SHA for 73d2986 - Browse repository at this point
Copy the full SHA 73d2986View commit details -
Configuration menu - View commit details
-
Copy full SHA for adf5e21 - Browse repository at this point
Copy the full SHA adf5e21View commit details -
Configuration menu - View commit details
-
Copy full SHA for e03a7f8 - Browse repository at this point
Copy the full SHA e03a7f8View commit details -
Updating coveragerc omit section for namespace collisions.
In particular, omitting "google.cloud.logging.v2" and "google.cloud.pubsub.v1" since they are in our "google.cloud" namespace package but are not owned by us.
Configuration menu - View commit details
-
Copy full SHA for c2c9f4d - Browse repository at this point
Copy the full SHA c2c9f4dView commit details -
Restoring most services as non-namespace packages.
For now, logging and pubsub will remain due to collision with the GAX generated names.
Configuration menu - View commit details
-
Copy full SHA for 4534d9a - Browse repository at this point
Copy the full SHA 4534d9aView commit details -
Removing json-docs from Travis config.
This is a temporary change since the JSON docs are in a state of flux. The rename slightly breaks the JSON docs, but it isn't worth patching during this change set.
Configuration menu - View commit details
-
Copy full SHA for fee8d0d - Browse repository at this point
Copy the full SHA fee8d0dView commit details