Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ 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]

### Deprecated

- package: DipDup packages are expected to have `pyproject.toml` and `dipdup.yaml` files in the root directory. This will become a requirement in 9.0.

## [8.2.0rc1] - 2025-01-24

### Added
Expand Down
4 changes: 4 additions & 0 deletions docs/9.release-notes/_8.0_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
- performance: All time intervals are now measured in seconds.
- performance: Several metrics have been renamed and new ones have been added.

### Deprecated

- package: DipDup packages are expected to have `pyproject.toml` and `dipdup.yaml` files in the root directory. This will become a requirement in 9.0.

### Removed

- config: Removed `advanced.skip_version_check` flag; use `DIPDUP_NO_VERSION_CHECK` environment variable.
Expand Down
2 changes: 2 additions & 0 deletions src/dipdup/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@ async def self_install(
editable=editable,
with_pdm=replay is not None and replay['package_manager'] == 'pdm',
with_poetry=replay is not None and replay['package_manager'] == 'poetry',
with_uv=replay is not None and replay['package_manager'] == 'uv',
)


Expand Down Expand Up @@ -972,6 +973,7 @@ async def self_update(
update=True,
with_pdm=replay is not None and replay['package_manager'] == 'pdm',
with_poetry=replay is not None and replay['package_manager'] == 'poetry',
with_uv=replay is not None and replay['package_manager'] == 'uv',
)


Expand Down
14 changes: 14 additions & 0 deletions src/dipdup/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ def __init__(self, root: Path, quiet: bool = False) -> None:
self.root = root
self.name = root.name

# NOTE: Paths expected to exist in package root
self.pyproject = root.parent / 'pyproject.toml'
self.root_config = root.parent / 'dipdup.yaml'

# NOTE: Package sections with .keep markers
self.abi = root / 'abi'
self.configs = root / 'configs'
Expand Down Expand Up @@ -164,6 +168,16 @@ def _pre_init(self) -> None:
if self.root.exists() and not self.root.is_dir():
raise ProjectPackageError(f'`{self.root}` exists and not a directory')

# TODO: Remove in 9.0
def act(x: str) -> None:
if env.NEXT:
raise ProjectPackageError(x)
_logger.warning(x)

for path in (self.root_config, self.pyproject):
if not path.is_file():
act(f'`{path}` not found. Have you created a project with `dipdup new` command?')

def _post_init(self) -> None:
# NOTE: Allows plain package structure to be imported
if self.root != Path.cwd() or env.NO_SYMLINK:
Expand Down
Loading