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
11 changes: 5 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "conflator"
version = "0.1.8"
Expand All @@ -9,19 +13,14 @@ repository = "https://github.com/ecmwf/conflator/"

[tool.poetry.dependencies]
python = ">3.9"
pydantic = ">2.0"
pydantic = ">=2.9"
rich-argparse = ">1.0"
pyyaml = ">6.0"


[tool.poetry.group.dev.dependencies]
mypy = ">1.8.0"
ruff = ">0.2.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.ruff]
line-length = 120
lint.extend-select = ["I"]
Expand Down
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions tests/requirements_test.txt

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_conflator_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class NewConfig(ConfigModel):
"type": "string",
},
"nested_key": {
"allOf": [{"$ref": "#/$defs/NestedConfig"}],
"$ref": "#/$defs/NestedConfig",
"default": {"key": "test"},
},
},
Expand Down
13 changes: 1 addition & 12 deletions tests/test_subclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class Action(ConfigModel):
model_config = ConfigDict(extra="forbid")
model_config = ConfigDict(extra="forbid")
name: str

Expand Down Expand Up @@ -67,14 +66,6 @@ def get(self, target):
]
)
)
action_subclasses = tuple(
set(Subclasses().get(Action).values())
- set(
[
Action,
]
)
)

# Constuct a union type out of the subclasses
# Field(discriminator="name") tells pydantic to look at the name
Expand All @@ -83,9 +74,7 @@ def get(self, target):


class Config(ConfigModel):
actions: list[action_subclasses_union] = Field(discriminator="name")

actions: list[action_subclasses_union] = Field(discriminator="name")
actions: list[action_subclasses_union]


def test_subclasses():
Expand Down
21 changes: 0 additions & 21 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
[tox]
env_list = py{39,310,311,312}
minversion = 4.12.1

[testenv]
description = run the tests with pytest
package = wheel
wheel_build_env = .pkg
deps =
pytest>=6
commands =
pytest {tty:--color=yes} {posargs}

# Provide a mapping between tox envs and github actions python envs
[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[flake8]
max-line-length = 120
exclude = .*
Expand Down
Loading