From 79845f76978e37d467db3a2338916d3ee9fb08f3 Mon Sep 17 00:00:00 2001 From: David Perl Date: Mon, 12 May 2025 10:55:41 +0200 Subject: [PATCH] feat: move template into subdirectory BREAKING CHANGE: reorganises repo, arbitrary choice for v1 release --- copier.yml | 9 +++------ {.git_hooks => template/.git_hooks}/post-commit | 0 {.git_hooks => template/.git_hooks}/pre-commit | 0 .gitignore => template/.gitignore | 0 .gitlab-ci.yml.jinja => template/.gitlab-ci.yml.jinja | 0 LICENSE.jinja => template/LICENSE.jinja | 0 {bin => template/bin}/.gitignore | 0 pyproject.toml.jinja => template/pyproject.toml.jinja | 0 .../README.md | 0 .../{{_copier_conf.answers_file}}.jinja | 0 .../{{project_name}}}/__init__.py | 0 .../{{project_name}}}/bec_ipython_client/__init__.py | 0 .../bec_ipython_client/high_level_interface/__init__.py | 0 .../bec_ipython_client/startup/post_startup.py | 0 .../bec_ipython_client/startup/pre_startup.py | 0 .../{{project_name}}}/bec_widgets/__init__.py | 0 .../bec_widgets/auto_updates/__init__.py | 0 .../{{project_name}}}/bec_widgets/widgets/__init__.py | 0 .../__init__.py | 0 ...e_ui %}{{ widget_plugin.module }}.ui{% endif %}.jinja | 0 .../{{ widget_plugin.module }}.py.jinja | 0 .../{{project_name}}}/deployments/__init__.py | 0 .../deployments/device_server/__init__.py | 0 .../deployments/device_server/startup.py | 0 .../{{project_name}}}/device_configs/__init__.py | 0 .../{{project_name}}}/devices/__init__.py | 0 .../{{project_name}}}/file_writer/__init__.py | 0 .../{{project_name}}}/scans/__init__.py | 0 .../{{project_name}}/scans/metadata_schema}/__init__.py | 0 .../scans/metadata_schema/metadata_schema_registry.py | 0 .../scans/metadata_schema/metadata_schema_template.py | 0 template/{{project_name}}/services/__init__.py | 0 32 files changed, 3 insertions(+), 6 deletions(-) rename {.git_hooks => template/.git_hooks}/post-commit (100%) rename {.git_hooks => template/.git_hooks}/pre-commit (100%) rename .gitignore => template/.gitignore (100%) rename .gitlab-ci.yml.jinja => template/.gitlab-ci.yml.jinja (100%) rename LICENSE.jinja => template/LICENSE.jinja (100%) rename {bin => template/bin}/.gitignore (100%) rename pyproject.toml.jinja => template/pyproject.toml.jinja (100%) rename {tests => template/tests}/{% yield test_dir from test_directories %}{{ test_dir }}{% endyield %}/README.md (100%) rename {{_copier_conf.answers_file}}.jinja => template/{{_copier_conf.answers_file}}.jinja (100%) rename {{{project_name}} => template/{{project_name}}}/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/bec_ipython_client/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/bec_ipython_client/high_level_interface/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/bec_ipython_client/startup/post_startup.py (100%) rename {{{project_name}} => template/{{project_name}}}/bec_ipython_client/startup/pre_startup.py (100%) rename {{{project_name}} => template/{{project_name}}}/bec_widgets/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/bec_widgets/auto_updates/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/bec_widgets/widgets/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/{% if widget_plugin.use_ui %}{{ widget_plugin.module }}.ui{% endif %}.jinja (100%) rename {{{project_name}} => template/{{project_name}}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/{{ widget_plugin.module }}.py.jinja (100%) rename {{{project_name}} => template/{{project_name}}}/deployments/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/deployments/device_server/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/deployments/device_server/startup.py (100%) rename {{{project_name}} => template/{{project_name}}}/device_configs/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/devices/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/file_writer/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/scans/__init__.py (100%) rename {{{project_name}}/services => template/{{project_name}}/scans/metadata_schema}/__init__.py (100%) rename {{{project_name}} => template/{{project_name}}}/scans/metadata_schema/metadata_schema_registry.py (100%) rename {{{project_name}} => template/{{project_name}}}/scans/metadata_schema/metadata_schema_template.py (100%) create mode 100644 template/{{project_name}}/services/__init__.py diff --git a/copier.yml b/copier.yml index b0206fd..3c565c7 100644 --- a/copier.yml +++ b/copier.yml @@ -1,10 +1,7 @@ -_exclude: - - ".gitea/" - - ".git/" - - "CHANGELOG.md" - - "copier.yml" -# imports +# repo config +_subdirectory: template +# imports _jinja_extensions: - bec_lib.utils.copier_jinja_filters.CopierFilters diff --git a/.git_hooks/post-commit b/template/.git_hooks/post-commit similarity index 100% rename from .git_hooks/post-commit rename to template/.git_hooks/post-commit diff --git a/.git_hooks/pre-commit b/template/.git_hooks/pre-commit similarity index 100% rename from .git_hooks/pre-commit rename to template/.git_hooks/pre-commit diff --git a/.gitignore b/template/.gitignore similarity index 100% rename from .gitignore rename to template/.gitignore diff --git a/.gitlab-ci.yml.jinja b/template/.gitlab-ci.yml.jinja similarity index 100% rename from .gitlab-ci.yml.jinja rename to template/.gitlab-ci.yml.jinja diff --git a/LICENSE.jinja b/template/LICENSE.jinja similarity index 100% rename from LICENSE.jinja rename to template/LICENSE.jinja diff --git a/bin/.gitignore b/template/bin/.gitignore similarity index 100% rename from bin/.gitignore rename to template/bin/.gitignore diff --git a/pyproject.toml.jinja b/template/pyproject.toml.jinja similarity index 100% rename from pyproject.toml.jinja rename to template/pyproject.toml.jinja diff --git a/tests/{% yield test_dir from test_directories %}{{ test_dir }}{% endyield %}/README.md b/template/tests/{% yield test_dir from test_directories %}{{ test_dir }}{% endyield %}/README.md similarity index 100% rename from tests/{% yield test_dir from test_directories %}{{ test_dir }}{% endyield %}/README.md rename to template/tests/{% yield test_dir from test_directories %}{{ test_dir }}{% endyield %}/README.md diff --git a/{{_copier_conf.answers_file}}.jinja b/template/{{_copier_conf.answers_file}}.jinja similarity index 100% rename from {{_copier_conf.answers_file}}.jinja rename to template/{{_copier_conf.answers_file}}.jinja diff --git a/{{project_name}}/__init__.py b/template/{{project_name}}/__init__.py similarity index 100% rename from {{project_name}}/__init__.py rename to template/{{project_name}}/__init__.py diff --git a/{{project_name}}/bec_ipython_client/__init__.py b/template/{{project_name}}/bec_ipython_client/__init__.py similarity index 100% rename from {{project_name}}/bec_ipython_client/__init__.py rename to template/{{project_name}}/bec_ipython_client/__init__.py diff --git a/{{project_name}}/bec_ipython_client/high_level_interface/__init__.py b/template/{{project_name}}/bec_ipython_client/high_level_interface/__init__.py similarity index 100% rename from {{project_name}}/bec_ipython_client/high_level_interface/__init__.py rename to template/{{project_name}}/bec_ipython_client/high_level_interface/__init__.py diff --git a/{{project_name}}/bec_ipython_client/startup/post_startup.py b/template/{{project_name}}/bec_ipython_client/startup/post_startup.py similarity index 100% rename from {{project_name}}/bec_ipython_client/startup/post_startup.py rename to template/{{project_name}}/bec_ipython_client/startup/post_startup.py diff --git a/{{project_name}}/bec_ipython_client/startup/pre_startup.py b/template/{{project_name}}/bec_ipython_client/startup/pre_startup.py similarity index 100% rename from {{project_name}}/bec_ipython_client/startup/pre_startup.py rename to template/{{project_name}}/bec_ipython_client/startup/pre_startup.py diff --git a/{{project_name}}/bec_widgets/__init__.py b/template/{{project_name}}/bec_widgets/__init__.py similarity index 100% rename from {{project_name}}/bec_widgets/__init__.py rename to template/{{project_name}}/bec_widgets/__init__.py diff --git a/{{project_name}}/bec_widgets/auto_updates/__init__.py b/template/{{project_name}}/bec_widgets/auto_updates/__init__.py similarity index 100% rename from {{project_name}}/bec_widgets/auto_updates/__init__.py rename to template/{{project_name}}/bec_widgets/auto_updates/__init__.py diff --git a/{{project_name}}/bec_widgets/widgets/__init__.py b/template/{{project_name}}/bec_widgets/widgets/__init__.py similarity index 100% rename from {{project_name}}/bec_widgets/widgets/__init__.py rename to template/{{project_name}}/bec_widgets/widgets/__init__.py diff --git a/{{project_name}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/__init__.py b/template/{{project_name}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/__init__.py similarity index 100% rename from {{project_name}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/__init__.py rename to template/{{project_name}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/__init__.py diff --git a/{{project_name}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/{% if widget_plugin.use_ui %}{{ widget_plugin.module }}.ui{% endif %}.jinja b/template/{{project_name}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/{% if widget_plugin.use_ui %}{{ widget_plugin.module }}.ui{% endif %}.jinja similarity index 100% rename from {{project_name}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/{% if widget_plugin.use_ui %}{{ widget_plugin.module }}.ui{% endif %}.jinja rename to template/{{project_name}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/{% if widget_plugin.use_ui %}{{ widget_plugin.module }}.ui{% endif %}.jinja diff --git a/{{project_name}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/{{ widget_plugin.module }}.py.jinja b/template/{{project_name}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/{{ widget_plugin.module }}.py.jinja similarity index 100% rename from {{project_name}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/{{ widget_plugin.module }}.py.jinja rename to template/{{project_name}}/bec_widgets/widgets/{% yield widget_plugin from widget_plugins %}{{ widget_plugin.module }}{% endyield %}/{{ widget_plugin.module }}.py.jinja diff --git a/{{project_name}}/deployments/__init__.py b/template/{{project_name}}/deployments/__init__.py similarity index 100% rename from {{project_name}}/deployments/__init__.py rename to template/{{project_name}}/deployments/__init__.py diff --git a/{{project_name}}/deployments/device_server/__init__.py b/template/{{project_name}}/deployments/device_server/__init__.py similarity index 100% rename from {{project_name}}/deployments/device_server/__init__.py rename to template/{{project_name}}/deployments/device_server/__init__.py diff --git a/{{project_name}}/deployments/device_server/startup.py b/template/{{project_name}}/deployments/device_server/startup.py similarity index 100% rename from {{project_name}}/deployments/device_server/startup.py rename to template/{{project_name}}/deployments/device_server/startup.py diff --git a/{{project_name}}/device_configs/__init__.py b/template/{{project_name}}/device_configs/__init__.py similarity index 100% rename from {{project_name}}/device_configs/__init__.py rename to template/{{project_name}}/device_configs/__init__.py diff --git a/{{project_name}}/devices/__init__.py b/template/{{project_name}}/devices/__init__.py similarity index 100% rename from {{project_name}}/devices/__init__.py rename to template/{{project_name}}/devices/__init__.py diff --git a/{{project_name}}/file_writer/__init__.py b/template/{{project_name}}/file_writer/__init__.py similarity index 100% rename from {{project_name}}/file_writer/__init__.py rename to template/{{project_name}}/file_writer/__init__.py diff --git a/{{project_name}}/scans/__init__.py b/template/{{project_name}}/scans/__init__.py similarity index 100% rename from {{project_name}}/scans/__init__.py rename to template/{{project_name}}/scans/__init__.py diff --git a/{{project_name}}/services/__init__.py b/template/{{project_name}}/scans/metadata_schema/__init__.py similarity index 100% rename from {{project_name}}/services/__init__.py rename to template/{{project_name}}/scans/metadata_schema/__init__.py diff --git a/{{project_name}}/scans/metadata_schema/metadata_schema_registry.py b/template/{{project_name}}/scans/metadata_schema/metadata_schema_registry.py similarity index 100% rename from {{project_name}}/scans/metadata_schema/metadata_schema_registry.py rename to template/{{project_name}}/scans/metadata_schema/metadata_schema_registry.py diff --git a/{{project_name}}/scans/metadata_schema/metadata_schema_template.py b/template/{{project_name}}/scans/metadata_schema/metadata_schema_template.py similarity index 100% rename from {{project_name}}/scans/metadata_schema/metadata_schema_template.py rename to template/{{project_name}}/scans/metadata_schema/metadata_schema_template.py diff --git a/template/{{project_name}}/services/__init__.py b/template/{{project_name}}/services/__init__.py new file mode 100644 index 0000000..e69de29