Skip to content

Commit

Permalink
osrd_schemas: move to 'poetry:2.0'
Browse files Browse the repository at this point in the history
Signed-off-by: Jean SIMARD <[email protected]>
  • Loading branch information
woshilapin authored and Khoyo committed Feb 13, 2025
1 parent a036351 commit da06215
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 72 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install 'poetry<2.0'
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -394,7 +394,7 @@ jobs:
- name: Install dependencies
run: |
cd python/osrd_schemas
poetry install
poetry install --extras=dev
- name: Ruff
run: |
cd python/osrd_schemas
Expand Down Expand Up @@ -426,7 +426,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install poetry
run: pipx install 'poetry<2.0'
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: "3.11"
Expand Down
55 changes: 11 additions & 44 deletions front/src/reducers/osrdconf/infra_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,9 @@
"BufferStopExtensions": {
"properties": {
"sncf": {
"anyOf": [
"allOf": [
{
"$ref": "#/$defs/BufferStopSncfExtension"
},
{
"type": "null"
}
],
"default": null
Expand Down Expand Up @@ -334,12 +331,9 @@
"DetectorExtensions": {
"properties": {
"sncf": {
"anyOf": [
"allOf": [
{
"$ref": "#/$defs/DetectorSncfExtension"
},
{
"type": "null"
}
],
"default": null
Expand Down Expand Up @@ -818,12 +812,9 @@
"NeutralSectionExtensions": {
"properties": {
"neutral_sncf": {
"anyOf": [
"allOf": [
{
"$ref": "#/$defs/NeutralSectionNeutralSncfExtension"
},
{
"type": "null"
}
],
"default": null
Expand Down Expand Up @@ -926,23 +917,17 @@
"OperationalPointExtensions": {
"properties": {
"identifier": {
"anyOf": [
"allOf": [
{
"$ref": "#/$defs/OperationalPointIdentifierExtension"
},
{
"type": "null"
}
],
"default": null
},
"sncf": {
"anyOf": [
"allOf": [
{
"$ref": "#/$defs/OperationalPointSncfExtension"
},
{
"type": "null"
}
],
"default": null
Expand Down Expand Up @@ -1007,12 +992,9 @@
"OperationalPointPartExtensions": {
"properties": {
"sncf": {
"anyOf": [
"allOf": [
{
"$ref": "#/$defs/OperationalPointPartSncfExtension"
},
{
"type": "null"
}
],
"default": null
Expand Down Expand Up @@ -1303,12 +1285,9 @@
"SignalExtensions": {
"properties": {
"sncf": {
"anyOf": [
"allOf": [
{
"$ref": "#/$defs/SignalSncfExtension"
},
{
"type": "null"
}
],
"default": null
Expand Down Expand Up @@ -1463,12 +1442,9 @@
"SpeedSectionExtensions": {
"properties": {
"psl_sncf": {
"anyOf": [
"allOf": [
{
"$ref": "#/$defs/SpeedSectionPslSncfExtension"
},
{
"type": "null"
}
],
"default": null
Expand Down Expand Up @@ -1564,12 +1540,9 @@
"SwitchExtensions": {
"properties": {
"sncf": {
"anyOf": [
"allOf": [
{
"$ref": "#/$defs/SwitchSncfExtension"
},
{
"type": "null"
}
],
"default": null
Expand Down Expand Up @@ -1755,23 +1728,17 @@
"TrackSectionExtensions": {
"properties": {
"sncf": {
"anyOf": [
"allOf": [
{
"$ref": "#/$defs/TrackSectionSncfExtension"
},
{
"type": "null"
}
],
"default": null
},
"source": {
"anyOf": [
"allOf": [
{
"$ref": "#/$defs/TrackSectionSourceExtension"
},
{
"type": "null"
}
],
"default": null
Expand Down
1 change: 0 additions & 1 deletion python/osrd_schemas/.python-version

This file was deleted.

2 changes: 1 addition & 1 deletion python/osrd_schemas/osrd_schemas/infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ def register_extension(extension):
)

extensions_field.annotation.model_fields[name] = FieldInfo(
annotation=Optional[extension],
annotation=extension,
default=None,
)
return extension
Expand Down
28 changes: 21 additions & 7 deletions python/osrd_schemas/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 5 additions & 16 deletions python/osrd_schemas/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
[project]
name = "osrd_schemas"
version = "0.8.16"

[tool.poetry]
name = "osrd_schemas"
version = "0.8.16"
description = ""
authors = ["OSRD <[email protected]>"]

[tool.poetry.dependencies]
geojson-pydantic = "^1.0.0"
pydantic = "^2.1.1"
python = ">=3.9,<3.12"
authors = [{ name = "OSRD Contributors", email = "[email protected]" }]
requires-python = ">= 3.11"

[tool.poetry.group.dev.dependencies]
ruff = "0.9.5"
pyright = "1.1.393"
dependencies = ["geojson-pydantic ~= 1.0.0", "pydantic ~= 2.6"]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[project.optional-dependencies]
dev = ["pyright ~= 1.1.393", "ruff ~= 0.9.5"]

0 comments on commit da06215

Please sign in to comment.