cryptoadvance / cryptoadvance/specter-desktop

Extension-generation needs adjustements

Open
#1,957 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
847
Forks
259
Avg merge
6d 18h
Merged PRs (30d)
2

Description

The extension-generation process is currently assuming you need encrypted userdata. That should get adjusted like this:
- Add an option to the click annotations like `--encrypted-userdata` here: https://github.com/cryptoadvance/specter-desktop/blob/master/src/cryptoadvance/specter/cli/cli_ext.py#L39 (including adding it as a param to the method signature)
- Add a section explaining what it means and that the extension should decide between encrypted/unencrypted here: https://github.com/cryptoadvance/specter-desktop/blob/master/src/cryptoadvance/specter/cli/cli_ext.py#L111-L112
- Add the variable to the `ExtGen` instantiation and there ...
- The service and the controller would needs some adjustments. They are rendered here: https://github.com/cryptoadvance/specter-desktop/blob/master/src/cryptoadvance/specter/cli/cli_ext.py#L150-L160 however, the code for the templates is living here:
- https://github.com/cryptoadvance/specterext-dummy/blob/master/src/dummyorg/specterext/dummy/service.py#L12
- https://github.com/cryptoadvance/specterext-dummy/blob/master/src/dummyorg/specterext/dummy/controller.py#L53

Mind the different templating syntax. Those are "metatemplates" as they are creating templates which themself are later templates.

You can test it via using `--tmpl-fs-source` and checkout the dummy-project somewhere. Also i've created a small section about https://docs.specter.solutions/desktop/extensions/intro/#virtualenv-management

Contributor guide

Open the contributing guide

Research direction

Start in src/cryptoadvance/specter/cli/cli_ext.py, reading the click options, ExtGen instantiation, and service/controller rendering around the referenced lines. Then inspect the metatemplates in specterext-dummy's service.py and controller.py, paying attention to their different templating syntax. Use --tmpl-fs-source with the dummy project; done means the generated extension handles the documented encrypted or unencrypted userdata choice.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.