From 2e89106dc9aef83552738898b08fb43811017e52 Mon Sep 17 00:00:00 2001 From: Fernando Date: Fri, 6 Jun 2025 16:54:54 -0300 Subject: [PATCH 1/6] add pyproject.toml in all IOC packages. --- as-ap-currinfo/pyproject.toml | 83 +++++++++++++++ as-ap-injctrl/pyproject.toml | 79 ++++++++++++++ as-ap-machshift/pyproject.toml | 79 ++++++++++++++ as-ap-opmode/pyproject.toml | 79 ++++++++++++++ as-ap-opticscorr/pyproject.toml | 82 +++++++++++++++ as-ap-posang/pyproject.toml | 80 ++++++++++++++ as-ap-sofb/pyproject.toml | 82 +++++++++++++++ as-ps-diag/pyproject.toml | 79 ++++++++++++++ as-ps/pyproject.toml | 79 ++++++++++++++ as-pu-conv/pyproject.toml | 79 ++++++++++++++ as-pu-diag/pyproject.toml | 79 ++++++++++++++ as-rf-diag/pyproject.toml | 79 ++++++++++++++ as-ti-control/pyproject.toml | 79 ++++++++++++++ bl-ap-imgproc/pyproject.toml | 80 ++++++++++++++ create_pyprojecttoml_in_iocs.sh | 156 ++++++++++++++++++++++++++++ li-ap-diag/pyproject.toml | 79 ++++++++++++++ li-ap-energy/pyproject.toml | 79 ++++++++++++++ li-ps-conv/pyproject.toml | 79 ++++++++++++++ si-ap-fofb/pyproject.toml | 79 ++++++++++++++ si-ap-idff/pyproject.toml | 79 ++++++++++++++ si-ap-orbintlk/pyproject.toml | 79 ++++++++++++++ si-ap-stabinfo/pyproject.toml | 79 ++++++++++++++ si-di-fpmosc/pyproject.toml | 79 ++++++++++++++ si-id-conv/pyproject.toml | 79 ++++++++++++++ si-id-epu50/pyproject.toml | 82 +++++++++++++++ si-ps-conv-fastcorrs/pyproject.toml | 79 ++++++++++++++ 26 files changed, 2146 insertions(+) create mode 100644 as-ap-currinfo/pyproject.toml create mode 100644 as-ap-injctrl/pyproject.toml create mode 100644 as-ap-machshift/pyproject.toml create mode 100644 as-ap-opmode/pyproject.toml create mode 100644 as-ap-opticscorr/pyproject.toml create mode 100644 as-ap-posang/pyproject.toml create mode 100644 as-ap-sofb/pyproject.toml create mode 100644 as-ps-diag/pyproject.toml create mode 100644 as-ps/pyproject.toml create mode 100644 as-pu-conv/pyproject.toml create mode 100644 as-pu-diag/pyproject.toml create mode 100644 as-rf-diag/pyproject.toml create mode 100644 as-ti-control/pyproject.toml create mode 100644 bl-ap-imgproc/pyproject.toml create mode 100755 create_pyprojecttoml_in_iocs.sh create mode 100644 li-ap-diag/pyproject.toml create mode 100644 li-ap-energy/pyproject.toml create mode 100644 li-ps-conv/pyproject.toml create mode 100644 si-ap-fofb/pyproject.toml create mode 100644 si-ap-idff/pyproject.toml create mode 100644 si-ap-orbintlk/pyproject.toml create mode 100644 si-ap-stabinfo/pyproject.toml create mode 100644 si-di-fpmosc/pyproject.toml create mode 100644 si-id-conv/pyproject.toml create mode 100644 si-id-epu50/pyproject.toml create mode 100644 si-ps-conv-fastcorrs/pyproject.toml diff --git a/as-ap-currinfo/pyproject.toml b/as-ap-currinfo/pyproject.toml new file mode 100644 index 00000000..b344be32 --- /dev/null +++ b/as-ap-currinfo/pyproject.toml @@ -0,0 +1,83 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_ap_currinfo" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "Soft IOC for Electron Beam Current Informations." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-li-ap-currinfo.py", + "scripts/sirius-ioc-ts-ap-currinfo.py", + "scripts/sirius-ioc-bo-ap-currinfo.py", + "scripts/sirius-ioc-si-ap-currinfo.py", + "scripts/sirius-ioc-si-ap-currinfo-lifetime.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_ap_currinfo = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/as-ap-injctrl/pyproject.toml b/as-ap-injctrl/pyproject.toml new file mode 100644 index 00000000..b4443d74 --- /dev/null +++ b/as-ap-injctrl/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_ap_injctrl" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for High Level Control of Injection Procedure." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-as-ap-injctrl.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_ap_injctrl = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/as-ap-machshift/pyproject.toml b/as-ap-machshift/pyproject.toml new file mode 100644 index 00000000..c4d726b9 --- /dev/null +++ b/as-ap-machshift/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_ap_machshift" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for High Level Control of Machine Shifts." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-as-ap-machshift.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_ap_machshift = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/as-ap-opmode/pyproject.toml b/as-ap-opmode/pyproject.toml new file mode 100644 index 00000000..80a8c901 --- /dev/null +++ b/as-ap-opmode/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_ap_opmode" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for Accelerator Operation Mode." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-as-ap-opmode.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_ap_opmode = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/as-ap-opticscorr/pyproject.toml b/as-ap-opticscorr/pyproject.toml new file mode 100644 index 00000000..8e42403c --- /dev/null +++ b/as-ap-opticscorr/pyproject.toml @@ -0,0 +1,82 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_ap_opticscorr" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOCs for High Level Control Tune and Chromaticity Correction." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-bo-ap-tunecorr.py", + "scripts/sirius-ioc-bo-ap-chromcorr.py", + "scripts/sirius-ioc-si-ap-tunecorr.py", + "scripts/sirius-ioc-si-ap-chromcorr.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_ap_opticscorr = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/as-ap-posang/pyproject.toml b/as-ap-posang/pyproject.toml new file mode 100644 index 00000000..35ccd984 --- /dev/null +++ b/as-ap-posang/pyproject.toml @@ -0,0 +1,80 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_ap_posang" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for High Level Control of Injection Position and Angle." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-tb-ap-posang.py", + "scripts/sirius-ioc-ts-ap-posang.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_ap_posang = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/as-ap-sofb/pyproject.toml b/as-ap-sofb/pyproject.toml new file mode 100644 index 00000000..e438d5f3 --- /dev/null +++ b/as-ap-sofb/pyproject.toml @@ -0,0 +1,82 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_ap_sofb" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "Slow Orbit Feedback System for Sirius" +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-si-ap-sofb.py", + "scripts/sirius-ioc-bo-ap-sofb.py", + "scripts/sirius-ioc-tb-ap-sofb.py", + "scripts/sirius-ioc-ts-ap-sofb.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_ap_sofb = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/as-ps-diag/pyproject.toml b/as-ps-diag/pyproject.toml new file mode 100644 index 00000000..ada8266d --- /dev/null +++ b/as-ps-diag/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_ps_diag" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "Power Supply Current SP/Mon diagnostics" +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-as-ps-diag.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_ps_diag = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/as-ps/pyproject.toml b/as-ps/pyproject.toml new file mode 100644 index 00000000..e1fafe59 --- /dev/null +++ b/as-ps/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_ps" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for Power Supplies." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-as-ps.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_ps = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/as-pu-conv/pyproject.toml b/as-pu-conv/pyproject.toml new file mode 100644 index 00000000..06e46438 --- /dev/null +++ b/as-pu-conv/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_pu_conv" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC Conv for Pulse Power Supplies." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-as-pu-conv.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_pu_conv = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/as-pu-diag/pyproject.toml b/as-pu-diag/pyproject.toml new file mode 100644 index 00000000..0485198c --- /dev/null +++ b/as-pu-diag/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_pu_diag" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "Pulsed Power Supply diagnostics" +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-as-pu-diag.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_pu_diag = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/as-rf-diag/pyproject.toml b/as-rf-diag/pyproject.toml new file mode 100644 index 00000000..82159e8e --- /dev/null +++ b/as-rf-diag/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_rf_diag" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "RF diagnostics" +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-as-rf-diag.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_rf_diag = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/as-ti-control/pyproject.toml b/as-ti-control/pyproject.toml new file mode 100644 index 00000000..2cab2f13 --- /dev/null +++ b/as-ti-control/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "as_ti_control" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for High Level control of Sirius Timing System." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-as-ti-control.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +as_ti_control = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/bl-ap-imgproc/pyproject.toml b/bl-ap-imgproc/pyproject.toml new file mode 100644 index 00000000..b6e2eb4b --- /dev/null +++ b/bl-ap-imgproc/pyproject.toml @@ -0,0 +1,80 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "bl_ap_imgproc" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for DVF Beamline image processing." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-bl-ap-imgproc-caxdvf1.py", + "scripts/sirius-ioc-bl-ap-imgproc-caxdvf2.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +bl_ap_imgproc = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/create_pyprojecttoml_in_iocs.sh b/create_pyprojecttoml_in_iocs.sh new file mode 100755 index 00000000..d013f8f3 --- /dev/null +++ b/create_pyprojecttoml_in_iocs.sh @@ -0,0 +1,156 @@ +#!/usr/bin/env bash + +# This script was made by Microsoft Copilot to create a pyproject.toml inside +# each IOC folder, gathering informations from the setup.py file + +set -euo pipefail + +# ─────── prefixes configurations ───────── +prefixes=(as- si- li- bl-) + +# ─────── template of pyproject.toml ─────── +TEMPLATE=$(cat << 'EOF' +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "%PKG_NAME%" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "%DESCRIPTION%" +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ +%SCRIPTS% +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +%PKG_NAME% = [%PACKAGE_DATA%] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 +EOF +) + +# ─────── loop over IOC packages ──────────────── +for prefix in "${prefixes[@]}"; do + for dir in ${prefix}*; do + [ -d "$dir" ] || continue + echo "=> processing $dir" + + # 1) pkg_name = folder name with - → _ + pkg_name=$(basename "$dir" | tr '-' '_') + + # 2) run setup.py under a fake setuptools.setup() + PYCODE=$(cat << EOF +import setuptools, sys +data = {} +# override of setuptools.setup +def fake_setup(**kwargs): + data.update(kwargs) +setuptools.setup = fake_setup +# execute setup.py +exec(open("$dir/setup.py").read(), {}) +# formatted output +import json +out = { + "description": data.get("description",""), + "scripts": data.get("scripts", []), + "package_data": data.get("package_data", {}).get("$pkg_name", []) +} +print(json.dumps(out)) +EOF + ) + + info_json=$(python3 -c "$PYCODE") + + # 3) extract description, scripts, package_data + description=$(echo "$info_json" | + python3 -c 'import sys, json; print(json.load(sys.stdin)["description"])' + ) + # create array TOML items + scripts=$(echo "$info_json" | + python3 -c 'import sys, json; +arr = json.load(sys.stdin)["scripts"]; +print("\n".join(f" \"{s}\"," for s in arr))' + ) + package_data=$(echo "$info_json" | + python3 -c 'import sys, json; +arr = json.load(sys.stdin)["package_data"]; +print("\n".join(f" \"{s}\"," for s in arr))' + ) + + # 4) fill the template + out="$TEMPLATE" + out="${out//%PKG_NAME%/$pkg_name}" + out="${out//%DESCRIPTION%/$description}" + out="${out//%SCRIPTS%/$scripts}" + out="${out//%PACKAGE_DATA%/$package_data}" + + # save pyproject.toml inside the folder + echo "$out" > "$dir/pyproject.toml" + echo " -> $dir/pyproject.toml created" + done +done + +echo "✔️ All pyproject.toml were updated." diff --git a/li-ap-diag/pyproject.toml b/li-ap-diag/pyproject.toml new file mode 100644 index 00000000..6c91d2dc --- /dev/null +++ b/li-ap-diag/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "li_ap_diag" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "Linac diagnostics" +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-li-ap-diag.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +li_ap_diag = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/li-ap-energy/pyproject.toml b/li-ap-energy/pyproject.toml new file mode 100644 index 00000000..a9b0508a --- /dev/null +++ b/li-ap-energy/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "li_ap_energy" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for Linac Energy measurement for Sirius." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-li-ap-energy.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +li_ap_energy = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/li-ps-conv/pyproject.toml b/li-ps-conv/pyproject.toml new file mode 100644 index 00000000..a2e9ce77 --- /dev/null +++ b/li-ps-conv/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "li_ps_conv" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC Conv for Linac Power Supplies." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-li-ps-conv.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +li_ps_conv = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/si-ap-fofb/pyproject.toml b/si-ap-fofb/pyproject.toml new file mode 100644 index 00000000..0bcc1d66 --- /dev/null +++ b/si-ap-fofb/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "si_ap_fofb" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for High Level FOFB Control." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-si-ap-fofb.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +si_ap_fofb = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/si-ap-idff/pyproject.toml b/si-ap-idff/pyproject.toml new file mode 100644 index 00000000..8c182479 --- /dev/null +++ b/si-ap-idff/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "si_ap_idff" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for ID feedforward." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-si-ap-idff.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +si_ap_idff = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/si-ap-orbintlk/pyproject.toml b/si-ap-orbintlk/pyproject.toml new file mode 100644 index 00000000..05bbe492 --- /dev/null +++ b/si-ap-orbintlk/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "si_ap_orbintlk" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for Global Orbit Interlock Control." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-si-ap-orbintlk.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +si_ap_orbintlk = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/si-ap-stabinfo/pyproject.toml b/si-ap-stabinfo/pyproject.toml new file mode 100644 index 00000000..78e2d18a --- /dev/null +++ b/si-ap-stabinfo/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "si_ap_stabinfo" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for beam stability indicators." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-si-ap-stabinfo.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +si_ap_stabinfo = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/si-di-fpmosc/pyproject.toml b/si-di-fpmosc/pyproject.toml new file mode 100644 index 00000000..52ddea2b --- /dev/null +++ b/si-di-fpmosc/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "si_di_fpmosc" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "Soft IOC for Electron Beam Filling Pattern Informations." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-si-di-fpmosc.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +si_di_fpmosc = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/si-id-conv/pyproject.toml b/si-id-conv/pyproject.toml new file mode 100644 index 00000000..fbdb80f7 --- /dev/null +++ b/si-id-conv/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "si_id_conv" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC Conv for Insertion Devices." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-si-id-conv.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +si_id_conv = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/si-id-epu50/pyproject.toml b/si-id-epu50/pyproject.toml new file mode 100644 index 00000000..7dcaeee0 --- /dev/null +++ b/si-id-epu50/pyproject.toml @@ -0,0 +1,82 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "si_id_epu50" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "IOC for EPU50 Insertion Device." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-si-id-epu50.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +si_id_epu50 = [ "VERSION", + "config/config.toml", + "config/drive_messages.yaml", + "config/autosave_epu.req",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/si-ps-conv-fastcorrs/pyproject.toml b/si-ps-conv-fastcorrs/pyproject.toml new file mode 100644 index 00000000..c597d09b --- /dev/null +++ b/si-ps-conv-fastcorrs/pyproject.toml @@ -0,0 +1,79 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "si_ps_conv_fastcorrs" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, + {name = "Ximenes Resende", email = "xresende@gmail.com"}, + {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, + {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} +] +description = "Conv IOC for Fast Corrector Power Supplies." +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-si-ps-conv-fastcorrs.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +si_ps_conv_fastcorrs = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 From 868d81829b1ac16150b9b9883e3403403a938b4d Mon Sep 17 00:00:00 2001 From: Fernando Date: Fri, 6 Jun 2025 17:02:10 -0300 Subject: [PATCH 2/6] MNT: Remove deprecated warning from Makefile's. --- as-ap-currinfo/Makefile | 2 -- as-ap-injctrl/Makefile | 2 -- as-ap-machshift/Makefile | 2 -- as-ap-opmode/Makefile | 2 -- as-ap-opticscorr/Makefile | 2 -- as-ap-posang/Makefile | 2 -- as-ap-sofb/Makefile | 2 -- as-ps-diag/Makefile | 2 -- as-ps/Makefile | 2 -- as-pu-conv/Makefile | 2 -- as-pu-diag/Makefile | 2 -- as-rf-diag/Makefile | 2 -- as-ti-control/Makefile | 2 -- bl-ap-imgproc/Makefile | 2 -- li-ap-diag/Makefile | 2 -- li-ap-energy/Makefile | 2 -- li-ps-conv/Makefile | 2 -- si-ap-fofb/Makefile | 2 -- si-ap-idff/Makefile | 2 -- si-ap-orbintlk/Makefile | 2 -- si-ap-stabinfo/Makefile | 2 -- si-di-fpmosc/Makefile | 2 -- si-id-conv/Makefile | 2 -- si-id-epu50/Makefile | 2 -- si-ps-conv-fastcorrs/Makefile | 2 -- 25 files changed, 50 deletions(-) diff --git a/as-ap-currinfo/Makefile b/as-ap-currinfo/Makefile index 521ec1cf..994be514 100644 --- a/as-ap-currinfo/Makefile +++ b/as-ap-currinfo/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/as-ap-injctrl/Makefile b/as-ap-injctrl/Makefile index 521ec1cf..994be514 100644 --- a/as-ap-injctrl/Makefile +++ b/as-ap-injctrl/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/as-ap-machshift/Makefile b/as-ap-machshift/Makefile index 521ec1cf..994be514 100644 --- a/as-ap-machshift/Makefile +++ b/as-ap-machshift/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/as-ap-opmode/Makefile b/as-ap-opmode/Makefile index 521ec1cf..994be514 100644 --- a/as-ap-opmode/Makefile +++ b/as-ap-opmode/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/as-ap-opticscorr/Makefile b/as-ap-opticscorr/Makefile index 521ec1cf..994be514 100644 --- a/as-ap-opticscorr/Makefile +++ b/as-ap-opticscorr/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/as-ap-posang/Makefile b/as-ap-posang/Makefile index 521ec1cf..994be514 100644 --- a/as-ap-posang/Makefile +++ b/as-ap-posang/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/as-ap-sofb/Makefile b/as-ap-sofb/Makefile index 521ec1cf..994be514 100644 --- a/as-ap-sofb/Makefile +++ b/as-ap-sofb/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/as-ps-diag/Makefile b/as-ps-diag/Makefile index 521ec1cf..994be514 100644 --- a/as-ps-diag/Makefile +++ b/as-ps-diag/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/as-ps/Makefile b/as-ps/Makefile index 521ec1cf..994be514 100644 --- a/as-ps/Makefile +++ b/as-ps/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/as-pu-conv/Makefile b/as-pu-conv/Makefile index 521ec1cf..994be514 100644 --- a/as-pu-conv/Makefile +++ b/as-pu-conv/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/as-pu-diag/Makefile b/as-pu-diag/Makefile index 521ec1cf..994be514 100644 --- a/as-pu-diag/Makefile +++ b/as-pu-diag/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/as-rf-diag/Makefile b/as-rf-diag/Makefile index 521ec1cf..994be514 100644 --- a/as-rf-diag/Makefile +++ b/as-rf-diag/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/as-ti-control/Makefile b/as-ti-control/Makefile index 521ec1cf..994be514 100644 --- a/as-ti-control/Makefile +++ b/as-ti-control/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/bl-ap-imgproc/Makefile b/bl-ap-imgproc/Makefile index 521ec1cf..994be514 100644 --- a/bl-ap-imgproc/Makefile +++ b/bl-ap-imgproc/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/li-ap-diag/Makefile b/li-ap-diag/Makefile index 521ec1cf..994be514 100644 --- a/li-ap-diag/Makefile +++ b/li-ap-diag/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/li-ap-energy/Makefile b/li-ap-energy/Makefile index 521ec1cf..994be514 100644 --- a/li-ap-energy/Makefile +++ b/li-ap-energy/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/li-ps-conv/Makefile b/li-ps-conv/Makefile index 521ec1cf..994be514 100644 --- a/li-ps-conv/Makefile +++ b/li-ps-conv/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/si-ap-fofb/Makefile b/si-ap-fofb/Makefile index 521ec1cf..994be514 100644 --- a/si-ap-fofb/Makefile +++ b/si-ap-fofb/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/si-ap-idff/Makefile b/si-ap-idff/Makefile index 521ec1cf..994be514 100644 --- a/si-ap-idff/Makefile +++ b/si-ap-idff/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/si-ap-orbintlk/Makefile b/si-ap-orbintlk/Makefile index 521ec1cf..994be514 100644 --- a/si-ap-orbintlk/Makefile +++ b/si-ap-orbintlk/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/si-ap-stabinfo/Makefile b/si-ap-stabinfo/Makefile index 521ec1cf..994be514 100644 --- a/si-ap-stabinfo/Makefile +++ b/si-ap-stabinfo/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/si-di-fpmosc/Makefile b/si-di-fpmosc/Makefile index 521ec1cf..994be514 100644 --- a/si-di-fpmosc/Makefile +++ b/si-di-fpmosc/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/si-id-conv/Makefile b/si-id-conv/Makefile index 521ec1cf..994be514 100644 --- a/si-id-conv/Makefile +++ b/si-id-conv/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/si-id-epu50/Makefile b/si-id-epu50/Makefile index 521ec1cf..994be514 100644 --- a/si-id-epu50/Makefile +++ b/si-id-epu50/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) diff --git a/si-ps-conv-fastcorrs/Makefile b/si-ps-conv-fastcorrs/Makefile index 521ec1cf..994be514 100644 --- a/si-ps-conv-fastcorrs/Makefile +++ b/si-ps-conv-fastcorrs/Makefile @@ -16,7 +16,5 @@ uninstall: develop-install: develop-uninstall $(PIP) install --no-deps -e ./ -# known issue: It will fail to uninstall scripts -# if they were installed in develop mode develop-uninstall: $(PIP) uninstall -y $(PACKAGE) From 3b7ef9f8249a75131425e29984acd3c5da4136d5 Mon Sep 17 00:00:00 2001 From: Fernando Date: Fri, 6 Jun 2025 18:11:11 -0300 Subject: [PATCH 3/6] WIP: update template generator. --- .../project-name/LICENSE | 1 + .../project-name/MANIFEST.in | 1 + .../project-name/Makefile | 20 +++++ .../project-name/README.md | 12 +++ .../pcaspy-template => project-name}/VERSION | 0 .../py_project_name/access_rules.as | 4 + .../py_project_name}/main.py | 0 .../py_project_name}/pvs.py | 0 .../py_project_name/py_project_name.py} | 0 .../project-name/pyproject.toml | 77 +++++++++++++++++++ .../project-name/requirements.txt | 1 + .../scripts/sirius-ioc-project-name.py | 8 ++ .../project-name/setup.py | 33 ++++++++ .../sirius-instantiate-pcaspy-template.py | 50 ++++++++++-- .../template_files/setup.py | 25 ------ 15 files changed, 200 insertions(+), 32 deletions(-) create mode 120000 pcaspy-template-generator/project-name/LICENSE create mode 100644 pcaspy-template-generator/project-name/MANIFEST.in create mode 100644 pcaspy-template-generator/project-name/Makefile create mode 100644 pcaspy-template-generator/project-name/README.md rename pcaspy-template-generator/{template_files/pcaspy-template => project-name}/VERSION (100%) create mode 100644 pcaspy-template-generator/project-name/py_project_name/access_rules.as rename pcaspy-template-generator/{template_files/pcaspy-template => project-name/py_project_name}/main.py (100%) rename pcaspy-template-generator/{template_files/pcaspy-template => project-name/py_project_name}/pvs.py (100%) rename pcaspy-template-generator/{template_files/pcaspy-template/run.py => project-name/py_project_name/py_project_name.py} (100%) create mode 100644 pcaspy-template-generator/project-name/pyproject.toml create mode 120000 pcaspy-template-generator/project-name/requirements.txt create mode 100644 pcaspy-template-generator/project-name/scripts/sirius-ioc-project-name.py create mode 100755 pcaspy-template-generator/project-name/setup.py delete mode 100755 pcaspy-template-generator/template_files/setup.py diff --git a/pcaspy-template-generator/project-name/LICENSE b/pcaspy-template-generator/project-name/LICENSE new file mode 120000 index 00000000..30cff740 --- /dev/null +++ b/pcaspy-template-generator/project-name/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/pcaspy-template-generator/project-name/MANIFEST.in b/pcaspy-template-generator/project-name/MANIFEST.in new file mode 100644 index 00000000..b2eca7e2 --- /dev/null +++ b/pcaspy-template-generator/project-name/MANIFEST.in @@ -0,0 +1 @@ +include py_project_name/access_rules.as diff --git a/pcaspy-template-generator/project-name/Makefile b/pcaspy-template-generator/project-name/Makefile new file mode 100644 index 00000000..994be514 --- /dev/null +++ b/pcaspy-template-generator/project-name/Makefile @@ -0,0 +1,20 @@ +PACKAGE:=$(shell basename $(shell pwd)) +PREFIX ?= +PIP ?= pip +ifeq ($(CONDA_PREFIX),) + PREFIX=sudo -H + PIP=pip-sirius +endif + +install: uninstall + $(PREFIX) $(PIP) install --no-deps ./ + $(PREFIX) git clean -fdX + +uninstall: + $(PREFIX) $(PIP) uninstall -y $(PACKAGE) + +develop-install: develop-uninstall + $(PIP) install --no-deps -e ./ + +develop-uninstall: + $(PIP) uninstall -y $(PACKAGE) diff --git a/pcaspy-template-generator/project-name/README.md b/pcaspy-template-generator/project-name/README.md new file mode 100644 index 00000000..09f925fd --- /dev/null +++ b/pcaspy-template-generator/project-name/README.md @@ -0,0 +1,12 @@ +# IOC +This IOC checks Linac Egun and LLRF status. + +## Installation +`make install` +`make develop-install` + +## Dependencies +dev-packages + +## Running +`sirius-ioc-project-name.py` diff --git a/pcaspy-template-generator/template_files/pcaspy-template/VERSION b/pcaspy-template-generator/project-name/VERSION similarity index 100% rename from pcaspy-template-generator/template_files/pcaspy-template/VERSION rename to pcaspy-template-generator/project-name/VERSION diff --git a/pcaspy-template-generator/project-name/py_project_name/access_rules.as b/pcaspy-template-generator/project-name/py_project_name/access_rules.as new file mode 100644 index 00000000..8beb4c75 --- /dev/null +++ b/pcaspy-template-generator/project-name/py_project_name/access_rules.as @@ -0,0 +1,4 @@ +ASG(rbpv) { + RULE(1, READ) + RULE(0, WRITE) +} diff --git a/pcaspy-template-generator/template_files/pcaspy-template/main.py b/pcaspy-template-generator/project-name/py_project_name/main.py similarity index 100% rename from pcaspy-template-generator/template_files/pcaspy-template/main.py rename to pcaspy-template-generator/project-name/py_project_name/main.py diff --git a/pcaspy-template-generator/template_files/pcaspy-template/pvs.py b/pcaspy-template-generator/project-name/py_project_name/pvs.py similarity index 100% rename from pcaspy-template-generator/template_files/pcaspy-template/pvs.py rename to pcaspy-template-generator/project-name/py_project_name/pvs.py diff --git a/pcaspy-template-generator/template_files/pcaspy-template/run.py b/pcaspy-template-generator/project-name/py_project_name/py_project_name.py similarity index 100% rename from pcaspy-template-generator/template_files/pcaspy-template/run.py rename to pcaspy-template-generator/project-name/py_project_name/py_project_name.py diff --git a/pcaspy-template-generator/project-name/pyproject.toml b/pcaspy-template-generator/project-name/pyproject.toml new file mode 100644 index 00000000..cefc87a3 --- /dev/null +++ b/pcaspy-template-generator/project-name/pyproject.toml @@ -0,0 +1,77 @@ +[build-system] +requires = ["setuptools>=44"] +build-backend = "setuptools.build_meta" + +[project] +name = "py_project_name" +authors = [{ name = "lnls-sirius" } ] +maintainers = [ + {name = "maintainder1", email = "maintainder1@email.br"}, + {name = "maintainder2", email = "maintainder2@email.com"}, +] +description = "PROJECT-DESCRIPTION" +readme = "README.md" +dynamic = ["version", "dependencies"] +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Science/Research", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", +] +keywords = ["SIRIUS", "python", "EPICS"] + +license = "GPL-3.0" +license-files= [ "LICENSE", ] + +[project.urls] +Homepage = "https://github.com/lnls-sirius/machine-applications" +Download = "https://github.com/lnls-sirius/machine-applications" +Repository = "https://github.com/lnls-sirius/machine-applications.git" +Issues = "https://github.com/lnls-sirius/machine-applications/issues" + +# --- Setuptools specific configurations --- +[tool.setuptools] +include-package-data = true +# NOTE: This is not the standard way of defining scripts. +# Once we abandon phython3.6 and the setup.py file, we should +# consider using the table [projec.scripts], defining valid entrypoints. +script-files = [ + "scripts/sirius-ioc-project-name.py", +] + +[tool.setuptools.dynamic] +version = { file = "VERSION" } +dependencies = { file = "requirements.txt" } + +[tool.setuptools.package-data] +py_project_name = [ "VERSION",] + +# --- linter e formatter --- +[tool.ruff] +select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] +ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", + "D407","D408","D409","D413","E203","E226"] +ignore-init-module-imports = true +preview = true +line-length = 79 +fix = true + +[tool.ruff.extend-per-file-ignores] +"__init__.py" = ["F401","F821"] + +[tool.ruff.format] +skip-magic-trailing-comma = true + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.isort] +split_on_trailing_comma = false +combine_as_imports = true +combine_star = true +multi_line_output = "HANGING_INDENT" +order_by_type = false + +[tool.black] +line-length = 79 diff --git a/pcaspy-template-generator/project-name/requirements.txt b/pcaspy-template-generator/project-name/requirements.txt new file mode 120000 index 00000000..fd1efae7 --- /dev/null +++ b/pcaspy-template-generator/project-name/requirements.txt @@ -0,0 +1 @@ +../../requirements.txt \ No newline at end of file diff --git a/pcaspy-template-generator/project-name/scripts/sirius-ioc-project-name.py b/pcaspy-template-generator/project-name/scripts/sirius-ioc-project-name.py new file mode 100644 index 00000000..9a21b2a9 --- /dev/null +++ b/pcaspy-template-generator/project-name/scripts/sirius-ioc-project-name.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python-sirius +"""Script for the IOC.""" + +from py_project_name import py_project_name + + +if __name__ == '__main__': + py_project_name.run(False) diff --git a/pcaspy-template-generator/project-name/setup.py b/pcaspy-template-generator/project-name/setup.py new file mode 100755 index 00000000..a679e26d --- /dev/null +++ b/pcaspy-template-generator/project-name/setup.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 + +from setuptools import setup + +with open('VERSION', 'r') as _f: + __version__ = _f.read().strip() + +with open('README.md', 'r') as _f: + _long_description = _f.read().strip() + +with open('requirements.txt', 'r') as _f: + _requirements = _f.read().strip().split('\n') + +setup( + name='py_project_name', + version=__version__, + author='lnls-sirius', + description='PROJECT-DESCRIPTION', + long_description=_long_description, + url='https://github.com/lnls-sirius/machine-applications', + download_url='https://github.com/lnls-sirius/machine-applications', + license="GPL-3.0", + classifiers=[ + 'Intended Audience :: Science/Research', + 'Programming Language :: Python', + 'Topic :: Scientific/Engineering' + ], + packages=['py_project_name'], + install_requires=_requirements, + package_data={'py_project_name': ['VERSION']}, + scripts=[], + zip_safe=False +) diff --git a/pcaspy-template-generator/sirius-instantiate-pcaspy-template.py b/pcaspy-template-generator/sirius-instantiate-pcaspy-template.py index 1c711607..4a8ad384 100755 --- a/pcaspy-template-generator/sirius-instantiate-pcaspy-template.py +++ b/pcaspy-template-generator/sirius-instantiate-pcaspy-template.py @@ -7,13 +7,49 @@ if len(sys.argv) != 2: raise Exception('invalid number of arguments!') - sys.exit(1); + sys.exit(1) - project = sys.argv[1] - if os.path.exists(project): + project_path = sys.argv[1] + project = project_path.split(os.pathsep)[-1] + pyproject = project.replace('-', '_') + if os.path.exists(project_path): raise Exception('directory already exists!') - os.system('cp -rf --preserve=mode template_files ' + project) - os.rename(os.path.join(project, 'pcaspy-template'), os.path.join(project, project)) - os.rename(os.path.join(project, project, 'run.py'), os.path.join(project, project, project+'.py')) - os.system('cd ' + project + '; ln -s ' + os.path.join(project,'VERSION')) + os.system('cp -rf --preserve=mode project-name ' + project_path) + os.rename( + os.path.join(project_path, 'py_project_name'), + os.path.join(project_path, pyproject) + ) + + os.chdir(project_path) + for fil in os.listdir(): + if not os.path.isfile(fil): + continue + os.system(f"sed -i 's/py_project_name/{pyproject}/g' {fil}") + os.system(f"sed -i 's/project-name/{project}/g' {fil}") + + # TODO: Continue here. + + path = os.path.join(project_path, pyproject, 'scripts') + os.rename( + os.path.join(path, 'py_project_name.py'), + os.path.join(path, pyproject+'.py') + ) + path = os.path.join(project_path, 'scripts') + os.rename( + os.path.join(path, 'sirius-ioc-project-name.py'), + os.path.join(path, f'sirius-ioc-{project}.py') + ) + + os.system( + 'cd ' + project + + f"; sed -i 's/py_project_name/{pyproject}/g' pyproject.toml" + ) + os.system( + 'cd ' + project + + f"; sed -i 's/py_project_name/{pyproject}/g' setup.py" + ) + os.system( + 'cd ' + project + + f"; sed -i 's/py_project_name/{pyproject}/g' MANIFEST.in" + ) diff --git a/pcaspy-template-generator/template_files/setup.py b/pcaspy-template-generator/template_files/setup.py deleted file mode 100755 index 259b536a..00000000 --- a/pcaspy-template-generator/template_files/setup.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python3 - -from setuptools import setup - -with open('VERSION','r') as _f: - __version__ = _f.read().strip() - -setup( - name='PROJECT-NAME', - version=__version__, - author='lnls-sirius', - description='PROJECT-DESCRIPTION', - url='PROJECT-URL', - download_url='PROJECT-DOWNLOAD-URL', - license='MIT License', - classifiers=[ - 'Intended Audience :: Science/Research', - 'Programming Language :: Python', - 'Topic :: Scientific/Engineering' - ], - packages=['PROJECT-NAME'], - package_data={'PROJECT-NAME': ['VERSION']}, - scripts=[], - zip_safe=False -) From fb0bfa2b25fb5eaac3a3021c69048bc77845fac3 Mon Sep 17 00:00:00 2001 From: Fernando Date: Mon, 9 Jun 2025 11:47:43 -0300 Subject: [PATCH 4/6] MNT: Finish upgrade of pcaspy template generator. --- .../project-name/README.md | 2 +- .../project-name/VERSION | 2 +- .../project-name/pyproject.toml | 2 +- .../sirius-instantiate-pcaspy-template.py | 55 ----------------- .../sirius-instantiate-pcaspy-template.sh | 60 +++++++++++++++++++ 5 files changed, 63 insertions(+), 58 deletions(-) mode change 100644 => 120000 pcaspy-template-generator/project-name/VERSION delete mode 100755 pcaspy-template-generator/sirius-instantiate-pcaspy-template.py create mode 100755 pcaspy-template-generator/sirius-instantiate-pcaspy-template.sh diff --git a/pcaspy-template-generator/project-name/README.md b/pcaspy-template-generator/project-name/README.md index 09f925fd..9a30223c 100644 --- a/pcaspy-template-generator/project-name/README.md +++ b/pcaspy-template-generator/project-name/README.md @@ -1,5 +1,5 @@ # IOC -This IOC checks Linac Egun and LLRF status. +This IOC does some stuff. ## Installation `make install` diff --git a/pcaspy-template-generator/project-name/VERSION b/pcaspy-template-generator/project-name/VERSION deleted file mode 100644 index 8acdd82b..00000000 --- a/pcaspy-template-generator/project-name/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.0.1 diff --git a/pcaspy-template-generator/project-name/VERSION b/pcaspy-template-generator/project-name/VERSION new file mode 120000 index 00000000..558194c5 --- /dev/null +++ b/pcaspy-template-generator/project-name/VERSION @@ -0,0 +1 @@ +../../VERSION \ No newline at end of file diff --git a/pcaspy-template-generator/project-name/pyproject.toml b/pcaspy-template-generator/project-name/pyproject.toml index cefc87a3..9bed3ade 100644 --- a/pcaspy-template-generator/project-name/pyproject.toml +++ b/pcaspy-template-generator/project-name/pyproject.toml @@ -34,7 +34,7 @@ Issues = "https://github.com/lnls-sirius/machine-applications/issues" include-package-data = true # NOTE: This is not the standard way of defining scripts. # Once we abandon phython3.6 and the setup.py file, we should -# consider using the table [projec.scripts], defining valid entrypoints. +# consider using the table [project.scripts], defining valid entrypoints. script-files = [ "scripts/sirius-ioc-project-name.py", ] diff --git a/pcaspy-template-generator/sirius-instantiate-pcaspy-template.py b/pcaspy-template-generator/sirius-instantiate-pcaspy-template.py deleted file mode 100755 index 4a8ad384..00000000 --- a/pcaspy-template-generator/sirius-instantiate-pcaspy-template.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python3 - -import os -import sys - -if __name__ == '__main__': - - if len(sys.argv) != 2: - raise Exception('invalid number of arguments!') - sys.exit(1) - - project_path = sys.argv[1] - project = project_path.split(os.pathsep)[-1] - pyproject = project.replace('-', '_') - if os.path.exists(project_path): - raise Exception('directory already exists!') - - os.system('cp -rf --preserve=mode project-name ' + project_path) - os.rename( - os.path.join(project_path, 'py_project_name'), - os.path.join(project_path, pyproject) - ) - - os.chdir(project_path) - for fil in os.listdir(): - if not os.path.isfile(fil): - continue - os.system(f"sed -i 's/py_project_name/{pyproject}/g' {fil}") - os.system(f"sed -i 's/project-name/{project}/g' {fil}") - - # TODO: Continue here. - - path = os.path.join(project_path, pyproject, 'scripts') - os.rename( - os.path.join(path, 'py_project_name.py'), - os.path.join(path, pyproject+'.py') - ) - path = os.path.join(project_path, 'scripts') - os.rename( - os.path.join(path, 'sirius-ioc-project-name.py'), - os.path.join(path, f'sirius-ioc-{project}.py') - ) - - os.system( - 'cd ' + project + - f"; sed -i 's/py_project_name/{pyproject}/g' pyproject.toml" - ) - os.system( - 'cd ' + project + - f"; sed -i 's/py_project_name/{pyproject}/g' setup.py" - ) - os.system( - 'cd ' + project + - f"; sed -i 's/py_project_name/{pyproject}/g' MANIFEST.in" - ) diff --git a/pcaspy-template-generator/sirius-instantiate-pcaspy-template.sh b/pcaspy-template-generator/sirius-instantiate-pcaspy-template.sh new file mode 100755 index 00000000..c75588a7 --- /dev/null +++ b/pcaspy-template-generator/sirius-instantiate-pcaspy-template.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# This code was done by free version ChatGPT o4.mini in 2025/06/09. + +set -e # Faz o script parar em caso de erro + +# check number of arguments. +if [ "$#" -ne 1 ]; then + echo "invalid number of arguments!" >&2 + exit 1 +fi + +# argument must be the relative path from this folder to the ioc folder +# preferably the IOC name must be
--, +# just like the other existing IOCS. +project_path="$1" +project="$(basename "$project_path")" + +# the python project name will be:
__: +pyproject="${project//-/_}" + +if [ -d "$project_path" ] && [ "$(ls -A "$project_path")" ]; then + echo "directory already exists and is not empty!" >&2 + exit 1 +fi + +src_abs_path="$(realpath project-name)" +dest_abs_path="$(realpath "$project_path")" + +mkdir -p "$project_path" + +# Copy all files, including links (this will break the links): +cp -a "$src_abs_path"/. "$dest_abs_path"/ + +# Fix relative symbolic links so that they work in the new structure: +find "$dest_abs_path" -type l | while read -r link; do + target="$(readlink "$link")" + if [[ "$target" == /* ]]; then + # If enter here, it means the link has absolute path. nothing to do. + continue + fi + link_dir="$(dirname "$link")" + abs_target="$(realpath -m "$src_abs_path/$target")" + new_rel_target="$(realpath --relative-to="$link_dir" "$abs_target")" + ln -sf "$new_rel_target" "$link" +done + +cd "$project_path" + +# start changing file names and content of files to the appropriate name. +mv "py_project_name" "$pyproject" + +find . -type f ! -xtype l -exec sed -i "s/py_project_name/$pyproject/g" {} + +find . -type f ! -xtype l -exec sed -i "s/project-name/$project/g" {} + + +cd "$pyproject" +mv "py_project_name.py" "${pyproject}.py" + +cd "../scripts" +mv "sirius-ioc-project-name.py" "sirius-ioc-${project}.py" From bf13630ea09d54c286fe54f264a56995508d254d Mon Sep 17 00:00:00 2001 From: Fernando Date: Mon, 9 Jun 2025 13:15:59 -0300 Subject: [PATCH 5/6] MNT: Remove script create_pyprojecttoml_in_iocs.sh. --- create_pyprojecttoml_in_iocs.sh | 156 -------------------------------- 1 file changed, 156 deletions(-) delete mode 100755 create_pyprojecttoml_in_iocs.sh diff --git a/create_pyprojecttoml_in_iocs.sh b/create_pyprojecttoml_in_iocs.sh deleted file mode 100755 index d013f8f3..00000000 --- a/create_pyprojecttoml_in_iocs.sh +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/env bash - -# This script was made by Microsoft Copilot to create a pyproject.toml inside -# each IOC folder, gathering informations from the setup.py file - -set -euo pipefail - -# ─────── prefixes configurations ───────── -prefixes=(as- si- li- bl-) - -# ─────── template of pyproject.toml ─────── -TEMPLATE=$(cat << 'EOF' -[build-system] -requires = ["setuptools>=44"] -build-backend = "setuptools.build_meta" - -[project] -name = "%PKG_NAME%" -authors = [{ name = "lnls-sirius" } ] -maintainers = [ - {name = "Ana Oliveira", email = "ana.clara@lnls.br"}, - {name = "Ximenes Resende", email = "xresende@gmail.com"}, - {name = "Fernando H. de Sá", email = "fernandohds564@gmail.com"}, - {name = "Murilo Barbosa Alves", email = "alvesb.murilo@gmail.com"} -] -description = "%DESCRIPTION%" -readme = "README.md" -dynamic = ["version", "dependencies"] -requires-python = ">=3.6" -classifiers = [ - "Intended Audience :: Science/Research", - "Programming Language :: Python", - "Topic :: Scientific/Engineering", -] -keywords = ["SIRIUS", "python", "EPICS"] - -license = "GPL-3.0" -license-files= [ "LICENSE", ] - -[project.urls] -Homepage = "https://github.com/lnls-sirius/machine-applications" -Download = "https://github.com/lnls-sirius/machine-applications" -Repository = "https://github.com/lnls-sirius/machine-applications.git" -Issues = "https://github.com/lnls-sirius/machine-applications/issues" - -# --- Setuptools specific configurations --- -[tool.setuptools] -include-package-data = true -# NOTE: This is not the standard way of defining scripts. -# Once we abandon phython3.6 and the setup.py file, we should -# consider using the table [projec.scripts], defining valid entrypoints. -script-files = [ -%SCRIPTS% -] - -[tool.setuptools.dynamic] -version = { file = "VERSION" } -dependencies = { file = "requirements.txt" } - -[tool.setuptools.package-data] -%PKG_NAME% = [%PACKAGE_DATA%] - -# --- linter e formatter --- -[tool.ruff] -select = ["W","E","A","B","C90","D","I002","N","F","G","ARG","S","NPY"] -ignore = ["D203","D204","D213","D215","D400","D401","D404","D406", - "D407","D408","D409","D413","E203","E226"] -ignore-init-module-imports = true -preview = true -line-length = 79 -fix = true - -[tool.ruff.extend-per-file-ignores] -"__init__.py" = ["F401","F821"] - -[tool.ruff.format] -skip-magic-trailing-comma = true - -[tool.ruff.lint.isort] -split-on-trailing-comma = false -combine-as-imports = true - -[tool.isort] -split_on_trailing_comma = false -combine_as_imports = true -combine_star = true -multi_line_output = "HANGING_INDENT" -order_by_type = false - -[tool.black] -line-length = 79 -EOF -) - -# ─────── loop over IOC packages ──────────────── -for prefix in "${prefixes[@]}"; do - for dir in ${prefix}*; do - [ -d "$dir" ] || continue - echo "=> processing $dir" - - # 1) pkg_name = folder name with - → _ - pkg_name=$(basename "$dir" | tr '-' '_') - - # 2) run setup.py under a fake setuptools.setup() - PYCODE=$(cat << EOF -import setuptools, sys -data = {} -# override of setuptools.setup -def fake_setup(**kwargs): - data.update(kwargs) -setuptools.setup = fake_setup -# execute setup.py -exec(open("$dir/setup.py").read(), {}) -# formatted output -import json -out = { - "description": data.get("description",""), - "scripts": data.get("scripts", []), - "package_data": data.get("package_data", {}).get("$pkg_name", []) -} -print(json.dumps(out)) -EOF - ) - - info_json=$(python3 -c "$PYCODE") - - # 3) extract description, scripts, package_data - description=$(echo "$info_json" | - python3 -c 'import sys, json; print(json.load(sys.stdin)["description"])' - ) - # create array TOML items - scripts=$(echo "$info_json" | - python3 -c 'import sys, json; -arr = json.load(sys.stdin)["scripts"]; -print("\n".join(f" \"{s}\"," for s in arr))' - ) - package_data=$(echo "$info_json" | - python3 -c 'import sys, json; -arr = json.load(sys.stdin)["package_data"]; -print("\n".join(f" \"{s}\"," for s in arr))' - ) - - # 4) fill the template - out="$TEMPLATE" - out="${out//%PKG_NAME%/$pkg_name}" - out="${out//%DESCRIPTION%/$description}" - out="${out//%SCRIPTS%/$scripts}" - out="${out//%PACKAGE_DATA%/$package_data}" - - # save pyproject.toml inside the folder - echo "$out" > "$dir/pyproject.toml" - echo " -> $dir/pyproject.toml created" - done -done - -echo "✔️ All pyproject.toml were updated." From c0b6ec30d257c388d5337fca5c07c7a1c84ec653 Mon Sep 17 00:00:00 2001 From: Ana Clara Oliveira Date: Wed, 3 Dec 2025 19:57:53 -0300 Subject: [PATCH 6/6] Update version to 3.52.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 84ba969c..7ac0b0a6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.51.0 +3.52.0