Skip to content

Reload config after setting up the venv #302

Description

@ezio-melotti

The simoc-sam script is used for various things, some of which need to work even when the deps are not installed. Other commands requires a venv with the deps and simoc_sam installed, in particular to access the default config file. In order to run even when the venv is not available, the script sets the config module and the jinja2 Template to None if they can't be imported.

The @needs_venv decorator is used to ensure that the venv is present when executing commands that require it, and it automatically sets up the venv before executing the command if it's not already set up.

After setting up the venv, the command could still fail because currently the config module and the Template are not reloaded after setting up the venv. The create_venv function should be updated to reload them to ensure that the command always works.

Metadata

Metadata

Assignees

Labels

simoc-samIssues relates to the simoc-sam.py script

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions