Skip to content

error creating plugin repo with some values #8

@d-perl

Description

@d-perl

maybe doing something wrong but I named project and repo differently (see the whole console) and it do not work:

❯ copier copy https://github.com/bec-project/plugin_copier_template.git plugin_repo_test --trust
🎤 What is your project name?
   plugin_test_repo_review
🎤 would you like to automatically stage and commit the changes?
   Yes
🎤 widget_plugins_input (yaml)
    (Finish with 'Alt+Enter' or 'Esc then Enter')
> []

Copying from template version 1.1.2
    create  .git_hooks
    create  .git_hooks/post-commit
    create  .git_hooks/pre-commit
    create  bin
    create  bin/.gitignore
    create  tests
    create  tests/tests_bec_ipython_client
    create  tests/tests_bec_widgets
    create  tests/tests_dap_services
    create  tests/tests_devices
    create  tests/tests_file_writer
    create  tests/tests_scans
    create  tests/tests_bec_ipython_client/README.md
    create  tests/tests_bec_widgets/README.md
    create  tests/tests_dap_services/README.md
    create  tests/tests_devices/README.md
    create  tests/tests_file_writer/README.md
    create  tests/tests_scans/README.md
    create  LICENSE
    create  .copier-answers.yml
    create  .gitignore
    create  plugin_test_repo_review
    create  plugin_test_repo_review/scans
    create  plugin_test_repo_review/scans/metadata_schema
    create  plugin_test_repo_review/scans/metadata_schema/__init__.py
    create  plugin_test_repo_review/scans/metadata_schema/metadata_schema_registry.py
    create  plugin_test_repo_review/scans/metadata_schema/metadata_schema_template.py
    create  plugin_test_repo_review/scans/__init__.py
    create  plugin_test_repo_review/bec_ipython_client
    create  plugin_test_repo_review/bec_ipython_client/high_level_interface
    create  plugin_test_repo_review/bec_ipython_client/high_level_interface/__init__.py
    create  plugin_test_repo_review/bec_ipython_client/__init__.py
    create  plugin_test_repo_review/bec_ipython_client/startup
    create  plugin_test_repo_review/bec_ipython_client/startup/post_startup.py
    create  plugin_test_repo_review/bec_ipython_client/startup/__init__.py
    create  plugin_test_repo_review/bec_ipython_client/startup/pre_startup.py
    create  plugin_test_repo_review/device_configs
    create  plugin_test_repo_review/device_configs/__init__.py
    create  plugin_test_repo_review/__init__.py
    create  plugin_test_repo_review/file_writer
    create  plugin_test_repo_review/file_writer/__init__.py
    create  plugin_test_repo_review/services
    create  plugin_test_repo_review/services/__init__.py
    create  plugin_test_repo_review/deployments
    create  plugin_test_repo_review/deployments/device_server
    create  plugin_test_repo_review/deployments/device_server/startup.py
    create  plugin_test_repo_review/deployments/device_server/__init__.py
    create  plugin_test_repo_review/deployments/__init__.py
    create  plugin_test_repo_review/bec_widgets
    create  plugin_test_repo_review/bec_widgets/__init__.py
    create  plugin_test_repo_review/bec_widgets/auto_updates
    create  plugin_test_repo_review/bec_widgets/auto_updates/__init__.py
    create  plugin_test_repo_review/bec_widgets/widgets
    create  plugin_test_repo_review/bec_widgets/widgets/__init__.py
    create  plugin_test_repo_review/devices
    create  plugin_test_repo_review/devices/__init__.py
    create  .gitlab-ci.yml
    create  pyproject.toml

 > Running task 1 of 3:  git init --initial-branch=main
Initialized empty Git repository in /Users/janwyzula/PSI/plugin_repo/plugin_repo_test/.git/
 > Running task 2 of 3:  echo "No .ui files to process";

No .ui files to process
 > Running task 3 of 3:  echo "making autocommit in $(pwd)";  git add -A; git commit -a -m 'Init repo plugin_test_repo_review at template version v1.1.2'

making autocommit in /Users/janwyzula/PSI/plugin_repo/plugin_repo_test
[main (root-commit) e3c1bdd] Init repo plugin_test_repo_review at template version v1.1.2
 34 files changed, 638 insertions(+)
 create mode 100644 .copier-answers.yml
 create mode 100644 .git_hooks/post-commit
 create mode 100644 .git_hooks/pre-commit
 create mode 100644 .gitignore
 create mode 100644 .gitlab-ci.yml
 create mode 100644 LICENSE
 create mode 100644 bin/.gitignore
 create mode 100644 plugin_test_repo_review/__init__.py
 create mode 100644 plugin_test_repo_review/bec_ipython_client/__init__.py
 create mode 100644 plugin_test_repo_review/bec_ipython_client/high_level_interface/__init__.py
 create mode 100644 plugin_test_repo_review/bec_ipython_client/startup/__init__.py
 create mode 100644 plugin_test_repo_review/bec_ipython_client/startup/post_startup.py
 create mode 100644 plugin_test_repo_review/bec_ipython_client/startup/pre_startup.py
 create mode 100644 plugin_test_repo_review/bec_widgets/__init__.py
 create mode 100644 plugin_test_repo_review/bec_widgets/auto_updates/__init__.py
 create mode 100644 plugin_test_repo_review/bec_widgets/widgets/__init__.py
 create mode 100644 plugin_test_repo_review/deployments/__init__.py
 create mode 100644 plugin_test_repo_review/deployments/device_server/__init__.py
 create mode 100644 plugin_test_repo_review/deployments/device_server/startup.py
 create mode 100644 plugin_test_repo_review/device_configs/__init__.py
 create mode 100644 plugin_test_repo_review/devices/__init__.py
 create mode 100644 plugin_test_repo_review/file_writer/__init__.py
 create mode 100644 plugin_test_repo_review/scans/__init__.py
 create mode 100644 plugin_test_repo_review/scans/metadata_schema/__init__.py
 create mode 100644 plugin_test_repo_review/scans/metadata_schema/metadata_schema_registry.py
 create mode 100644 plugin_test_repo_review/scans/metadata_schema/metadata_schema_template.py
 create mode 100644 plugin_test_repo_review/services/__init__.py
 create mode 100644 pyproject.toml
 create mode 100644 tests/tests_bec_ipython_client/README.md
 create mode 100644 tests/tests_bec_widgets/README.md
 create mode 100644 tests/tests_dap_services/README.md
 create mode 100644 tests/tests_devices/README.md
 create mode 100644 tests/tests_file_writer/README.md
 create mode 100644 tests/tests_scans/README.md

