Skip to content

Create friendly way for users to test their code #1

Description

@PinkShnack

When users add a script, it should work within a virtual environment with the requirements given by the user.

This means each folder will have a .py python script and a requirements.txt file.

We have two options:

  1. We can have the user create a test file and test via pytest.
    • Pros: The testing with pytest is easy.
    • Cons: The first part may be difficult for the user.
  2. We can create a bash script that runs the new script with source run_script [path] from the terminal. This has been implemented in the tests folder and in github actions.
    • Pros: This means the user does not need to provide anything other than the .py and .txt files. For me this is very important.
    • Cons: It is more complicated to implement and because it is a bash script, it doesn't stop if there is a Python error. Could capture and parse the stdout and display a "Fail" message at the end of the script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions