From 2092086f8ba1b592af9f491da622ad6200e84963 Mon Sep 17 00:00:00 2001 From: Hiran Wijesinghe Date: Mon, 29 Sep 2025 17:32:41 +0000 Subject: [PATCH 1/4] initial extras --- .devcontainer/devcontainer.json | 2 +- pyproject.toml | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fce9dd594..5474ee45d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -42,5 +42,5 @@ // Mount the parent as /workspaces so we can pip install peers as editable "workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind", // After the container is created, install the python project in editable form - "postCreateCommand": "pip install $([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e '.[dev]' && pre-commit install" + "postCreateCommand": "pip install $([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e '.[dev,all]' && pre-commit install" } diff --git a/pyproject.toml b/pyproject.toml index 9b8da0098..ac5bcc4ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,11 +17,6 @@ dependencies = [ "fastapi[standard]", "numpy", "pydantic", - "pvi~=0.11.0", - "pytango", - "softioc>=4.5.0", - "strawberry-graphql", - "p4p", "IPython", ] dynamic = ["version"] @@ -30,6 +25,17 @@ readme = "README.md" requires-python = ">=3.11" [project.optional-dependencies] +all = [ + "fastapi[standard]", + "numpy", + "p4p", + "pvi~=0.11.0", + "pydantic", + "pytango", + "softioc>=4.5.0", + "strawberry-graphql", + "uvicorn[standard]>=0.12.0", +] dev = [ "copier", "myst-parser", @@ -50,15 +56,17 @@ dev = [ "sphinx-design", "tox-direct", "types-mock", - "setuptools>=70.1", # https://github.com/DiamondLightSource/aioca/issues/71 + "setuptools>=70.1", # https://github.com/DiamondLightSource/aioca/issues/71 "aioca", "p4p", "httpx", "tickit~=0.4.3", ] -demo = [ - "tickit~=0.4.3", -] +demo = ["tickit~=0.4.3"] +epics = ["p4p", "pvi~=0.11.0", "pydantic", "softioc>=4.5.0"] +tango = ["pytango"] +graphql = ["strawberry-graphql", "uvicorn[standard]>=0.12.0"] +rest = ["fastapi[standard]", "numpy", "pydantic", "uvicorn[standard]>=0.12.0"] [project.scripts] fastcs-demo = "fastcs.demo.__main__:main" From e1f1edf049253e91345b97d21c444e60a46c19af Mon Sep 17 00:00:00 2001 From: Hiran Wijesinghe Date: Tue, 30 Sep 2025 09:13:59 +0000 Subject: [PATCH 2/4] add `fastcs[all]` to `dev` extra --- .devcontainer/devcontainer.json | 2 +- pyproject.toml | 23 +++++++---------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5474ee45d..fce9dd594 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -42,5 +42,5 @@ // Mount the parent as /workspaces so we can pip install peers as editable "workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind", // After the container is created, install the python project in editable form - "postCreateCommand": "pip install $([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e '.[dev,all]' && pre-commit install" + "postCreateCommand": "pip install $([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e '.[dev]' && pre-commit install" } diff --git a/pyproject.toml b/pyproject.toml index ac5bcc4ed..2d91de3e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,19 +25,15 @@ readme = "README.md" requires-python = ">=3.11" [project.optional-dependencies] -all = [ - "fastapi[standard]", - "numpy", - "p4p", - "pvi~=0.11.0", - "pydantic", - "pytango", - "softioc>=4.5.0", - "strawberry-graphql", - "uvicorn[standard]>=0.12.0", -] +demo = ["tickit~=0.4.3"] +epics = ["p4p", "pvi~=0.11.0", "pydantic", "softioc>=4.5.0"] +tango = ["pytango"] +graphql = ["strawberry-graphql", "uvicorn[standard]>=0.12.0"] +rest = ["fastapi[standard]", "numpy", "pydantic", "uvicorn[standard]>=0.12.0"] +all = ["fastcs[epics]", "fastcs[tango]", "fastcs[graphql]", "fastcs[rest]"] dev = [ "copier", + "fastcs[all]", "myst-parser", "pipdeptree", "pre-commit", @@ -62,11 +58,6 @@ dev = [ "httpx", "tickit~=0.4.3", ] -demo = ["tickit~=0.4.3"] -epics = ["p4p", "pvi~=0.11.0", "pydantic", "softioc>=4.5.0"] -tango = ["pytango"] -graphql = ["strawberry-graphql", "uvicorn[standard]>=0.12.0"] -rest = ["fastapi[standard]", "numpy", "pydantic", "uvicorn[standard]>=0.12.0"] [project.scripts] fastcs-demo = "fastcs.demo.__main__:main" From 19e97a99182ac14a267f7fdffb874476c910787f Mon Sep 17 00:00:00 2001 From: Hiran Wijesinghe Date: Tue, 30 Sep 2025 10:35:19 +0000 Subject: [PATCH 3/4] add CR suggestions --- pyproject.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2d91de3e4..81e897bbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,14 +26,17 @@ requires-python = ">=3.11" [project.optional-dependencies] demo = ["tickit~=0.4.3"] -epics = ["p4p", "pvi~=0.11.0", "pydantic", "softioc>=4.5.0"] +epicsca = ["pvi~=0.11.0", "softioc>=4.5.0"] +epicspva = ["p4p", "pvi~=0.11.0"] +epics = ["fastcs[epicsca]", "fastcs[epicspca]"] tango = ["pytango"] graphql = ["strawberry-graphql", "uvicorn[standard]>=0.12.0"] -rest = ["fastapi[standard]", "numpy", "pydantic", "uvicorn[standard]>=0.12.0"] +rest = ["fastapi[standard]", "numpy", "uvicorn[standard]>=0.12.0"] all = ["fastcs[epics]", "fastcs[tango]", "fastcs[graphql]", "fastcs[rest]"] dev = [ "copier", "fastcs[all]", + "fastcs[demo]", "myst-parser", "pipdeptree", "pre-commit", @@ -56,7 +59,6 @@ dev = [ "aioca", "p4p", "httpx", - "tickit~=0.4.3", ] [project.scripts] From 5e30ece014181bc1760f57bdaf4a9db74d38456b Mon Sep 17 00:00:00 2001 From: Hiran Wijesinghe Date: Tue, 30 Sep 2025 12:28:53 +0000 Subject: [PATCH 4/4] add `ruamel.yaml` to dependencies --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 81e897bbf..53cbec9f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,7 @@ dependencies = [ "fastapi[standard]", "numpy", "pydantic", + "ruamel.yaml", "IPython", ] dynamic = ["version"]