Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Scenario

You are a developer tasked with designing an application using the provided app.py file as the starting point.

The project is a RESTful API that provides CRUD operations for a list of students, using a SQLite database for storage.

Step-by-Step Process

Step 1: Review the app.py File

  1. Open the app.py file located in this directory.
  2. Review the existing API endpoints and their implementations.

Step 2: Set Up the Database

  1. Ensure that SQLite is installed on your system.
  2. Review the init_db function in app.py to understand how the database is initialized.
  3. Run the app.py file to initialize the database.

Step 3: Implement the API Endpoints

  1. Use GitHub Copilot to help implement any missing API endpoints in app.py.
  2. Ensure that the endpoints handle the request parameters and return the appropriate response schemas.

Step 4: Integrate with the Database

  1. Ensure that the API endpoints interact with the SQLite database using SQLAlchemy.
  2. Create a new database model class for the Student entity if not already present.

Step 5: Update Endpoints to Use the Database

  1. Update the existing add endpoint to save the student data to the database.
  2. Update the existing get endpoint to retrieve the student data from the database.
  3. Update the existing update endpoint to update the student data in the database.
  4. Update the existing delete endpoint to delete the student data from the database.

Step 6: Test the API Endpoints

  1. Review the test_app.py file located in this directory.
  2. Ensure that the tests cover all API endpoints.
  3. Use GitHub Copilot to help generate any missing tests.
  4. Run the tests to ensure they are passing.

Step 7: Document the API Endpoints

  1. Use GitHub Copilot to generate documentation for the API endpoints.
  2. Ensure that the documentation includes details about the request parameters and response schemas.

Acceptance Criteria

  • All API endpoints defined in the app.py file are implemented.
  • The API endpoints interact with a SQLite database using SQLAlchemy.
  • Unit tests are written and passing for all API endpoints.
  • Documentation for the API endpoints is generated and accurate.

Resources