Skip to content

Commit a39b170

Browse files
Kathmandu events support (#497)
1 parent 486e8b2 commit a39b170

File tree

227 files changed

+9406
-15227
lines changed

Some content is hidden

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

227 files changed

+9406
-15227
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: dipdup-net

.github/workflows/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- '*.*.*'
77
branches:
88
- master
9+
# FIXME
10+
- feat/events
911
paths:
1012
- 'docs/**'
1113
- 'scripts/**'

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
- name: Set up Poetry
7171
uses: snok/install-poetry@v1
7272
with:
73-
version: '1.2.1'
73+
version: '1.2.2'
7474

7575
- name: Install project
7676
run: make install

CHANGELOG.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,47 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
The format is based on [Keep a Changelog],
6-
and this project adheres to [Semantic Versioning].
5+
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].
76

8-
## [Unreleased]
7+
## [6.2.0] - 2022-10-12
98

109
### Added
1110

12-
- install: New install script based on pipx.
13-
- cli: `dipdup new` command to create a new project (ex. cookiecutter).
14-
- cli: `dipdup update` command to update local pipx and poetry installations.
11+
- cli: `new` command to create a new project interactively.
12+
- cli: `install/update/uninstall` commands to manage local DipDup installation.
13+
- index: New index kind `event` to process contract events.
14+
- install: New interactive installer based on pipx (`install.py` or `dipdup-install`).
1515

1616
### Fixed
1717

18-
- cli: Commands that only print help pages no longer require a valid config.
19-
- codegen: Fail lately when datamodel-codegen is not available.
20-
- config: Allow `dsn` field to be empty.
18+
- cli: Fixed commands that don't require a valid config yet crash with `ConfigurationError`.
19+
- codegen: Fail on demand when `datamodel-codegen` is not available.
20+
- codegen: Fixed Jinja2 template caching.
21+
- config: Allow `sentry.dsn` field to be empty.
22+
- config: Fixed greedy environment variable regex.
2123
- hooks: Raise a `FeatureAvailabilityHook` instead of a warning when trying to execute hooks on SQLite.
2224

23-
### Removed
25+
### Improved
2426

25-
- install: Cookiecutter template is no longer supported.
27+
- cli: Detect `src/` layout when guessing package path.
28+
- codegen: Improved cross-platform compatibility.
29+
- config: `sentry.user_id` option to set user ID for Sentry (affects release adoption data).
30+
- sentry: Detect environment when not set in config (docker/gha/tests/local)
31+
- sentry: Expose more tags under the `dipdup` namespace.
2632

2733
### Performance
2834

29-
- cli: Up to 5x decrease in startup time.
35+
- cli: Up to 5x faster startup for some commands.
36+
37+
### Security
38+
39+
- sentry: Prevent Sentry from leaking hostname if `server_name` is not set.
40+
- sentry: Notify about using Sentry when DSN is set or crash reporting is enabled.
41+
42+
### Other
43+
44+
- ci: A significantly faster execution of GitHub Actions.
45+
- docs: Updated "Contributing Guide" page.
3046

3147
## [6.1.3] - 2022-09-21
3248

CONTRIBUTING.md

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,52 @@
11
# DipDup contribution guide
22

3-
> 🚧 **UNDER CONSTRUCTION**
4-
>
5-
> This page or paragraph is yet to be written. Come back later.
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).
64

7-
## Preparation
5+
## General
86

