Skip to content
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

Functionality for dumping and loading a Splitgraph registry to/from a file #445

Merged
merged 24 commits into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b6459bf
Change `repoTopic` to `repoTopicsAgg` in the GQL API client (future b…
mildbyte Apr 17, 2021
07916ab
Add Pydantic to the project requirements. Add models for the current …
mildbyte Apr 21, 2021
0d6ac06
Add parts of the repository loading script to dump a Splitgraph insta…
mildbyte Apr 21, 2021
f4a0ca5
Fix the existing commandline metadata tests.
mildbyte Apr 21, 2021
a97bfe1
Add a test for the new `sgr cloud dump` command
mildbyte Apr 21, 2021
380eb1e
Fix the commandline metadata test for real this time.
mildbyte Apr 21, 2021
6d177cf
Adapt the code to get READMEs dumping into a file and omit unset vari…
mildbyte Apr 22, 2021
413dc55
Change up the table schema type to be a list of objects (name, type)
mildbyte Apr 22, 2021
a993ee4
Add the Pydantic plugin to Mypy
mildbyte Apr 22, 2021
d4f8285
Rename `AuthAPIClient` to `RESTAPIClient` and deprecate the old `Auth…
mildbyte Apr 22, 2021
5113bc0
Rename `SPLITFILE_ROOT` constant to `RESOURCES`
mildbyte Apr 22, 2021
3c6fa53
Add Pydantic models for some requests to the externals API
mildbyte Apr 22, 2021
9b72875
Add more Pydantic models for requests/responses to the external API s…
mildbyte Apr 22, 2021
fc05fa5
Add code to the `RESTAPIClient` to talk to the remote externals API.
mildbyte Apr 22, 2021
9493b31
Add a command `sgr cloud load` that loads a dumped repositories.yml (…
mildbyte Apr 22, 2021
86106d3
Add a unit test for `sgr cloud load`
mildbyte Apr 22, 2021
8355409
Refactor the tests, rename some constants, split cloud CLI tests into…
mildbyte Apr 22, 2021
af6f4ee
Add docs to `sgr cloud dump/load` and get them to support stdout/stdi…
mildbyte Apr 22, 2021
3272060
Method for `list_external_credentials` should be GET.
mildbyte Apr 22, 2021
3c253e2
Add `cloud dump` to the commandline for real + add it to the Markdown…
mildbyte Apr 22, 2021
ca6dc49
Add a compatibility layer that gets the metadata upsert working with …
mildbyte Apr 22, 2021
e982f1f
Load upstream metadata properly.
mildbyte Apr 23, 2021
d409713
Bump dependencies
mildbyte Apr 26, 2021
eaf06e4
Add support for dumping a limited amount of repositories (`sgr cloud …
mildbyte Apr 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ repos:
rev: 'v0.812'
hooks:
- id: mypy
additional_dependencies:
- pydantic>=1.8.1
6 changes: 6 additions & 0 deletions docs/generate_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
description_c,
metadata_c,
search_c,
load_c,
dump_c,
)
from splitgraph.commandline.engine import (
add_engine_c,
Expand Down Expand Up @@ -69,6 +71,8 @@
"cloud description",
"cloud metadata",
"cloud search",
"cloud dump",
"cloud load",
],
),
]
Expand Down Expand Up @@ -96,6 +100,8 @@
"cloud description": description_c,
"cloud metadata": metadata_c,
"cloud search": search_c,
"cloud dump": dump_c,
"cloud load": load_c,
}


Expand Down
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
python_version = 3.8
warn_return_any = True
warn_unused_configs = True
plugins = pydantic.mypy

# Ignore no stubs for modules like psycopg2 etc
ignore_missing_imports = True
Expand Down
232 changes: 137 additions & 95 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage = "https://www.splitgraph.com"
repository = "https://github.com/splitgraph/splitgraph"

[tool.poetry.dependencies]
python = "~=3.6"
python = ">=3.6.1,<4.0"
click = "^7"
psycopg2-binary = "^2"
parsimonious = "^0.8"
Expand All @@ -25,6 +25,7 @@ asciitree = ">=0.3.3"
pyyaml = ">=5.1"
jsonschema = ">=3.1.0"
cryptography = ">=3.4.0"
pydantic = ">=1.8.1"

# Socrata dataset mounting.
# This could be optional but it's very lightweight (only requires requests).
Expand Down
Loading