Skip to content

Commit

Permalink
Add more BigQuery support. Fix up documentation. (#60)
Browse files Browse the repository at this point in the history
* add Table.schema property

* add bigquery.Client class

* add Table.query method

* add Table.__getattr__

* don't change the project id

* improve exception handling

* Remove Table.auth and simplify Table.client

* add dependency on db-dtypes

* fix up poetry docs
  • Loading branch information
troyraen authored Jul 22, 2024
1 parent 7d8f55e commit 017204c
Show file tree
Hide file tree
Showing 8 changed files with 467 additions and 159 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## \[Unreleased\]

(none)
### Added

- Add `bigquery.Client` class.
- Add class attributes `Table.query`, `Table.schema`.
- Add dependency on 'db-dtypes' to support BigQuery -> Pandas.

### Changed

- Remove `Table.auth` and simplify `Table.client`. This functionality is now managed by
`bigquery.Client`.
- In `Table` and `Topic`, the project ID is no longer changed away from what the user provided.
It was more confusing and dangerous than it was helpful.

### Removed

- `Table.auth`

## \[v0.3.9\] - 2024-07-02

Expand Down
43 changes: 14 additions & 29 deletions docs/source/for-developers/manage-dependencies-poetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,11 @@ conda activate poetry-py311
pip install poetry
```

If you come back to this later you may need to reactivate your environment.

```bash
conda activate poetry-py311
```

If you want to start over with a fresh environment, deactivate the environment and remove it.

```bash
conda deactivate
conda remove --name poetry-py311 --all
```

## Install existing dependencies

This repo already contains a poetry.lock file, so running `poetry install` will give you
the exact versions specified there ([Poetry install dependencies](https://python-poetry.org/docs/basic-usage/#installing-dependencies)).

If you would rather start over completely, skip ahead to the next section.

```bash
poetry install
```
Expand All @@ -47,6 +32,20 @@ If you want to install the docs dependencies as well, use:
poetry install --extras=docs
```

## Add a Dependency

Here are two examples
([Poetry add dependencies](https://python-poetry.org/docs/managing-dependencies/#adding-a-dependency-to-a-group),
see also: [Poetry version-constraint syntax](https://python-poetry.org/docs/dependency-specification/)):

```bash
# This example adds pandas to the main dependencies.
poetry add pandas

# This example adds sphinx to the docs dependencies.
poetry add sphinx --group docs.dependencies
```

## Update Dependency Versions

To upgrade to the latest versions compatible with the pyproject.toml file, you have two options below
Expand All @@ -62,17 +61,3 @@ poetry update
```

Now commit the updated poetry.lock file to the repo.

## Add a Dependency

Here are two examples
([Poetry add dependencies](https://python-poetry.org/docs/managing-dependencies/#adding-a-dependency-to-a-group),
see also: [Poetry version-constraint syntax](https://python-poetry.org/docs/dependency-specification/)):

```bash
# This example adds pandas to the main dependencies.
poetry add pandas

# This example adds sphinx to the docs dependencies.
poetry add sphinx --group docs.dependencies
```
Loading

0 comments on commit 017204c

Please sign in to comment.