Skip to content

[Bug] App Python script should not be optional #113

@mirkoCrobu

Description

@mirkoCrobu

Describe the problem

Currently, an app’s Python script is handled as an optional module by design.
This assumption is incorrect: every App must always include a Python script.

Change Description

  • Identify all the logic that treats the Python script as optional and make it mandatory.
  • Ensure proper handling of cases where the script cannot be created, including related error paths.
  • Update existing tests to reflect this change, or add missing ones if needed.
  • Update the createApp endpoint by removing the skipPython flag, and revise the OpenAPI spec and e2e tests accordingly.

To reproduce

 {
    "name": "app_without_python_script",
    "description": "my app!",
    "icon": "🍃",
    "example": false,
    "default": false
  }
  • By cloning this app using the API (or the equivalent CLI command),
    POST /v1/apps/{appID}/clone
    it’s also possible to create a new app without a Python script.

Expected behavior

  • POST http://localhost:8080/v1/apps(and the relative CLI command) shouldn't accept the skip-python filter and should return an error if unable to create the Python script
    - POST /v1/apps/{appID}/clone(and the relative CLI command) should return an error if unable to create the Python script

Arduino App CLI version

all versions

Additional context

  • POST http://localhost:8080/v1/apps (or the equivalent CLI command)
    should not accept the skip-python parameter and must return an error
    if it cannot create a Python script.

  • POST /v1/apps/{appID}/clone (or the equivalent CLI command)
    should return an error if it cannot create a Python script.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions