Changelog#
v1.6.0 (2023-05-25)#
Feature#
Documentation#
v1.5.2 (2023-05-17)#
Fix#
Nested orderBy working with DSL (
7e320e8
)
v1.5.1 (2023-05-15)#
Fix#
Documentation#
v1.5.0 (2023-04-25)#
Feature#
Fix#
v1.4.0 (2023-04-13)#
Feature#
subgrounds.contrib.dash
andsubgrounds.contrib.plotly
(f1d79e8
)
Fix#
Documentation#
v1.3.0 (2023-04-07)#
Feature#
Add specific error models (
6218076
)
v1.2.0 (2023-04-02)#
Feature#
Documentation#
Fix changelog formatting (
7f8a630
)
v1.1.2 (2023-03-15)#
Fix#
Documentation#
v1.1.1 (2023-03-03)#
Fix#
Bump version (
40004c0
)
v1.1.0 (2023-03-03)#
Feature#
Export more symbols to
subgrounds
(3c59fe9
)
Documentation#
v1.0.3 (2022-08-08)#
Fix#
Issue causing null object in
SyntheticField
s
v1.0.2 (2022-10-30)#
Fix#
Update
SchemaMeta
toPydantic
model for extra validation
v1.0.1 (2022-08-08)#
Fix#
Schema cache directory path
where
filter getting dropped during pagination
v1.0.0 (2022-07-25)#
Description#
This release overhauls how pagination is performed in Subgrounds.
BREAKING CHANGES#
The
auto_paginate
argument of toplevel querying functions has been replaced by thepagination_strategy
argument (setting the latter toNone
disables pagination).
Feature#
Subgrounds users can now define and use their own pagination strategy (see Custom pagination strategy for more details).
Users select the pagination strategies to use when calling toplevel querying functions:
df = sg.query_df(field_paths, pagination_strategy=MyPaginationStrategy)
Subgrounds provides two pagination strategies out of the box:
LegacyStrategy
(the strategy used prior to this update)ShallowStrategy
, which is much faster thanLegacyStrategy
in some cases, but does not support pagination on nested fields (see Available pagination strategies for more details).
Fix#
Fix bug that would cause a crash when calling one of the toplevel querying functions with only one
FieldPath
object (e.g.:sg.query_df(pairs.id)
).
v0.2.0 (2023-06-23)#
Feature#
Iterative versions of toplevel querying functions to allow developers to process queried data page by page when automatic pagination returns more than one page
query_df
->query_df_iter
query
->query_iter
query_json
->query_json_iter
execute
->execute_iter
Add option to set subgraph schema cache directory in
load_subgraph
andload_api
.Defaults to
./schemas/
Add useful
SyntheticField
helperdatetime_of_timestamp
Subgrounds
class can now be imported from toplevel module:from subgrounds import Subgrounds
Add
SyntheticField.datetime_of_timestamp
helper function to easily create aSyntheticField
that converts a Unix timestamp into a human readable datetime stringAdd
SyntheticField.map
helper function to easily create a "map"SyntheticField
from a dictionary
Fix#
Fix bug that caused some queries to fail with automatic pagination enabled
Chore#
Migrate package manager from
pipenv
topoetry
Migrate docs from plain
sphinx
tomudkip
Made
dash
an optional extra dependency.To use Subgrounds
dash
andplotly
wrappers, runpip install subgrounds[dash]
v0.1.1 (2022-04-29)#
Fix#
Scalar lists were not handled properly
v0.1.0 (2022-04-27)#
Feature#
Partial fieldpaths
Querying partial fieldpaths will automatically select all non-list fields of the fieldpath leaf.
For example, using the Ribbon V2 subgraph, the following Subgrounds query:
sg.query_df([ ribbon.Query.vaults ])
will result in the following query being made to the subgraph:
query { vaults { id name symbol underlyingAsset underlyingName underlyingSymbol underlyingDecimals totalPremiumEarned totalNominalVolume totalNotionalVolume numDepositors totalBalance cap round performanceFeeCollected managementFeeCollected totalFeeCollected } }
Code completion
When using Subgrounds in Jupyter notebooks and a subgraph has been loaded in a previous cell, fieldpaths will now autocomplete.
v0.0.9 (2023-03-29)#
Feature#
Subgrounds.load_api
Allows you to safely query non-subgraph GrahpQL APIs with Subgrounds!
New boolean flag argument,
auto_paginate
, inSubgrounds.query
,Subgrounds.query_json
andSubgrounds.query_df
Selectively disable automatic pagination
Documentation#
Refactor, cleanup and add tons of docstrings