Skip to content

Commit ae00104

Browse files
Fix generation of READMEs and replays in demos (#743)
* Fix generation of READMEs and replays in demo * Fix default template (demo_blank)
1 parent 94fff19 commit ae00104

File tree

67 files changed

+232
-141
lines changed

Some content is hidden

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

67 files changed

+232
-141
lines changed

scripts/update_demos.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#!/usr/bin/env python3
22
import subprocess
3-
from copy import copy
43
from pathlib import Path
54
from shutil import rmtree
65

7-
from dipdup.project import DEFAULT_ANSWERS
6+
from dipdup.project import answers_from_replay
87
from dipdup.project import render_project
98

109
projects_path = Path(__file__).parent.parent / 'projects'
@@ -33,7 +32,7 @@ def _get_projects() -> list[Path]:
3332
continue
3433

3534
print(f'=> Rendering {path}')
36-
answers = copy(DEFAULT_ANSWERS)
35+
answers = answers_from_replay(path / 'replay.yaml')
3736
answers['package'] = package
3837
answers['template'] = package
3938

src/demo_auction/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# demo_auction
22

3-
Blockchain indexer built with DipDup
3+
TzColors NFT marketplace
44

55
## Installation
66

src/demo_auction/configs/replay.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ replay:
55
template: demo_auction
66
package: demo_auction
77
version: 0.0.1
8-
description: Blockchain indexer built with DipDup
8+
description: TzColors NFT marketplace
99
license: MIT
10-
name: John Smith
11-
10+
name: John Doe
11+
1212
postgresql_image: postgres:15
1313
hasura_image: hasura/graphql-engine:v2.29.1
1414
line_length: 120

src/demo_auction/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[project]
22
name = "demo_auction"
33
version = "0.0.1"
4-
description = "Blockchain indexer built with DipDup"
4+
description = "TzColors NFT marketplace"
55
license = { text = "MIT" }
66
authors = [
7-
{ name = "John Smith", email = "[email protected]" }
7+
{ name = "John Doe", email = "[email protected]" }
88
]
99
readme = "README.md"
1010
requires-python = ">=3.11,<3.12"

src/demo_big_maps/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# demo_big_maps
22

3-
Blockchain indexer built with DipDup
3+
Indexing specific big maps
44

55
## Installation
66

src/demo_big_maps/configs/replay.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ replay:
55
template: demo_big_maps
66
package: demo_big_maps
77
version: 0.0.1
8-
description: Blockchain indexer built with DipDup
8+
description: Indexing specific big maps
99
license: MIT
10-
name: John Smith
11-
10+
name: John Doe
11+
1212
postgresql_image: postgres:15
1313
hasura_image: hasura/graphql-engine:v2.29.1
1414
line_length: 120

src/demo_big_maps/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[project]
22
name = "demo_big_maps"
33
version = "0.0.1"
4-
description = "Blockchain indexer built with DipDup"
4+
description = "Indexing specific big maps"
55
license = { text = "MIT" }
66
authors = [
7-
{ name = "John Smith", email = "[email protected]" }
7+
{ name = "John Doe", email = "[email protected]" }
88
]
99
readme = "README.md"
1010
requires-python = ">=3.11,<3.12"

src/demo_blank/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# demo_blank
22

3-
Blockchain indexer built with DipDup
3+
Empty config for a fresh start
44

55
## Installation
66

src/demo_blank/configs/replay.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ replay:
55
template: demo_blank
66
package: demo_blank
77
version: 0.0.1
8-
description: Blockchain indexer built with DipDup
8+
description: Empty config for a fresh start
99
license: MIT
10-
name: John Smith
11-
10+
name: John Doe
11+
1212
postgresql_image: postgres:15
1313
hasura_image: hasura/graphql-engine:v2.29.1
1414
line_length: 120

src/demo_blank/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ class ExampleModel(models.Model):
3838
m2m_relation_ids: list[int]
3939

4040
class Meta:
41-
abstract=True
41+
abstract = True

0 commit comments

Comments
 (0)