Skip to content

Commit bbb7ebb

Browse files
Update Resources section in docs (#809)
1 parent 14cff04 commit bbb7ebb

File tree

9 files changed

+180
-164
lines changed

9 files changed

+180
-164
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1 @@
1-
# DipDup contribution guide
2-
3-
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt).
4-
5-
## For contributors
6-
7-
### General
8-
9-
- All code in this repository MUST be licensed under the [MIT License](./LICENSE.md).
10-
- Python code in this repository MUST run on Python 3.11. Using modern language features is encouraged.
11-
- Python code in this repository MUST run in Linux, macOS, Docker, and `amd64`/`arm64` environments. Windows SHOULD be supported as well.
12-
- We use the PDM package manager to set up the development environment. You SHOULD install it and run `pdm run -l` to see available shortcuts.
13-
- Have fun!
14-
15-
### Git workflow
16-
17-
- Branch names MUST follow `prefix/short-description` format. Prefixes currently in use: `feat` for features, `fix` for bugfixes, `docs` for documentation, `exp` for experiments, `ci` for GHA and Docker stuff, `aux` for everything else.
18-
- Commits in pull requests MUST be squashed when merging to `next`.
19-
- Issues and pull requests MUST have a descriptive title; they SHOULD be linked to each other, appropriately labeled, and assigned to maintainers while in progress.
20-
21-
### Codestyle
22-
23-
We use `isort` and `black` for autoformatting, `ruff` for linting, and `mypy` for typechecking. All checks MUST pass before merging the code to default branch. Everything not enforced by these tools is up to the developer. But here are some recommendations:
24-
25-
- Consistency is the key. If you see a pattern in the codebase, follow it.
26-
- Use `NOTE`, `TODO`, and `FIXME` prefixes for meaningful comments. It greatly helps to navigate the codebase.
27-
- Lazy imports are important to keep startup time low for tiny commands. We also do it for project imports, so not a big deal.
28-
- Some methods and attributes made private to avoid polluting the public API. Feel free to access them from the outside if you know what you are doing.
29-
- Finally, about exact language features. F-string formatting is preferred over other syntax. Be careful with walrus operator. Don't forget else in conditional expressions. Listen to you mom. We have no consensus about the match-case yet.
30-
31-
### Packaging
32-
33-
- All dependencies MUST be declared in `pyproject.toml` file.
34-
- Non-development dependencies MUST be pinned to non-breaking versions (e.g. `^1.2.3`).
35-
- Core dependencies that we patch MUST be pinned to specific versions (e.g. `1.2.3`).
36-
37-
### Changelog
38-
39-
- All changes that affect user (developer) experience MUST be documented in the CHANGELOG.md file.
40-
- Changes that significantly affect DipDup maintainers' experience MAY be documented in the CHANGELOG.md file.
41-
- The changelog MUST conform to the "Keep a Changelog" specification (CI will break otherwise). Group order we use: Added, Fixed, Changed, Deprecated, Removed, Performance, Security, Other.
42-
- Lines describing changes MUST be sorted and begin with DipDup component name (`index: Added ...`). One of the following: ci, cli, codegen, coinbase, config, context, database, demos, deps, docs, exceptions, hasura, hooks, http, index, install, ipfs, jobs, metadata, models, projects, prometheus, sentry, tzkt.
43-
44-
## Documentation
45-
46-
- A page in Release Notes SHOULD accompany all major releases.
47-
48-
## For maintainers
49-
50-
### Security
51-
52-
- GitHub alerts about dependencies that contain vulnerabilities MUST be investigated and resolved as soon as possible.
53-
- Security-related bugfixes MUST be mentioned in the changelog under the "Security" section.
54-
55-
### Privacy
56-
57-
- Crash reporting MUST be opt-in (disabled by default) both in config and project templates.
58-
- Sentry events and crash reports MUST NOT contain any sensitive information (IP addresses, hostnames, etc.)
59-
- DipDup SHOULD NOT perform network requests to APIs not defined in config as datasources. Current exceptions: GitHub.
60-
61-
### Docker images
62-
63-
- DipDup dockerfiles use autogenerated `requirements.txt` files. Maintainers MUST run `pdm run update` script on every change in dependencies.
64-
- Docker images for stable releases MUST be published on Docker Hub. They MAY also be published on GHCR.
65-
- Maintainers MAY publish arbitrary images on GHCR and remove them when not needed.
66-
67-
### Installer
68-
69-
- Installer module MUST depend on Python stdlib only.
70-
71-
### Scaffolding
72-
73-
- Project templates SHOULD cover all index types available in DipDup.
74-
- They also MAY contain additional features and integrations.
75-
76-
### Demo projects
77-
78-
- Demos are stored in `src` directory. They MUST be generated automatically from project templates using replay files.
79-
- Maintainers SHOULD run `pdm demos` command regularly to ensure that demo projects are up to date.
80-
81-
### Releases
82-
83-
- Release versions MUST conform to [Semantic Versioning](https://semver.org/). Releases that introduce breaking changes MUST be major ones.
84-
- Only the latest major version is supported in general. Critical fixes MAY be backported to the previous major release. To do so, create an `aux/X.Y.Z` branch from the latest stable tag, bump the DipDup version manually, and add a new tag.
1+
This page was moved to the [Contribution](https://dipdup.io/docs/contribution) page in docs.

README.md

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,3 @@ DipDup is a Python framework for building smart contract indexers. It helps deve
2424
This project is maintained by the [Baking Bad](https://bakingbad.dev/) team.
2525
<br>
2626
Development is supported by [Tezos Foundation](https://tezos.foundation/) and [OnlyDust](https://www.onlydust.xyz).
27-
28-
## Thanks
29-
30-
### Sponsors
31-
32-
Decentralized web requires decentralized funding. The following people and organizations help the project to be sustainable.
33-
34-
- [@dansan566](https://github.com/dansan566)
35-
- [@royscheeren](https://github.com/royscheeren)
36-
37-
Want your project to be listed here? We have nice perks for sponsors! Visit our [GitHub Sponsors page](https://github.com/sponsors/dipdup-io).
38-
39-
### Contributors
40-
41-
We are grateful to all the people who help us with the project.
42-
43-
- [@852Kerfunkle](https://github.com/852Kerfunkle)
44-
- [@Anshit01](https://github.com/Anshit01)
45-
- [@arrijabba](https://github.com/arrijabba)
46-
- [@Fitblip](https://github.com/Fitblip)
47-
- [@gdsoumya](https://github.com/gdsoumya)
48-
- [@herohthd](https://github.com/herohthd)
49-
- [@Karantezsure](https://github.com/Karantezsure)
50-
- [@mystdeim](https://github.com/mystdeim)
51-
- [@nikos-kalomoiris](https://github.com/nikos-kalomoiris)
52-
- [@pravind](https://github.com/pravind)
53-
- [@sbihel](https://github.com/sbihel)
54-
- [@tezosmiami](https://github.com/tezosmiami)
55-
- [@tomsib2001](https://github.com/tomsib2001)
56-
- [@veqtor](https://github.com/veqtor)
57-
- [@xflpt](https://github.com/xflpt)
58-
59-
If we forgot to mention you, or you want to update your record, please, open an issue or pull request.

docs/0.quickstart-evm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Quickstart on EVM"
2+
title: "Quickstart"
33
description: "This page will guide you through the steps to get your first selective indexer up and running in a few minutes without getting too deep into the details."
44
navigation.icon: "stars"
55
network: "ethereum"

docs/0.quickstart-tezos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Quickstart on Tezos"
2+
title: "Quickstart"
33
description: "This page will guide you through the steps to get your first selective indexer up and running in a few minutes without getting too deep into the details."
44
navigation.icon: "stars"
55
network: "tezos"

docs/13.contributing.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/14.troubleshooting.md renamed to docs/13.troubleshooting.md

Lines changed: 45 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ nested: Resources
66

77
# Troubleshooting
88

9-
This page contains tips for troubleshooting DipDup issues.
9+
This page contains tips for troubleshooting DipDup issues. Start with "General" section and then proceed to one that matches your problem.
1010

11-
## Update DipDup to the latest version
11+
## General
1212

13-
DipDup framework evolves rapidly just like blockchains do. We recommend keeping your project up-to-date with the latest version of DipDup. If you're getting a warning about the outdated version, run the following commands depending on your installation method:
13+
### Update DipDup to the latest version
14+
15+
If you experience an issue, first of all, make sure that you're using the latest version of DipDup. If new release is available you'll see a warning message when running DipDup. You can update DipDup using the following commands depending on your installation method:
1416

1517
```shell [Terminal]
1618
# Built-in installer
@@ -27,37 +29,48 @@ poetry update
2729

2830
# pip
2931
pip install --upgrade dipdup
30-
3132
```
3233

3334
When using Docker images you can use `X` and `X.Y` tags to lock to specific major/minor releases:
3435

35-
```docker
36+
```docker [Dockerfile]
3637
FROM dipdup/dipdup:{{ project.dipdup_version }}
3738
```
3839

39-
## Ensure that config is correct
40+
We follow semantic versioning, so you can safely update to a new patch version without any breaking changes.
41+
42+
### Enable debug logging
43+
44+
More logs can give you a clue about the reason for an issue. Enable them in config:
45+
46+
```yaml [dipdup.yaml]
47+
logging: DEBUG
48+
```
49+
50+
## Config
51+
52+
### Ensure that config is correct
4053
41-
DipDup config can be correct syntactically but not necessarily semantically. It's especially easy to make a mistake when actively using templates and environment variables. Use `config export` command to dump config the way DipDup "sees" it, after resolving all links and templates. `config env` command can help you to find missing environment variables.
54+
DipDup config can be correct syntactically but not necessarily semantically. It's especially easy to make a mistake when actively using templates and environment variables. Use `config export` command to dump config the way DipDup "sees" it, after resolving all links and templates.
4255

43-
```shell
56+
```shell [Terminal]
4457
dipdup -c . -c configs/dipdup.sqlite.yaml config export
45-
dipdup -c . -c configs/dipdup.sqlite.yaml config env
4658
```
4759

48-
## Enable debug logging
60+
### Check env variables
4961

50-
More logs can give you a clue about the reason for an issue. Enable them in config:
5162

52-
```yaml [dipdup.yaml]
53-
logging: DEBUG
63+
`config env` command can help you to find missing environment variables.
64+
65+
```shell [Terminal]
66+
dipdup -c . -c configs/dipdup.sqlite.yaml config env
5467
```
5568

56-
## Inspect crash reports
69+
<!-- Careful with compose. Throw inside. -->
5770

58-
When an exception occurs DipDup saves crash dumps to `~/local/share/dipdup/reports`. You can inspect them using `dipdup report` and `dipdup report show` commands.
71+
## Package
5972

60-
## Use linters to find errors in your Python code
73+
### Use linters to find errors in your Python code
6174

6275
Exceptions that occurred during callback execution are reraised as `CallbackError`s. If you experience this issue, most likely your code is incorrect. Luckily, the Python ecosystem has lots of tools called linters to help you find mistakes. Default DipDup project template includes black, ruff and mypy to check your code for errors and type mismatches. You can run them with the following commands:
6376

@@ -74,22 +87,30 @@ mypy .
7487

7588
See the `pyproject.toml` file in your project root for more details.
7689

77-
## Visit blockchain explorers
90+
### Inspect the package structure
91+
92+
## Blockchains
7893

79-
### Tezos
94+
### Tezos: explorers
8095

8196
[Better Call Dev](https://better-call.dev) is a blockchain explorer for Tezos smart contracts. It provides a more human-friendly interface than TzKT to explore exact contract calls and parameter/storage structures.
8297

8398
![BCD](assets/troubleshooting-bcd.png)
8499

85100
Try it out when writing index definitions.
86101

87-
## Got stuck? Ask for help
102+
## Found a bug?
103+
104+
When an exception occurs DipDup saves crash dumps to `~/local/share/dipdup/reports`. You can inspect them using `dipdup report ls` and `dipdup report show` commands.
105+
106+
If you think you've found a bug, please report it directly to the [GitHub Issues](https://github.com/dipdup-io/dipdup). For all other discussions.
107+
108+
## Got stuck?
88109

89-
We are always ready to answer your questions!
110+
Ask for help! We are always ready to answer your questions.
90111

91-
If you think you've found a bug, please report it directly to the [GitHub Issues](https://github.com/dipdup-io/dipdup). For all other discussions, join our socials:
112+
join our socials:
92113

93-
* [Discord](https://discord.gg/aG8XKuwsQd) (preferred)
94-
* [Telegram](https://t.me/baking_bad_chat)
95-
* [Slack](https://tezos-dev.slack.com/archives/CV5NX7F2L)
114+
- [Discord](https://discord.gg/aG8XKuwsQd) (preferred)
115+
- [Telegram](https://t.me/baking_bad_chat)
116+
- [Slack](https://tezos-dev.slack.com/archives/CV5NX7F2L)

docs/14.contribution.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
title: Contribution
3+
description: "DipDup license and open source code."
4+
nested: Resources
5+
---
6+
7+
# Contribution
8+
9+
DipDup is a free and open-source software licensed under the [MIT License](#mit-license). The source code is available on [GitHub](https://github.com/dipdup-io/dipdup).
10+
11+
## Contribution Guide
12+
13+
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt).
14+
15+
### General
16+
17+
- All code in this repository MUST be licensed under the [MIT License](#mit-license).
18+
- Python code in this repository MUST run on Python 3.11. Using modern language features is encouraged.
19+
- Python code in this repository MUST run in Linux, macOS, Docker, and environments on `amd64` and `arm64` architectures.
20+
- We use the PDM package manager to set up the development environment. You SHOULD install it and run `pdm run -l` to see available shortcuts.
21+
- Have fun!
22+
23+
### Git workflow
24+
25+
- Branch names MUST follow `prefix/short-description` format. Prefixes currently in use: `feat` for features, `fix` for bugfixes, `docs` for documentation, `exp` for experiments, `ci` for GHA and Docker stuff, `aux` for everything else.
26+
- Commits in pull requests MUST be squashed when merging to `next`.
27+
- Issues and pull requests MUST have a descriptive title; they SHOULD be linked to each other, appropriately labeled, and assigned to maintainers while in progress.
28+
29+
### Codestyle
30+
31+
We use several tools to enforce codestyle and code quality: `black` for autoformatting, `ruff` for linting, and `mypy` for typechecking. All checks MUST pass before merging the code to the default branch. Everything not enforced by these tools is up to the developer. But here are some recommendations:
32+
33+
- Consistency is the key. If you see a pattern in the codebase, follow it.
34+
- Use `NOTE`, `TODO`, and `FIXME` prefixes for meaningful comments. They help a lot to navigate the codebase.
35+
- Lazy imports are important to keep startup time low for tiny commands. We also do it for project imports, so not a big deal.
36+
- Some methods and attributes made private to avoid polluting the public API. Feel free to access them from the outside if you know what you are doing.
37+
- Finally, about exact language features. f-string formatting is preferred over other syntax. Be careful with walrus operator. Don't forget else in conditional expressions. Listen to you mom. We have no consensus about the match-case yet.
38+
39+
### Packaging
40+
41+
- All dependencies MUST be declared in `pyproject.toml` file add pinned to non-breaking versions (e.g. `~1.2`).
42+
43+
### Changelog
44+
45+
- All changes that affect user (developer) experience MUST be documented in the CHANGELOG.md file.
46+
- Changes that significantly affect DipDup maintainers' experience MAY be documented in the CHANGELOG.md file.
47+
- The changelog MUST conform to the "Keep a Changelog" specification (CI will break otherwise). Group order we use: Added, Fixed, Changed, Deprecated, Removed, Performance, Security, Other.
48+
- Lines describing changes MUST be sorted and begin with DipDup component name (`index: Added ...`). One of the following: ci, cli, codegen, coinbase, config, context, database, demos, deps, docs, exceptions, hasura, hooks, http, index, install, ipfs, jobs, metadata, models, projects, prometheus, sentry, tzkt.
49+
50+
### Documentation
51+
52+
- A page in "Release notes" section MUST accompany all major releases. Minor releases SHOULD be documented as well.
53+
54+
## Maintainer Guide
55+
56+
### Security
57+
58+
- GitHub Dependabot alerts about vulnerable dependencies MUST be investigated and resolved as soon as possible.
59+
- Security-related bugfixes MUST be mentioned in the changelog under the "Security" section.
60+
61+
### Privacy
62+
63+
- DipDup MUST NOT collect any data from users.
64+
- DipDup SHOULD NOT perform network requests to APIs not defined in config as datasources. Current exceptions: version check with GitHub.
65+
66+
### Docker images
67+
68+
- DipDup dockerfiles use autogenerated `requirements.txt` files. Maintainers MUST run `pdm run update` script on every change in dependencies.
69+
- Docker images for stable releases MUST be published on Docker Hub and GitHub Container Registry.
70+
- Maintainers MAY publish arbitrary images on GHCR and remove them when not needed.
71+
72+
### Installer
73+
74+
- Installer module MUST depend on Python stdlib only.
75+
76+
### Scaffolding
77+
78+
- Project templates SHOULD cover all index types available in DipDup.
79+
- They also MAY contain additional features and integrations.
80+
81+
### Demo projects
82+
83+
- Demos are stored in `src` directory. They MUST be generated automatically from project templates using replay files.
84+
- Maintainers SHOULD run `pdm demos` command regularly to ensure that demo projects are up to date.
85+
86+
### Releases
87+
88+
- Release versions MUST conform to [Semantic Versioning](https://semver.org/). Releases that introduce breaking changes MUST be major ones.
89+
- Only the latest major version is supported in general. Critical fixes MAY be backported to the previous major release. To do so, create an `aux/X.Y.Z` branch from the latest stable tag, bump the DipDup version manually, and add a new tag.
90+
91+
## MIT License
92+
93+
<!-- markdownlint-disable first-line-h1 -->
94+
{{ #include ../LICENSE }}

docs/15.opensource.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)