Skip to content

Commit 8882029

Browse files
7.0.0rc3 release (#778)
1 parent e3b871f commit 8882029

File tree

43 files changed

+176
-197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+176
-197
lines changed

.github/workflows/docs.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,12 @@ jobs:
5757
- name: Build docs
5858
run: pdm run docs_build
5959

60-
# FIXME: Reenable before 7.0.0rc3 release
61-
# - name: Commit and push frontend
62-
# if: github.ref == 'refs/heads/next'
63-
# run: |
64-
# cd ../interface
65-
# git config --local user.email "[email protected]"
66-
# git config --local user.name "GitHub Action"
67-
# git add .
68-
# git diff-index --quiet HEAD || git commit -m "${{ github.event.head_commit.message }}"
69-
# git push origin $FRONTEND_BRANCH
60+
- name: Commit and push frontend
61+
if: github.ref == 'refs/heads/next'
62+
run: |
63+
cd ../interface
64+
git config --local user.email "[email protected]"
65+
git config --local user.name "GitHub Action"
66+
git add .
67+
git diff-index --quiet HEAD || git commit -m "${{ github.event.head_commit.message }}"
68+
git push origin $FRONTEND_BRANCH

CHANGELOG.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].
66

7-
## [Unreleased]
7+
## [7.0.0rc3] - 2023-08-05
88

99
### Fixed
1010

@@ -86,19 +86,19 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
8686

8787
- tzkt: Request plain values instead of mappings from TzKT when possible.
8888

89-
## [6.5.9] - 2022-07-11
89+
## [6.5.9] - 2023-07-11
9090

9191
### Fixed
9292

9393
- tzkt: Optimized queries for `operation_unfiltered` index.
9494

95-
## [6.5.8] - 2022-06-28
95+
## [6.5.8] - 2023-06-28
9696

9797
### Fixed
9898

9999
- cli: Fixed `init` crash when package name is equal to one of the project typenames.
100100

101-
## [6.5.7] - 2022-05-30
101+
## [6.5.7] - 2023-05-30
102102

103103
### Added
104104

@@ -115,7 +115,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
115115

116116
- http: Deserialize JSON responses with `orjson`.
117117

118-
## [6.5.6] - 2022-05-02
118+
## [6.5.6] - 2023-05-02
119119

120120
### Fixed
121121

@@ -127,7 +127,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
127127
- ci: Slim Docker image updated to Alpine 3.17.
128128
- metadata: Added `nairobinet` to supported networks.
129129

130-
## [6.5.5] - 2022-04-17
130+
## [6.5.5] - 2023-04-17
131131

132132
### Fixed
133133

@@ -139,7 +139,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
139139

140140
- ci: Default git branch switched to `next`.
141141

142-
## [6.5.4] - 2022-03-31
142+
## [6.5.4] - 2023-03-31
143143

144144
### Fixed
145145

@@ -149,7 +149,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
149149

150150
- deps: Updated pytezos to 3.9.0.
151151

152-
## [6.5.3] - 2022-03-28
152+
## [6.5.3] - 2023-03-28
153153

154154
### Fixed
155155

@@ -1116,7 +1116,8 @@ This release contains no changes except for the version number.
11161116
[semantic versioning]: https://semver.org/spec/v2.0.0.html
11171117

11181118
<!-- Versions -->
1119-
[Unreleased]: https://github.com/dipdup-io/dipdup/compare/7.0.0rc2...HEAD
1119+
[Unreleased]: https://github.com/dipdup-io/dipdup/compare/7.0.0rc3...HEAD
1120+
[7.0.0rc3]: https://github.com/dipdup-io/dipdup/compare/7.0.0rc2...7.0.0rc3
11201121
[6.5.10]: https://github.com/dipdup-io/dipdup/compare/6.5.9...6.5.10
11211122
[7.0.0rc2]: https://github.com/dipdup-io/dipdup/compare/7.0.0rc1...7.0.0rc2
11221123
[7.0.0rc1]: https://github.com/dipdup-io/dipdup/compare/6.5.9...7.0.0rc1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ DipDup is a Python framework for building smart contract indexers. It helps deve
1919

