Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(409) Transition Protean Config to .toml file #427

Merged
merged 9 commits into from
May 28, 2024
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ tag = True

[bumpversion:file:src/protean/__init__.py]

[bumpversion:file:src/protean/template/{{package_name}}/setup.py.jinja]
[bumpversion:file:src/protean/template/domain_template/pyproject.toml]

[bumpversion:file:docs-sphinx/user/installation.rst]
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ venv.bak/
# mypy
.mypy_cache/

# ruff
.ruff_cache/

# Mr Developer
.mr.developer.cfg
.project
Expand Down
133 changes: 0 additions & 133 deletions config.py

This file was deleted.

33 changes: 33 additions & 0 deletions docs/guides/compose-a-domain/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Configuratiion

## Primary Configuration Attributes

### `environment`

### `debug`

### `testing`

### `secret_key`

## Domain Configuration Attributes

### `identity_strategy`

### `identity_type`

### `command_processing`

### `event_processing`

### `snapshot_threshold`

## Adapter Configuration

### `database`

### `cache`

### `broker`

### `event_store`
2 changes: 1 addition & 1 deletion docs/guides/domain-definition/aggregates.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ NotSupportedError: TimeStamped class has been marked abstract and cannot be inst
Specifies the database that the aggregate is persisted in.

Aggregates are connected to underlying data stores via providers. The
definitions of these providers are supplied within the `DATABASES` key in the
definitions of these providers are supplied within the `databases` key in the
Domain’s configuration. Protean identifies the correct data store, establishes
the connection and takes responsibility of persisting the data.

Expand Down
6 changes: 3 additions & 3 deletions docs/guides/domain-definition/fields/simple-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ identifier.
**Optional Arguments**

- **`increment`**: Auto-increment field value. Defaults to `False`. Only valid
when `IDENTITY_TYPE` is `INTEGER` and `IDENTITY_STRATEGY` is set to `DATABASE`.
when `identity_type` is `INTEGER` and `identity_strategy` is set to `DATABASE`.

!!!note
Not all databases support this `increment` feature. Cross-verify with the
Expand All @@ -154,7 +154,7 @@ If you want to supply values, use [`Identifier`](#identifier) fields.
```

By default, Protean depends on UUIDs as identifier values. You can use the
`IDENTITY_TYPE` config attributes to customize this behavior and choose
`identity_type` config attributes to customize this behavior and choose
another type (like integer values).

```shell hl_lines="6"
Expand All @@ -172,7 +172,7 @@ in Protean.
## Identifier

An Identifier. The identity type is String type by default, but can be changed
with `IDENTITY_TYPE` configuration attribute for all entities, or can be set
with `identity_type` configuration attribute for all entities, or can be set
per entity with the `identity_type` parameter.

**Optional Arguments**
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/domain-definition/identity.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Identity

When IDENTITY_TYPE is INTEGER, Strings that have valid integers or UUIDs are allowed
When identity_type is INTEGER, Strings that have valid integers or UUIDs are allowed
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ nav:
- guides/compose-a-domain/when-to-compose.md
- guides/compose-a-domain/element-decorators.md
- guides/compose-a-domain/object-model.md
# - guides/compose-a-domain/configuration.md
- guides/compose-a-domain/configuration.md
- Defining Concepts:
- guides/domain-definition/index.md
- Fields:
Expand Down
Loading
Loading