| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| """ | ||
| row = self._low_level_table.row(row) | ||
| if isinstance(column, six.binary_type): | ||
| column = column.decode('utf-8') |
|
@jgeewax HappyBase also has a counter_set but as of now, I have made it NotImplemented because Bigtable doesn't have a way to make it atomic. WDYT is the right move here? I did make a note in the docstring of counter_get that .. note::
Application code should **never** store a counter value directly;
use the atomic :meth:`counter_inc` and :meth:`counter_dec` methods
for that.
|
Sorry, something went wrong.
|
This LGTM, although from a readability nit standpoint counter_inc is a little hard to follow at first glance. I'm unsure why. |
Sorry, something went wrong.
|
RE: "Hard to follow." That's the kind of feedback I was hoping to surface (by breaking into small PRs). Do you think the low-level row should handle more of the responsibilities? Do you think the method should use a helper? etc. |
Sorry, something went wrong.
|
Perhaps just some comments in-line. Poor example, but what is bytes_value = column_cells[0][0] doing exactly? Why [0][0]? |
Sorry, something went wrong.
|
(this also just may be my unfamiliarity with bigtable showing) |
Sorry, something went wrong.
| column_cells = modified_cells[column_family_id][column_qualifier] | ||
| if len(column_cells) != 1: | ||
| raise ValueError('Expected server to return one modified cell.') | ||
| bytes_value = column_cells[0][0] |
|
I don't think it's your unfamiliarity, but that also is good in that you don't have a bias towards how things should be. I had to look up what [0][0] is for: Row.commit_modifications returns a dictionary keyed by column families. Each column family contains a dictionary keys by column names (within the family). Each column has a list of tuples. Each tuple is a pair of the bytes in the cell and the associated timestamp. It's enough to need a breather after the explanation. |
Sorry, something went wrong.
|
Wow, that is a lot to explain. |
Sorry, something went wrong.
|
Luckily the docstring proves that a picture is worth a thousand words: {
u'col-fam-id': {
b'col-name1': [
(b'cell-val', datetime.datetime(...)),
(b'cell-val-newer', datetime.datetime(...)),
],
b'col-name2': [
(b'altcol-cell-val', datetime.datetime(...)),
],
},
u'col-fam-id2': {
b'col-name3-but-other-fam': [
(b'foo', datetime.datetime(...)),
],
},
} |
Sorry, something went wrong.
|
Ah, very helpful. Can you include a comment that notes the expected format of the column_cells object? |
Sorry, something went wrong.
|
LGTM, please squash commits. |
Sorry, something went wrong.
Implementing HappyBase Table atomic counter helpers.
* fix: makes default token_url universe aware * fix defaulting
🤖 I have created a release *beep* *boop* --- ## [2.30.0](https://togithub.com/googleapis/google-auth-library-python/compare/v2.29.0...v2.30.0) (2024-06-06) ### Features * Add WebAuthn plugin component to handle WebAuthn get assertion request ([#1464](https://togithub.com/googleapis/google-auth-library-python/issues/1464)) ([e25f336](https://togithub.com/googleapis/google-auth-library-python/commit/e25f336ab49c2018a222458a95ebe083e8a4eb2a)) * ECP Provider drop cryptography requirement ([#1524](https://togithub.com/googleapis/google-auth-library-python/issues/1524)) ([a821d71](https://togithub.com/googleapis/google-auth-library-python/commit/a821d719e2fc7bcdc21737fdf175d6f06aa9a56a)) * Enable webauthn plugin for security keys ([#1528](https://togithub.com/googleapis/google-auth-library-python/issues/1528)) ([e2d5e63](https://togithub.com/googleapis/google-auth-library-python/commit/e2d5e635da2cb2caf8240fb9e07fc381442a9d0c)) ### Bug Fixes * Fix id_token iam endpoint for non-gdu service credentials ([#1506](https://togithub.com/googleapis/google-auth-library-python/issues/1506)) ([93d681e](https://togithub.com/googleapis/google-auth-library-python/commit/93d681e6cfb15eb4a3efada623be8ba73b302257)) * Makes default token_url universe aware ([#1514](https://togithub.com/googleapis/google-auth-library-python/issues/1514)) ([045776e](https://togithub.com/googleapis/google-auth-library-python/commit/045776e5dfa3fb172ffaeb59bfe5c637778a5d34)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
#1541) * bug: fixes discrepancy btwn python-api-core & bigquery re object default timeout * Fix: loosen ipywidget dependency (#1504) * fix: updates ipywidget dependency * fix: updates ipywidget version number * chore(main): release 3.6.0 (#1490) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * docs: Remove < 3.11 reference from README (#1502) * chore(python): upgrade gcp-releasetool in .kokoro [autoapprove] (#1508) Source-Link: googleapis/synthtool@5f2a608 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8555f0e37e6261408f792bfd6635102d2da5ad73f8f09bcb24f25e6afb5fac97 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * feat: add `connection_properties` and `create_session` to `LoadJobConfig` (#1509) * feat: added `connection_properties` and `create_session` in load job * chore(deps): update all dependencies (#1501) * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Anthonios Partheniou <partheniou@google.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore(deps): update all dependencies (#1513) * feat: add default_query_job_config property and property setter to BQ client (#1511) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Make sure to open an issue as a [feature request](https://togithub.com/googleapis/python-bigquery/issues/1512) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) Fixes - [feature request](https://togithub.com/googleapis/python-bigquery/issues/1512)🦕 - [internal bug](https://b.corp.google.com/issues/271044948) * chore(deps): update all dependencies (#1514) * chore(deps): update dependency charset-normalizer to v3.1.0 (#1518) * chore(main): release 3.7.0 (#1507) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * feat: expose configuration property on CopyJob, ExtractJob, LoadJob, QueryJob (#1521) * feat: expose configuration property on CopyJob, ExtractJob, LoadJob, QueryJob Note for google-cloud-bigquery developers: This also refactors these classes so that `_set_properties` does not modify the `_properties` dictionary in-place. Doing so was also mutating the request object, making it difficult to debug what request was _actually_ sent. Before this change, many tests hallucinated that the request was always equal to the response. * E google.api_core.exceptions.BadRequest: 400 Clone operation with write disposition WRITE_TRUNCATE is not supported. Please try again with WRITE_EMPTY. * chore(deps): Update nox in .kokoro/requirements.in [autoapprove] (#1527) Source-Link: googleapis/synthtool@92006bb Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2e247c7bf5154df7f98cce087a20ca7605e236340c7d6d1a14447e5c06791bd6 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * feat: add default LoadJobConfig to Client (#1526) * feat: add bool, int, float, string dtype to to_dataframe (#1529) * fix: loosen ipywidgets restrictions further to address ipython compatibility issues (#1531) * fix: loosen ipywidgets restrictions further to address ipython compatibility issues * include ipywidgets in prerelease deps * show all package versions * add ipykernel dependency * ipykernel in noxfile * oops * chore(main): release 3.8.0 (#1525) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * fix: keyerror when the load_table_from_dataframe accesses a unmapped dtype dataframe index (#1535) * feat: expose query job on dbapi cursor (#1520) Co-authored-by: Tim Swast <swast@google.com> * chore(main): release 3.9.0 (#1537) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore: update tests to be compatible with pandas 2.0 (#1538) * chore: update tests to be compatible with pandas 2.0 * use StringDtype without storage argument * avoid Float64Dtype on older pandas * chore(deps): update all dependencies (#1522) * chore: updates minimum version of bqstorage (#1542) * chore: updates minimum version of bqstorage * removes unneeded test * updates linting, removes unneeded comment * updates conditional checks, comments, adds test * Removes test, adds pragma no cover * Removes test * fix linting error --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Atsushi Yamamoto <yamaatsushi927@gmail.com> Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Shobhit Singh <just.shobhit@gmail.com> Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> Co-authored-by: chelsea-lin <124939984+chelsea-lin@users.noreply.github.com> Co-authored-by: Tim Swast <swast@google.com> Co-authored-by: r1b <robert.cole.jensen@gmail.com>
| Back | FazBrowse Home | New Git URL |
No description provided.