psychedelicious
d487102904
fix(config): fix config _check_for_discontinuities
...
Need to sort the migrations first.
2024-05-14 16:55:22 +10:00
psychedelicious
4c081d58e0
tidy(config): add note about circular deps in config_migrate.py
2024-05-14 16:31:11 +10:00
psychedelicious
18b5aafade
tidy(config): add "config" to class names to differentiate from SQLite migration classes
2024-05-14 16:21:50 +10:00
psychedelicious
6946a3871f
feat(config): simplify config migrator logic
...
- Remove `Migrations` class - unnecessary complexity on top of `MigrationEntry`
- Move common classes to `config_common`
- Tidy docstrings, variable names
2024-05-14 16:20:40 +10:00
Lincoln Stein
a48abfacf4
make config migrator into an instance; refactor location of get_config()
2024-05-02 23:45:34 -04:00
Lincoln Stein
6eaed9a9cb
check for strictly contiguous from_version->to_version ranges
2024-04-24 21:36:28 -04:00
psychedelicious
d12fb7db68
fix(config): fix duplicate migration logic
...
This was checking a `Version` object against a `MigrationEntry`, but what we want is to check the version object against `MigrationEntry.from_version`
2024-04-23 17:25:53 +10:00
psychedelicious
5d411e446a
tidy(config): use a type alias for the migration function
2024-04-23 17:21:05 +10:00
psychedelicious
6f128c86b4
tidy(config): use dataclass for MigrationEntry
...
The only pydantic usage was to convert strings to `Version` objects. The reason to do this conversion was to allow the register decorator to accept strings. MigrationEntry is only created inside this class, so we can just create versions from each migration when instantiating MigrationEntry instead.
Also, pydantic doesn't provide runtime time checking for arbitrary classes like Version, so we don't get any real benefit.
2024-04-23 17:19:54 +10:00
psychedelicious
aca9e44a3a
fix(config): use TypeAlias instead of TypeVar
...
TypeVar is for generics, but the usage here is as an alias
2024-04-23 17:12:19 +10:00
psychedelicious
e39f035264
tidy(config): removed extraneous ABC
...
We don't need separate implementations for this class, let's not complicate it with an ABC
2024-04-23 17:11:13 +10:00
psychedelicious
b612c73954
tidy(config): remove unused TYPE_CHECKING block
2024-04-23 17:09:50 +10:00
Lincoln Stein
36495b730d
use packaging.version rather than version-parse
2024-04-18 23:07:54 -04:00
Lincoln Stein
6ad1948a44
add InvokeAIAppConfig schema migration system
2024-04-18 21:33:54 -04:00