Skip to content

Commit

Permalink
return notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
AstrakhantsevaAA committed Jan 5, 2024
1 parent 9b335a2 commit 86daab7
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:

Expand All @@ -42,7 +42,7 @@ jobs:
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
installer-parallel: true

- name: Load cached venv
id: cached-poetry-dependencies
Expand All @@ -53,11 +53,11 @@ jobs:

- name: Install dependencies
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --all-extras --with airflow,providers,pipeline,sentry-sdk
run: poetry install --all-extras --with airflow, providers, pipeline, sentry-sdk

- name: Run make lint
run: |
export PATH=$PATH:"/c/Program Files/usr/bin" # needed for Windows
export PATH=$PATH:"/c/Program Files/usr/bin" # needed for Windows
make lint
# - name: print envs
Expand All @@ -75,4 +75,4 @@ jobs:
- name: Check matrix job results
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: |
echo "One or more matrix job tests failed or were cancelled. You may need to re-run them." && exit 1
echo "One or more matrix job tests failed or were cancelled. You may need to re-run them." && exit 1
2 changes: 1 addition & 1 deletion .github/workflows/test_local_destinations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-local-destinations

- name: Install dependencies
run: poetry install --no-interaction -E postgres -E duckdb -E parquet -E filesystem -E cli -E weaviate --with sentry-sdk --with pipeline
run: poetry install --no-interaction -E postgres -E duckdb -E parquet -E filesystem -E cli -E weaviate --with sentry-sdk, pipeline, notebook

- name: create secrets.toml
run: pwd && echo "$DLT_SECRETS_TOML" > tests/.dlt/secrets.toml
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,3 @@ The dlt project is quickly growing, and we're excited to have you join our commu
## License

DLT is released under the [Apache 2.0 License](LICENSE.txt).

2 changes: 0 additions & 2 deletions dlt/cli/pipeline_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from dlt.common.destination.reference import TDestinationReferenceArg
from dlt.common.runners import Venv
from dlt.common.runners.stdout import iter_stdout
from dlt.common.runtime.exec_info import is_notebook
from dlt.common.schema.utils import group_tables_by_resource, remove_defaults
from dlt.common.storages import FileStorage, PackageStorage
from dlt.pipeline.helpers import DropCommand
Expand Down Expand Up @@ -302,6 +301,5 @@ def _display_pending_packages() -> Tuple[Sequence[str], Sequence[str]]:
# fmt.echo("%s: %s" % (fmt.style(k, fg="green"), v))
for warning in drop.info["warnings"]:
fmt.warning(warning)

if fmt.confirm("Do you want to apply these changes?", default=False):
drop()
9 changes: 7 additions & 2 deletions docs/examples/archive/sources/google_sheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,19 @@ def google_spreadsheet(
# pprint.pprint(meta)
def get_sheet(sheet_name: str) -> Iterator[DictStrAny]:
# get list of list of typed values
result = sheets.spreadsheets().values().get(
result = (
sheets.spreadsheets()
.values()
.get(
spreadsheetId=spreadsheet_id,
range=sheet_name,
# unformatted returns typed values
valueRenderOption="UNFORMATTED_VALUE",
# will return formatted dates
dateTimeRenderOption="FORMATTED_STRING",
).execute()
)
.execute()
)

# pprint.pprint(result)
values = result.get("values")
Expand Down
1 change: 1 addition & 0 deletions docs/website/docs/reference/notebook-magic.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Possible operations are:
5. `failed-jobs`
6. `drop-pending-packages`
7. `schema`
8. `load-package`

Examples:

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ dbt-duckdb=">=1.2.0"
pymongo = ">=4.3.3"
pandas = ">2"

[tool.poetry.group.notebook.dependencies]
ipython = ">=7.28.0"

[tool.black] # https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
line-length = 100
preview = true
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/test_magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_list_pipeline_command(shell_interactive):

# @pytest.mark.parametrize(
# "operation",
# ["info", "sync", "trace", "failed-jobs", "drop-pending-packages", "schema"],
# ["info", "sync", "load-package", "trace", "failed-jobs", "drop-pending-packages", "schema"],
# )
# def test_operation_pipeline_command(shell_interactive, operation, run_pipeline):
# result = shell_interactive.run_line_magic(
Expand Down

0 comments on commit 86daab7

Please sign in to comment.