Skip to content

Commit 0211401

Browse files
7.3.0 release docs (#920)
1 parent 8876c6c commit 0211401

Some content is hidden

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

60 files changed

+1205
-611
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
- name: Install PDM
4747
run: pip install pdm
4848

49+
- name: Install markdownlint-cli
50+
run: npm install -g markdownlint-cli
51+
4952
- name: Install project
5053
run: pdm sync
5154

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
121121
- cli: Import package submodules before starting indexing to fail early on import errors.
122122
- cli: Fixed ordering of crash reports in `report` group commands.
123123
- evm.node: Fixed parsing topics and integers in datasource models.
124-
- evm.subsquid.events: Fixed incorrrect log request parameters.
124+
- evm.subsquid.events: Fixed incorrect log request parameters.
125125
- install: Fixed issue with interpreting user answers in some cases.
126126
- tezos.tzkt: Fixed operation matching when contract code hash specified as a string.
127127
- tezos.tzkt: Fixed issue with processing rollbacks while sync is in progress.

Makefile

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
.ONESHELL:
2+
.PHONY: $(MAKECMDGOALS)
3+
MAKEFLAGS += --no-print-directory
4+
##
5+
## 🚧 DipDup developer tools
6+
##
7+
PACKAGE=dipdup
8+
TAG=latest
9+
COMPOSE=deploy/compose.yaml
10+
SOURCE=src tests scripts
11+
DEMO=''
12+
FRONTEND_PATH=../interface
13+
14+
15+
help: ## Show this help (default)
16+
@grep -Fh "##" $(MAKEFILE_LIST) | grep -Fv grep -F | sed -e 's/\\$$//' | sed -e 's/##//'
17+
18+
all: ## Run an entire CI pipeline
19+
make format lint test
20+
21+
format: ## Format with all tools
22+
make black
23+
24+
lint: ## Lint with all tools
25+
make ruff mypy
26+
27+
test: ## Run tests
28+
pytest --cov-report=term-missing --cov=dipdup --cov-report=xml -n auto -s -v tests
29+
30+
##
31+
32+
black: ## Format with black
33+
black ${SOURCE}
34+
35+
ruff: ## Lint with ruff
36+
ruff check --fix ${SOURCE}
37+
38+
mypy: ## Lint with mypy
39+
mypy --no-incremental --exclude ${PACKAGE} ${SOURCE}
40+
41+
##
42+
43+
image: ## Build Docker image
44+
docker buildx build . -t ${PACKAGE}:${TAG}
45+
46+
##
47+
48+
demos: ## Recreate demo projects from templates
49+
python scripts/demos.py render ${DEMO}
50+
python scripts/demos.py init ${DEMO}
51+
pdm run format
52+
pdm run lint
53+
54+
docs_build: ## Build docs
55+
python scripts/docs.py check-links --source docs
56+
python scripts/docs.py markdownlint
57+
python scripts/docs.py dump-references
58+
python scripts/docs.py dump-jsonschema
59+
python scripts/docs.py build --source docs --destination ${FRONTEND_PATH}/content/docs
60+
61+
docs_serve: ## Build docs and start frontend server
62+
python scripts/docs.py build --source docs --destination ${FRONTEND_PATH}/content/docs --watch --serve
63+
64+
docs_watch: ## Build docs and watch for changes
65+
python scripts/docs.py build --source docs --destination ${FRONTEND_PATH}/content/docs --watch
66+
67+
fixme: ## Find FIXME and TODO comments
68+
grep -r -e 'FIXME: ' -e 'TODO: ' -e 'type: ignore' -n src/dipdup --color
69+
70+
update: ## Update dependencies and dump requirements.txt
71+
pdm update
72+
pdm export --without-hashes -f requirements --prod -o requirements.txt
73+
pdm export --without-hashes -f requirements --dev -o requirements.dev.txt
74+
75+
before_release: ## Prepare for a new release after updating version in pyproject.toml
76+
make format
77+
make lint
78+
make update
79+
make demos
80+
make test
81+
make docs_build
82+
echo "🎉 Commit changes, merge `aux/X.Y.Z`, run 'git checkout next && git pull && git tag X.Y.Z && git push origin X.Y.Z'"
83+
##

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![Twitter](https://badgen.net/badge/icon/dipdup_io?icon=twitter&label=)](https://twitter.com/dipdup_io)
2-
[![GitHub stars](https://img.shields.io/github/stars/dipdup-io/dipdup?color=2c2c2c)](https://github.com/dipdup-io/dipdup)
2+
[![GitHub stars](https://img.shields.io/github/stars/dipdup-io/dipdup?color=2c2c2c&style=plain)](https://github.com/dipdup-io/dipdup)
33
[![PyPI monthly downloads](https://img.shields.io/pypi/dm/dipdup?color=2c2c2c)](https://pypi.org/project/dipdup/)
44
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dipdup?color=2c2c2c)](https://www.python.org)
55
[![License: MIT](https://img.shields.io/github/license/dipdup-io/dipdup?color=2c2c2c)](https://github.com/dipdup-io/dipdup/blob/next/LICENSE)

docs/1.getting-started/3.config.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,31 @@ description: "Developing a DipDup indexer begins with creating a YAML config fil
55

66
# Creating config
77

8-
Developing a DipDup indexer begins with creating a YAML config file of a specific format. DipDup expect it to be located in the project root and named `dipdup.yaml`. However, you can provide any path with a `-c` CLI option.
8+
Developing a DipDup indexer begins with creating a YAML config file of a specific format. DipDup expects it to be located in the project root and named `dipdup.yaml`. However, you can provide any path with a `-c` CLI option.
99

1010
## Structure
1111

1212
Config consists of multiple top-level mappings. In the table below they are grouped by sections for convenience, but in the config file, they can be in any order. The only required section is **Header**.
1313

14-
| | | |
15-
| ---------------- | ----------------------------------------------- | --------------------------------------------------------------------- |
16-
| **Header** | [spec_version](../9.config/14.spec_version.md)* | DipDup project specification; currently "2.0" |
17-
| | [package](../9.config/11.package.md)* | Python package name |
18-
| **Inventory** | [database](../9.config/4.database.md) | Database configuration |
19-
| | [contracts](../9.config/2.contracts.md) | Contracts that need to be indexed |
20-
| | [datasources](../9.config/5.datasources.md) | Datasources to gather information from |
21-
| **Indexes** | [indexes](../9.config/8.indexes.md) | Index definitions |
22-
| | [templates](../9.config/15.templates.md) | Also index definitions, but with placeholders that make them reusable |
23-
| **Hooks** | [hooks](../9.config/7.hooks.md) | Callbacks to run manually or by schedule |
24-
| | [jobs](../9.config/9.jobs.md) | Schedules for hooks |
25-
| **Integrations** | [hasura](../9.config/6.hasura.md) | Hasura GraphQL Engine configuration |
26-
| | [sentry](../9.config/13.sentry.md) | Sentry configuration |
27-
| | [prometheus](../9.config/12.prometheus.md) | Prometheus configuration |
28-
| **Miscellaneous**| [advanced](../9.config/1.advanced.md) | Tunables that affect framework behavior |
29-
| | [custom](../9.config/3.custom.md) | Mapping of user-defined values; neither typed nor validated |
30-
| | [logging](../9.config/10.logging.md) | Configure logging verbosity |
14+
See [Config reference guide](../7.references/2.config.md) for the full list of available options.
15+
16+
| | | |
17+
| ----------------- | --------------- | --------------------------------------------------------------------- |
18+
| **Header** | `spec_version`* | DipDup project specification; currently "2.0" |
19+
| | `package`* | Python package name |
20+
| **Inventory** | `database` | Database configuration |
21+
| | `contracts` | Contracts that need to be indexed |
22+
| | `datasources` | Datasources to gather information from |
23+
| **Indexes** | `indexes` | Index definitions |
24+
| | `templates` | Also index definitions, but with placeholders that make them reusable |
25+
| **Hooks** | `hooks` | Callbacks to run manually or by schedule |
26+
| | `jobs` | Schedules for hooks |
27+
| **Integrations** | `hasura` | Hasura GraphQL Engine configuration |
28+
| | `sentry` | Sentry configuration |
29+
| | `prometheus` | Prometheus configuration |
30+
| **Miscellaneous** | `advanced` | Tunables that affect framework behavior |
31+
| | `custom` | Mapping of user-defined values; neither typed nor validated |
32+
| | `logging` | Configure logging verbosity |
3133

3234
## Merging multiple files
3335

@@ -80,4 +82,4 @@ contracts:
8082
typename: quipu_fa12
8183
```
8284

83-
If multiple contracts you index have the same interface but different code, see [F.A.Q.](../12.faq.md) learn how to avoid conflicts.
85+
If multiple contracts you index have the same interface but different code, see [F.A.Q.](../12.faq.md) to learn how to avoid conflicts.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ hooks:
5858
5959
After running the `init` command, you'll get the following directory tree (shortened for brevity)
6060

61-
```
61+
```text
6262
{{ project.package }}
6363
├── hooks
6464
│ ├── backup

docs/1.getting-started/6.datasources.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ Datasources are DipDup connectors to various APIs. They are defined in config an
99

1010
Index datasources, ones that can be attached to a specific index, are prefixed with blockchain name, e.g. `tezos.tzkt` or `evm.subsquid`.
1111

12-
| kind | blockchain | description |
13-
| ----------------------------------------- | -------------- | ------------------------------- |
14-
| [abi.etherscan](2.abi_etherscan.md) | EVM-compatible | Provides ABIs for EVM contracts |
15-
| [coinbase](3.coinbase.md) | any | Coinbase price feed |
16-
| [evm.node](4.evm_node.md) | EVM-compatible | Ethereum node |
17-
| [evm.subsquid](5.evm_subsquid.md) | EVM-compatible | Subsquid Archives node |
18-
| [http](6.http.md) | any | Generic HTTP API |
19-
| [ipfs](7.ipfs.md) | any | IPFS gateway |
20-
| [tezos.tzkt](8.tezos_tzkt.md) | Tezos | TzKT API |
21-
| [tezos.tzip_metadata](9.tzip_metadata.md) | Tezos | TZIP-16 metadata |
12+
| kind | blockchain | description |
13+
| ---------------------------------------------------------- | -------------- | ------------------------------- |
14+
| [abi.etherscan](../3.datasources/1.abi_etherscan.md) | EVM-compatible | Provides ABIs for EVM contracts |
15+
| [coinbase](../3.datasources/2.coinbase.md) | any | Coinbase price feed |
16+
| [evm.node](../3.datasources/3.evm_node.md) | EVM-compatible | Ethereum node |
17+
| [evm.subsquid](../3.datasources/4.evm_subsquid.md) | EVM-compatible | Subsquid Archives node |
18+
| [http](../3.datasources/5.http.md) | any | Generic HTTP API |
19+
| [ipfs](../3.datasources/6.ipfs.md) | any | IPFS gateway |
20+
| [tezos.tzkt](../3.datasources/7.tezos_tzkt.md) | Tezos | TzKT API |
21+
| [tezos.tzip_metadata](../3.datasources/8.tzip_metadata.md) | Tezos | TZIP-16 metadata |
2222

2323
## Connection settings
2424

docs/1.getting-started/7.indexes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ indexes:
4242
datasource: tzkt_mainnet
4343
```
4444
45-
You can also spawn indexes from templates in runtime; see [Variables](../1.getting-started/7.env-variables.md) page.
45+
You can also spawn indexes from templates in runtime; see [Spawning in runtime](../1.getting-started/7.indexes.md#spawning-in-runtime).
4646
4747
## Limiting scope
4848

docs/12.faq.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ description: "This page contains answers to the most popular questions about Dip
44
nested: Resources
55
---
66

7+
<!-- markdownlint-disable no-trailing-punctuation -->
8+
79
# F.A.Q.
810

911
This page contains answers to the most popular questions about DipDup guts. If you landed here - congrats, you're writing a pretty advanced indexer!
@@ -128,6 +130,6 @@ advanced:
128130
129131
Don't forget to reindex after this change. When decimal context precision is adjusted you'll get a warning in the logs.
130132
131-
```
133+
```text
132134
WARNING dipdup.database Decimal context precision has been updated: 28 -> 128
133135
```

docs/13.troubleshooting.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ dipdup -c . -c configs/dipdup.sqlite.yaml config export
6161

6262
### Check env variables
6363

64-
6564
`config env` command can help you to find missing environment variables.
6665

6766
```shell [Terminal]

0 commit comments

Comments
 (0)