9-
* To set up the development environment, you need to install [Poetry](https://python-poetry.org/docs/#installation) package manager and GNU Make.
10-
* Run `make help` to get available commands.
7+
* All code in this repository MUST be licensed under the [MIT License](LICENSE).
8+
* Python code in this repository MUST run on Python 3.10. It also SHOULD run on Python 3.11. Using modern language features is encouraged.
9+
* Python code in this repository MUST run in Linux, macOS, Docker, and `amd64`/`arm64` environments. Windows SHOULD be supported as well.
10+
* We use the [Poetry](https://python-poetry.org/docs/#installation) package manager and GNU Make to set up the development environment. You SHOULD install both tools and run `make help` to see available shortcuts.
11+
* Developers SHOULD have fun while contributing to the project.
1112

12-
## Git
13+
## GitHub
1314

14-
* Branch names MUST follow `prefix/short-descriptions` format. Prefixes we currently use: `feat` for features, `fix` for bugfixes, `docs` for documentation, `aux` for miscellaneous, `exp` for experiments.
15+
* Branch names MUST follow `prefix/short-description` format. Prefixes currently in use: `feat` for features, `fix` for bugfixes, `docs` for documentation, `aux` for miscellaneous, `exp` for experiments.
16+
* Commits in pull requests MUST be squashed when merging to `master`.
17+
* 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.
1518

1619
## Codestyle
1720

18-
* We use the following combo of linters and formatters: `isort`, `black`, `flake8`, `mypy`. All linter checks MUST pass before merging code to master.
21+
* We use the following combo of linters and formatters: `isort`, `black`, `flake8`, `mypy`. All linter checks MUST pass before merging code to `master` (CI will fail otherwise).
22+
* Single quotes are RECOMMENDED for string literals.
23+
* Meaningful comments are highly RECOMMENDED to begin with `# NOTE:`, `# TODO:`, or `# FIXME:`.
24+
* f-string formatting is RECOMMENDED over other methods. Logging is an exception to this rule.
1925

2026
## Releases
2127

22-
* Release versions SHOULD conform to [Semantic Versioning](https://semver.org/). Releases that introduce breaking changes MUST be major ones.
23-
* Only the latest major version is supported in general. Critical fixes CAN be backported to the previous major release. To do so, git checkout from the latest stable tag, bump DipDup version manually and add a new tag.
28+
* Release versions MUST conform to [Semantic Versioning](https://semver.org/). Releases that introduce breaking changes MUST be major ones.
29+
* 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.
2430

2531
## Documentation
2632

27-
* All changes that affect user experience MUST be documented in CHANGELOG.md file.
28-
* Changelog formatting SHOULD stick to GitLab changelog [guidelines](https://docs.gitlab.com/ee/development/changelog.html).
33+
* All changes that affect user experience MUST be documented in the CHANGELOG.md file.
34+
* Changes that significantly affect DipDup maintainers' experience MAY be documented in the CHANGELOG.md file.
35+
* The changelog MUST conform to the "Keep a Changelog" specification (CI will break otherwise).
36+
* A page in Release Notes SHOULD accompany all major releases.
37+
* All internal links MUST be created with `{{ #summary ...` shortcodes.
38+
* All values used in project templates MUST be replaced with `{{ #cookiecutter ...` shortcodes.
39+
40+
> 🚧 **UNDER CONSTRUCTION**
41+
>
42+
> This page or paragraph is yet to be written. Come back later.
43+
44+
## Demo Projects
45+
46+
## Installer
47+
48+
## Docker Images
49+
50+
## Tests
51+
52+
## Code Review

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN <<eot
88
apt update
99
apt install -y gcc make git `if [[ $PYTEZOS = "1" ]]; then echo build-essential pkg-config libsodium-dev libsecp256k1-dev libgmp-dev; fi`
1010

11-
pip install --no-cache-dir poetry==1.2.1
11+
pip install --no-cache-dir poetry==1.2.2
1212

1313
mkdir -p /opt/dipdup
1414

@@ -37,7 +37,7 @@ SHELL ["/bin/bash", "-c"]
3737

3838
RUN <<eot
3939
useradd -ms /bin/bash dipdup
40-
pip install --no-cache-dir poetry==1.2.1 setuptools
40+
pip install --no-cache-dir poetry==1.2.2 setuptools
4141

4242
apt update
4343
apt install -y --no-install-recommends git `if [[ $PYTEZOS = "1" ]]; then echo libsodium-dev libsecp256k1-dev libgmp-dev; fi`

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ lint: ## Lint with all tools
2727
make isort black flake mypy
2828

2929
test: ## Run test suite
30-
poetry run pytest --cov-report=term-missing --cov=dipdup --cov-report=xml -n auto --dist loadscope -s -v tests
30+
poetry run pytest --cov-report=term-missing --cov=dipdup --cov-report=xml -n auto -s -v tests
3131

3232
docs: ## Build docs
3333
scripts/update_cookiecutter.py

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
[![GitHub stars](https://img.shields.io/github/stars/dipdup-net/dipdup?color=2c2c2c)](https://github.com/dipdup-net/dipdup)
2+
[![Latest stable release](https://img.shields.io/github/v/release/dipdup-net/dipdup?label=stable%20release&color=2c2c2c)](https://github.com/dipdup-net/dipdup/releases)
3+
[![Latest pre-release)](https://img.shields.io/github/v/release/dipdup-net/dipdup?include_prereleases&label=latest%20release&color=2c2c2c)](https://github.com/dipdup-net/dipdup/releases)
14
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dipdup?color=2c2c2c)](https://www.python.org)
2-
[![Latest stable release](https://img.shields.io/github/v/release/dipdup-net/dipdup?label=stable&color=2c2c2c)](https://github.com/dipdup-net/dipdup/releases)
3-
[![Latest pre-release)](https://img.shields.io/github/v/release/dipdup-net/dipdup?include_prereleases&label=latest&color=2c2c2c)](https://github.com/dipdup-net/dipdup/releases)
45
[![License: MIT](https://img.shields.io/github/license/dipdup-net/dipdup?color=2c2c2c)](https://github.com/dipdup-net/dipdup/blob/master/LICENSE)
56
<br>
6-
[![GitHub stars](https://img.shields.io/github/stars/dipdup-net/dipdup?color=2c2c2c)](https://github.com/dipdup-net/dipdup)
77
[![PyPI monthly downloads](https://img.shields.io/pypi/dm/dipdup?color=2c2c2c)](https://pypi.org/project/dipdup/)
88
[![GitHub issues](https://img.shields.io/github/issues/dipdup-net/dipdup?color=2c2c2c)](https://github.com/dipdup-net/dipdup/issues)
99
[![GitHub pull requests](https://img.shields.io/github/issues-pr/dipdup-net/dipdup?color=2c2c2c)](https://github.com/dipdup-net/dipdup/pulls)
10+
[![GitHub Discussions](https://img.shields.io/github/discussions/dipdup-net/dipdup?color=2c2c2c)](https://github.com/dipdup-net/dipdup/discussions)
1011

1112
```text
1213
____ _ ____
@@ -17,13 +18,13 @@
1718
/_/ /_/
1819
```
1920

20-
DipDup is a Python framework for building indexers of [Tezos](https://tezos.com/) smart contracts. It helps developers focus on the business logic instead of writing data storing and serving boilerplate. DipDup-based indexers are selective, which means only required data is requested. This approach allows to achieve faster indexing times and decreased load on APIs DipDup uses.
21+
DipDup is a Python framework for building smart contract indexers. It helps developers focus on business logic instead of writing a boilerplate to store and serve data. DipDup-based indexers are selective, which means only required data is requested. This approach allows to achieve faster indexing times and decreased load on underlying APIs.
2122

2223
* **Ready to build your first indexer?** Head to [Quickstart](https://docs.dipdup.io/quickstart).
2324

2425
* **Looking for examples?** Check out [Demo Projects](https://docs.dipdup.io/examples/demo-projects) and [Built with DipDup](https://docs.dipdup.io/examples/built-with-dipdup) pages.
2526

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

2829
* **Have a question?** Contact us on [Discord](https://discord.com/invite/RcPGSdcVSx), [Telegram](https://t.me/baking_bad_chat), or [Slack](https://tezos-dev.slack.com/archives/CV5NX7F2L)!
2930

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Ignore all
2+
*
3+
4+
# Add build files
5+
!Makefile
6+
!pyproject.toml
7+
!poetry.lock
8+
!requirements**
9+
!README.md
10+
11+
# Add code
12+
!src
13+
14+
# Add configs
15+
!*.yml
16+
17+
# Ignore caches
18+
**/.mypy_cache
19+
**/.pytest_cache
20+
**/__pycache__
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
*.ipynb
80+
.ipynb_checkpoints
81+
82+
# IPython
83+
profile_default/
84+
ipython_config.py
85+
86+
# pyenv
87+
# For a library or package, you might want to ignore these files since the code is
88+
# intended to run in multiple environments; otherwise, check them in:
89+
.python-version
90+
91+
# pipenv
92+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
94+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
95+
# install all needed dependencies.
96+
#Pipfile.lock
97+
98+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
99+
__pypackages__/
100+
101+
# Celery stuff
102+
celerybeat-schedule
103+
celerybeat.pid
104+
105+
# SageMath parsed files
106+
*.sage.py
107+
108+
# Environments
109+
.env
110+
.venv
111+
env/
112+
venv/
113+
ENV/
114+
env.bak/
115+
venv.bak/
116+
117+
# Spyder project settings
118+
.spyderproject
119+
.spyproject
120+
121+
# Rope project settings
122+
.ropeproject
123+
124+
# mkdocs documentation
125+
/site
126+
127+
# mypy
128+
.mypy_cache/
129+
.dmypy.json
130+
dmypy.json
131+
132+
# Pyre type checker
133+
.pyre/
134+
135+
# pytype static type analyzer
136+
.pytype/
137+
138+
# Cython debug symbols
139+
cython_debug/
140+
141+
.vscode
142+
.idea
143+
144+
*sqlite3*
145+
146+
.noseids
147+
148+
secrets.env
149+
150+
*.out*

0 commit comments

Comments
 (0)