2020
- **Want to participate?** Vote for [open issues](https://github.com/dipdup-io/dipdup/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc), join [discussions](https://github.com/dipdup-io/dipdup/discussions) or [become a sponsor](https://github.com/sponsors/dipdup-io).
2121

22-
- **Have a question?** Join our [Discord](https://discord.gg/NbANhqCJHA) or tag @dipdup_io on [Twitter](https://twitter.com/dipdup_io).
22+
- **Have a question?** Join our [Discord](https://discord.gg/aG8XKuwsQd) or tag @dipdup_io on [Twitter](https://twitter.com/dipdup_io).
2323

2424
This project is maintained by the [Baking Bad](https://bakingbad.dev/) team.
2525
<br>

docs/0.quickstart.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@ We have a [convenient installer](https://dipdup.io/install.py) that will install
2020
curl -Lsf https://dipdup.io/install.py | python3
2121
```
2222

23-
If you don't want to use our installer, create a new project directory you can install DipDup manually. You can use any Python package manager you like, but we recommend [PDM](https://pdm.fming.dev/latest/). Here are some spells to get you started:
23+
If you don't want to use our script, install DipDup manually using commands from the snippet below. You can use any Python package manager you like, but we recommend [PDM](https://pdm.fming.dev/latest/) and provide some useful scripts for it. Here are some spells to get you started:
2424

2525
```shell [Terminal]
2626
# pipx
27-
pipx install dipdup datamodel-code-generator pdm
27+
pipx install dipdup datamodel-code-generator
2828

2929
# PDM
30-
pdm init --python 3.11
31-
pdm use .venv
32-
pdm add "dipdup>=7.0.0rc2,<8"
30+
pdm init --python 3.11 --lib # use "">=3.11,<3.12" for requires-python
31+
pdm venv create
32+
pdm add "dipdup>=7.0.0rc3,<8" --venv
3333
$(pdm venv activate)
3434

3535
# Poetry
3636
poetry init --python ">=3.11,<3.12"
37-
poetry add "dipdup>=7.0.0rc2,<8"
37+
poetry add "dipdup>=7.0.0rc3,<8"
3838
poetry shell
3939

4040
# pip + venv
4141
python -m venv .venv
4242
. .venv/bin/activate
43-
echo "dipdup>=7.0.0rc2,<8" > requirements.txt
43+
echo "dipdup>=7.0.0rc3,<8" > requirements.txt
4444
pip install -r requirements.txt -e .
4545
```
4646

@@ -115,7 +115,6 @@ demo_token [.]
115115
│ ├── tzbtc/tezos_parameters/mint.py
116116
│ ├── tzbtc/tezos_parameters/transfer.py
117117
│ └── tzbtc/tezos_storage.py
118-
├── demo_token.py
119118
└── py.typed
120119
```
121120

@@ -127,11 +126,13 @@ DipDup supports storing data in SQLite, PostgreSQL and TimescaleDB databases. We
127126

128127
First, you need to define a model class. Our schema will consist of a single model `Holder` with the following fields:
129128

130-
- `address` — account address
131-
- `balance` — token amount held by the account
132-
- `volume` — total amount of transfer/mint calls
133-
- `tx_count` — number of transfers/mints
134-
- `last_seen` — time of the last transfer/mint
129+
| | |
130+
| ----------- | ----------------------------------- |
131+
| `address` | account address |
132+
| `balance` | token amount held by the account |
133+
| `turnover` | total amount of transfer/mint calls |
134+
| `tx_count` | number of transfers/mints |
135+
| `last_seen` | time of the last transfer/mint |
135136

136137
Here's how to implement this model in DipDup:
137138

docs/1.getting-started/1.installation.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This page covers the installation of DipDup in different environments.
99

1010
## Host requirements
1111

12-
A Linux/macOS environment with Python 3.11 installed is required to use DipDup. Also you need basic Python environment for install script, `python3.11 -m ensurepip`. Apple silicon is also supported. Other UNIX-like systems should work but are not supported officially. If you use Windows, please use [WSL](https://docs.microsoft.com/en-us/windows/wsl/about) or Docker.
12+
A Linux/macOS environment with Python 3.11 installed is required to use DipDup. Also, you need a basic Python environment for the install script, `python3.11 -m ensurepip`. Apple silicon is supported. Other UNIX-like systems should work but are not supported officially. If you use Windows, please use [WSL](https://docs.microsoft.com/en-us/windows/wsl/about) or Docker.
1313

1414
Minimum hardware requirements are 256 MB RAM, 1 CPU core, and some disk space for the database. RAM requirements increase with the number of indexes.
1515

@@ -43,22 +43,22 @@ Then use the snippets below to create a new Python project and add DipDup as a d
4343

4444
#### PDM (recommended)
4545

46-
PDM is a very powerful package manager with a lot of features. Also, it can run scripts from pyproject.toml as npm does. It's a good choice for both beginners and advanced users.
46+
PDM is a very powerful package manager with a lot of features. Also, it can run scripts from pyproject.toml as npm does. It's a good choice for both beginners and advanced users. Some commands are hard to remember though.
4747

4848
```shell [Terminal]
49-
pdm init --python 3.11
50-
pdm use .venv
51-
pdm add "dipdup>=7.0.0rc2,<8"
49+
pdm init --python 3.11 --lib # use "">=3.11,<3.12" for requires-python
50+
pdm venv create
51+
pdm add "dipdup>=7.0.0rc3,<8" --venv
5252
$(pdm venv activate)
5353
```
5454

5555
#### Poetry
5656

57-
Poetry is another popular tool to manage Python projects. It's less stable and often slower than PDM, but it's still a good choice.
57+
Poetry is another popular tool to manage Python projects. It doesn't support scripts and resolving is slower in some cases, but in all other aspects, it's a great tool!
5858

5959
```shell [Terminal]
6060
poetry init --python ">=3.11,<3.12"
61-
poetry add "dipdup>=7.0.0rc2,<8"
61+
poetry add "dipdup>=7.0.0rc3,<8"
6262
poetry shell
6363
```
6464

@@ -69,7 +69,7 @@ Finally, if you prefer to do everything manually, you can use pip. It's the most
6969
```shell [Terminal]
7070
python -m venv .venv
7171
. .venv/bin/activate
72-
echo "dipdup>=7.0.0rc2,<8" >> requirements.txt
72+
echo "dipdup>=7.0.0rc3,<8" >> requirements.txt
7373
pip install -r requirements.txt -e .
7474
```
7575

docs/1.getting-started/2.core-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Before proceeding to development, let's take a look at basic DipDu
44
---
55

66
# Core concepts
7-
7+
88
Before proceeding to development, let's take a look at basic DipDup concepts. The main terms are highlighted in _italics_ and will be discussed in detail in the following sections.
99

1010
## Big picture

docs/1.getting-started/4.package.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ The structure of the resulting package is the following:
2424
| :file_folder: `sql` | SQL scripts and queries to run manually or on specific events |
2525
| :file_folder: `types` | Automatically generated Pydantic dataclasses for contract types |
2626
| `dipdup.yaml` | Root DipDup config; can be expanded with env-specific files |
27-
| `{{ project.package }} -> .` | A little helper to let you import the package from the root directory. |
27+
| `{{ project.package }} -> .` | A little helper, symlink to let you import the package from the root directory. |
2828
| `pyproject.toml` | Python package metadata (introduced in PEP 518; see [details](https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/)) |
2929
| | |
3030

31-
There are also a bunch files in the root directory: .ignore files, PEP 561 marker, etc. Usually, you won't need to modify them.
31+
There are also preconfigured .dockerignore and .gitignore files; py.typed marker. Usually, you won't need to modify them.
3232

3333
## ABIs and typeclasses
3434

@@ -81,4 +81,4 @@ After running the `init` command, you'll get the following directory tree (short
8181
└── on_restore
8282
```
8383
84-
Handler callbacks can be grouped the same way. Note, that callback name still needs to be a valid Python module path: _only lowercase letters, underscores, and dots_.
84+
Handler callbacks can be grouped the same way. Note, that the callback name still needs to be a valid Python module path: _only lowercase letters, underscores, and dots_.

docs/1.getting-started/5.models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ In Tortoise ORM each subsequent call creates a new queryset using an expensive `
8787
8888
### Transactions
8989

90-
DipDup manages transactions automatically for indexes opening one for each level. You can't open another one. Entering a transaction context manually with `in_transaction()` will return the same active transaction. For hooks, there's `atomic` flag in the configuration.
90+
DipDup manages transactions automatically for indexes opening one for each level. You can't open another one. Entering a transaction context manually with `in_transaction()` will return the same active transaction. For hooks, there's the `atomic` flag in the configuration.

docs/1.getting-started/8.handlers.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Define the callback body to process the data. The most common case is to perform
4747

4848
## Handling name collisions
4949

50-
Indexing operations of multiple contracts with the same entrypoints can lead to name collisions during code generation. In this case DipDup raises a `ConfigurationError`{lang="python"} and suggests to set alias for each conflicting handler. Currently, it applies to `tezos.tzkt.operation` indexes only. Consider the following index definition, some kind of "chain minting" contract:
50+
Indexing operations of multiple contracts with the same entrypoints can lead to name collisions during code generation. In this case DipDup raises a `ConfigurationError`{lang="python"} and suggests to set alias for each conflicting handler. Currently, it applies to `tezos.tzkt.operation` indexes only. In the the following snippet "call" entrypoint of both contracts is called. Add `alias` field to resolve the conflict:
5151

5252
```yaml
5353
callback: on_mint
@@ -60,19 +60,4 @@ pattern:
6060
alias: bar_mint
6161
```
6262

63-
The following code will be generated for `on_mint`{lang="python"} callback (shortened):
64-
65-
```python [on_transaction.py]
66-
from example.types.foo.parameter.mint import MintParameter as FooMintParameter
67-
from example.types.bar.parameter.mint import MintParameter as BarMintParameter
68-
69-
70-
async def on_transaction(
71-
ctx: HandlerContext,
72-
foo_mint: TzktTransaction[FooMintParameter, FooStorage],
73-
bar_mint: TzktTransaction[BarMintParameter, BarStorage],
74-
) -> None:
75-
...
76-
```
77-
78-
You can also change argument names (but not the order) manually if you want to.
63+
You can also change argument names (but not the order!) manually if you want to.

0 commit comments

Comments
 (0)