Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic

Releases prior to 7.0 has been removed from this file to declutter search results; see the [archived copy](https://github.com/dipdup-io/dipdup/blob/8.0.0b5/CHANGELOG.md) for the full list.

## [Unreleased]

### Added

- cli: Added `--name` option to `new` command to skip asking for the project name.

### Fixed

- cli: Fixed regression in `init` command behavior when run without flags.
- cli: Fixed detecting package name in existing projects without `replay.yaml` file.
- cli: Fixed `init` command processing the same paths multiple times.
- cli: Fixed `init` command not respecting `--force` flag when generating default envfiles.

## [8.3.2] - 2025-04-17

### Added
Expand Down
10 changes: 8 additions & 2 deletions docs/7.references/1.cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@ Discord: <a class="reference external" href="https://discord.gg/aG
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-dipdup-init-0">
<span id="cmdoption-dipdup-init-no-base"></span><span class="sig-name descname"><span class="pre">-b</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--no-base</span></span><span class="sig-prename descclassname"></span></dt>
<dd><p>Skip template base</p>
<dd><p>Skip files from base template.</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-dipdup-init-no-linter">
<span class="sig-name descname"><span class="pre">--no-linter</span></span><span class="sig-prename descclassname"></span></dt>
<dd><p>Skip linter and formatter.</p>
<dd><p>Skip applying linter and formatter.</p>
</dd></dl>

<p class="rubric">Arguments</p>
Expand Down Expand Up @@ -281,6 +281,12 @@ Discord: <a class="reference external" href="https://discord.gg/aG
<dd><p>Use a specific template.</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-dipdup-new-n">
<span id="cmdoption-dipdup-new-name"></span><span class="sig-name descname"><span class="pre">-n</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--name</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;name&gt;</span></span></dt>
<dd><p>Project name.</p>
</dd></dl>

</section>


Expand Down
5 changes: 5 additions & 0 deletions docs/9.release-notes/_8.0_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

### Added

- cli: Added `--name` option to `new` command to skip asking for the project name.
- cli: Added `--pre` flag to `self` group commands to install pre-release versions.
- cli: Added `--raw` option to `config export` command to dump config preserving the original structure.
- cli: Added `-C` option, a shorthand for `-c . -c configs/dipdup.<name>.yaml`.
Expand All @@ -25,9 +26,13 @@
- cli: Don't save reports for successful test runs.
- cli: Don't update existing installation in `self install` command unless asked to.
- cli: Fixed `--pre` installer flag.
- cli: Fixed `init` command not respecting `--force` flag when generating default envfiles.
- cli: Fixed `init` command processing the same paths multiple times.
- cli: Fixed detecting package name in existing projects without `replay.yaml` file.
- cli: Fixed env files not being loaded in some commands.
- cli: Fixed errors raised when the project package is invalid.
- cli: Fixed progress estimation when there are indexes with `last_level` option set.
- cli: Fixed regression in `init` command behavior when run without flags.
- cli: Import some dependencies on demand to reduce memory footprint.
- cli: Improved logging of indexer status.
- config: Allow `sentry.dsn` to be empty string.
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ dependencies = [
"async-lru~=2.0",
"asyncpg~=0.29",
"click~=8.1",
"datamodel-code-generator~=0.26",
# FIXME: 0.30 on macOS: tezos_storage.py:17:11: F821 Undefined name `bool_aliased
"datamodel-code-generator==0.28.5", # pinned
"eth-abi~=5.0",
"lru-dict~=1.3",
"mcp>=1.2.1",
Expand Down
242 changes: 122 additions & 120 deletions requirements.txt

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions src/dipdup/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ async def run(ctx: click.Context) -> None:
@cli.command()
@click.option('--force', '-f', is_flag=True, help='Overwrite existing types and ABIs.')
@click.option('--base', '-b', is_flag=True, help='Include template base (default)')
@click.option('--no-base', '-b', is_flag=True, help='Skip template base')
@click.option('--no-linter', is_flag=True, help='Skip linter and formatter.')
@click.option('--no-base', '-b', is_flag=True, help='Skip files from base template.')
@click.option('--no-linter', is_flag=True, help='Skip applying linter and formatter.')
@click.argument(
'include',
type=str,
Expand Down Expand Up @@ -385,7 +385,7 @@ async def init(

await dipdup.init(
force=force,
no_base=no_base or bool(include),
no_base=no_base,
no_linter=no_linter,
include=set(include),
)
Expand Down Expand Up @@ -560,7 +560,6 @@ async def mcp_run(ctx: click.Context) -> None:

import uvicorn
from anyio import from_thread
from mcp.server.sse import SseServerTransport
from starlette.applications import Starlette
from starlette.routing import Mount
from starlette.routing import Route
Expand All @@ -573,6 +572,7 @@ async def mcp_run(ctx: click.Context) -> None:
from dipdup.context import McpContext
from dipdup.datasources.http import HttpDatasource
from dipdup.dipdup import DipDup
from mcp.server.sse import SseServerTransport

config: DipDupConfig = ctx.obj.config
dipdup = DipDup(config)
Expand Down Expand Up @@ -955,13 +955,15 @@ async def schema_export(ctx: click.Context) -> None:
help='Use values from a replay file.',
)
@click.option('--template', '-t', type=str, default=None, help='Use a specific template.')
@click.option('--name', '-n', type=str, default=None, help='Project name.')
@_cli_wrapper
async def new(
ctx: click.Context,
quiet: bool,
force: bool,
replay: Path | None,
template: str | None,
name: str | None,
) -> None:
"""Create a new project interactively."""

Expand All @@ -982,7 +984,7 @@ async def new(
# NOTE: Collect answers from appropriate source
try:
if quiet:
answers = get_default_answers()
answers = get_default_answers(package=name)
elif replay:
answers = answers_from_replay(replay)
else:
Expand Down
Loading