Skip to content

Commit 3ab780f

Browse files
Tim O'FarrellTim O'Farrell
Tim O'Farrell
authored and
Tim O'Farrell
committed
Readme update
1 parent 09a5131 commit 3ab780f

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

README.md

+8-12
Original file line numberDiff line numberDiff line change
@@ -62,24 +62,20 @@ This demonstrates starting with a json schema and generating python dataclasses
6262

6363
### Configuring the Context itself
6464

65-
Schemey uses a strategy very similar to marshy for configuration.
65+
Schemey uses [Injecty](https://github.org/tofarr/injecty) for configuration.
66+
The default configuration is [here](injecty_config_schemey/__init__.py)
6667

67-
Schemey looks for top level modules starting with the name `schemey_config_*`,
68-
sorts them by `priority`, and applies them to the default context by invoking their
69-
`configure` function. [schemey_config_default/__init__.py](schemey_config_default/__init__.py)
70-
contains the default set of factories.
71-
72-
For example, for a project named `no_more_uuids`, I may add a file `schemey_config_no_more_uuids/__init__.py`:
68+
For example, for a project named `no_more_uuids`, I may add a file `injecty_config_no_more_uuids/__init__.py`:
7369

7470
```
71+
from schemey.factory.schema_factory_abc import SchemaFactoryABC
72+
from schemey.factory.uuid_factory import UuidFactory
73+
7574
priority = 120 # Applied after default
7675
76+
7777
def configure(context):
78-
# For some reason, I don't want to be able to generate schemas for uuids!
79-
context.factories = [
80-
f for f in context.factories
81-
if 'uuid' not in f.__class__.__name__.lower()
82-
]
78+
context.deregister_impl(SchemaFactoryABC, UuidFactory)
8379
8480
```
8581

0 commit comments

Comments
 (0)