Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a setup script for the develop-postgres branch #2688

Open
palisadoes opened this issue Nov 17, 2024 · 4 comments
Open

Create a setup script for the develop-postgres branch #2688

palisadoes opened this issue Nov 17, 2024 · 4 comments
Assignees
Labels
feature request no-issue-activity No issue activity question Further information is requested test Testing application wip Work in Progress

Comments

@palisadoes
Copy link
Contributor

Is your feature request related to a problem? Please describe.

  1. We need a setup script to configure the new develop-postgres branch.
  2. The functionality must be equivalent to the setup script in the develop branch

Describe the solution you'd like

PRs related to setup.ts require a high degree of manual verification by our reviewers and errors are frequent.

  1. We frequently add new configuration parameters to our code base.
  2. The changes mean that the setup.ts file is always being modified.
  3. Most PRs that modify this file introduce various types of failure.

Your job is to make the execution of the setup.ts file be:

  1. foolproof
  2. intuitive to use
  3. easier and simpler to use

A tech novice or new contributor should be able to install the API without issue.

For the successful completion of this issue:

  1. Write code to thoroughly test the setup.ts file without manually inputting responses to prompts, including:
    1. all relevant functions, methods and classes where applicable.
    2. all user prompts
  2. Ensure that running the tests is a part of our existing PR and Husky git commit workflows

This may mean making changes to the setup.ts file.

Describe alternatives you've considered

  • N/A

Approach to be followed (optional)

This issue may require the refactoring of this script file to make it:

  1. Easier to test
  2. Easier to maintain

Testing must verify that the:

  1. Default values for input are correct:
    1. When a parameter is already configured
    2. When a parameter is not configured
  2. Functionality when parameters are missing from the configuration is maintained
  3. Sequencing of the prompts is maintained
  4. Configuration parameters that rely on any external APIs (eg. database, mail) must be tested.
    1. The tests don't hang when testing these APIs whether or not the API connectivity is validated
  5. Preexisting comments in the test configuration file are maintained when the final configuration is saved
  6. Final configuration isn't saved until the last question is answered. In other words, hitting CTRL-C at any point before the last question will not affect the original configuration.
  7. Wording of the prompts in all scenarios is unchanged
  8. Test database loads without issue
  9. Previously correctly answered questions are not repeated
  10. Correct values are echoed when:
    1. entered,
    2. updated or
    3. previously found in the configuration
  11. Prompts correctly bypass sections that the user doesn't want to configure.
    1. For example, there are multiple SMTP and Redis configuration parameters.
      1. Optional parameter sections: If the person installing the API doesn't want to update SMTP parameters they should be skipped, otherwise prompted
      2. Mandatory parameter sections: If the person installing the API doesn't want to update configured mandatory Redis parameters, they should be skipped, otherwise prompted
  12. Input of mandatory parameters cannot be avoided if they are not previously configured

Plus any other tests that could avoid failure based on the PR comments for the issues below.

Other items to consider include:

  1. The test file must be located in the existing tests/ directory
  2. The test file has good readability
  3. Not making any changes to files in the .github directory

Additional context

These are issues where setup has been modified and in most cases have introduced more errors:

  1. API: Flawless Installation - Write Tests for setup.ts #1680

Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship

@github-actions github-actions bot added question Further information is requested test Testing application unapproved Unapproved for Pull Request labels Nov 17, 2024
@yuvi-mittal
Copy link

can i get assigned to this issue ?

@varshith257 varshith257 removed the unapproved Unapproved for Pull Request label Nov 18, 2024
@palisadoes
Copy link
Contributor Author

@xoldd

We will need a way for people to test the application by seeing what it can do. The loading of sample data via the setup script helps a lot. It also helps with the new contributors as they can get a better understanding of the features.

We really need this. How can you facilitate this with the coding you are doing?

Copy link

github-actions bot commented Dec 4, 2024

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Dec 4, 2024
@palisadoes
Copy link
Contributor Author

Unassigning. Inactivity.

@palisadoes palisadoes assigned palisadoes and unassigned yuvi-mittal Dec 4, 2024
@palisadoes palisadoes added the wip Work in Progress label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request no-issue-activity No issue activity question Further information is requested test Testing application wip Work in Progress
Projects
Status: Backlog
Development

No branches or pull requests

3 participants