❯ cd plugin_repo_test
❯ pip install -e .
Obtaining file:///Users/janwyzula/PSI/plugin_repo/plugin_repo_test
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: plugin_test_repo_review
  Building editable for plugin_test_repo_review (pyproject.toml) ... done
  Created wheel for plugin_test_repo_review: filename=plugin_test_repo_review-0.0.0-py3-none-any.whl size=2788 sha256=0d1d4421f63138fbd1fbf02b2efe542d84aa84f2d6eed1a1a5fa3786f12d4f02
  Stored in directory: /private/var/folders/_1/bq0x7kr14053rswt04v68bpm0000gn/T/pip-ephem-wheel-cache-gd0syph_/wheels/f4/4b/db/b32f4dffc20a96bc36fc87a9b25dfa28b1415899f1babce413
Successfully built plugin_test_repo_review
Installing collected packages: plugin_test_repo_review
Successfully installed plugin_test_repo_review-0.0.0
❯ bec-plugin-manager create widget test_widget_name
Generate a .ui file for use in bec-designer. [Y/n]: y
This app can watch for changes and recompile them to a python file imported to the widget whenever it is saved.
To open this editor independently, you can use bec-plugin-manager edit-ui [widget_name].
Open the created widget .ui file in bec-designer now? [Y/n]: y
2025-07-29 14:13:38.027 | INFO     | bec_widgets.utils.bec_plugin_manager.create.widget:widget:63 - Adding new widget test_widget_name to the template...
Updating to template version 1.1.2
No .ui files to process
making autocommit in /private/var/folders/_1/bq0x7kr14053rswt04v68bpm0000gn/T/copier._main.old_copy.3i_gy8tk
making autocommit in /Users/janwyzula/PSI/plugin_repo/plugin_repo_test
making autocommit in /private/var/folders/_1/bq0x7kr14053rswt04v68bpm0000gn/T/copier._main.new_copy.zhk1tt2a
 > Running task 1 of 1:  echo "making autocommit in $(pwd)";  git add -A; git commit -a -m 'Update repo with template version v1.1.2'

making autocommit in /Users/janwyzula/PSI/plugin_repo/plugin_repo_test
[main aa96d81] Update repo with template version v1.1.2
 5 files changed, 75 insertions(+), 1 deletion(-)
 create mode 100644 plugin_test_repo_review/bec_widgets/widgets/test_widget_name/__init__.py
 create mode 100644 plugin_test_repo_review/bec_widgets/widgets/test_widget_name/test_widget_name.py
 create mode 100644 plugin_test_repo_review/bec_widgets/widgets/test_widget_name/test_widget_name.ui
 create mode 100644 plugin_test_repo_review/bec_widgets/widgets/test_widget_name/test_widget_name_ui.py
2025-07-29 14:13:45.843 | INFO     | bec_lib.utils.plugin_manager._util:git_stage_files:35 - Adding ['.copier-answers.yml'] in /Users/janwyzula/PSI/plugin_repo/plugin_repo_test to git...
2025-07-29 14:13:45.855 | INFO     | bec_lib.utils.plugin_manager._util:git_stage_files:35 - Adding all files in /Users/janwyzula/PSI/plugin_repo/plugin_repo_test/plugin_repo_test/bec_widgets/widgets/test_widget_name to git...
2025-07-29 14:13:45.857 | ERROR    | bec_widgets.utils.bec_plugin_manager.create.widget:widget:81 - Traceback (most recent call last):
  File "/Users/janwyzula/PSI/bec_widgets/bec_widgets/utils/bec_plugin_manager/create/widget.py", line 79, in widget
    _commit_added_widget(repo, formatted_name)
  File "/Users/janwyzula/PSI/bec_widgets/bec_widgets/utils/bec_plugin_manager/create/widget.py", line 20, in _commit_added_widget
    git_stage_files(repo / repo.name / "bec_widgets" / "widgets" / name, [])
  File "/Users/janwyzula/PSI/bec/bec_lib/bec_lib/utils/plugin_manager/_util.py", line 36, in git_stage_files
    with _goto_dir(directory):
         ^^^^^^^^^^^^^^^^^^^^
  File "/Users/janwyzula/miniforge3/envs/bec_312/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/Users/janwyzula/PSI/bec/bec_lib/bec_lib/utils/plugin_manager/_util.py", line 27, in _goto_dir
    os.chdir(path)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/janwyzula/PSI/plugin_repo/plugin_repo_test/plugin_repo_test/bec_widgets/widgets/test_widget_name'

2025-07-29 14:13:45.857 | ERROR    | bec_widgets.utils.bec_plugin_manager.create.widget:widget:82 - exiting...
❯ pip list | grep plugin
hdf5plugin                               5.1.0
plugin_test_repo_review                  0.0.0       /Users/janwyzula/PSI/plugin_repo/plugin_repo_test

Originally posted by @wyzula-jan in bec-project/bec_widgets#718 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions