-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91f7f90
commit 242d9b9
Showing
6 changed files
with
96 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Expose data through an API | ||
|
||
In the prior exercise you created a model to predict the likelihood a flight will be delayed into an airport by more than 15 minutes on a given day of the week. Now it's time to expose both this model and the associated list of airports so you can create the front-end application. | ||
|
||
## Defining success | ||
|
||
You will have successfully completed the challenge after: | ||
|
||
- creating an endpoint to accept the id of the day of week and airport, which calls the model and returns both the chances the flight will be delayed and the confidence percent of the prediction. | ||
- creating an endpoint which returns the list of airport names and IDs, sorted in alphabetical order. | ||
- all data is returned as JSON. | ||
|
||
## Tips | ||
|
||
While you may find [Flask](https://flask.palletsprojects.com/en/2.3.x/) and [FastAPI](https://fastapi.tiangolo.com/) best suited for the task, you can use the framework you feel most comfortable with. | ||
|
||
> **NOTE:** When using [GitHub Codespaces](https://docs.github.com/codespaces/overview) you are able to connect to a web server running in the cloud-based container. If you receive a 404 error, you may need to update [devcontainer.json](../.devcontainer/devcontainer.json) to add a [forwarded port](https://docs.github.com/en/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace#automatically-forwarding-a-port-1). | ||
### Jump start | ||
|
||
To get started with this challenge: | ||
|
||
1. Create a new folder named **server**, and the file you'll use to be the server. | ||
2. Start the file by adding in a couple of lines of comment describing what you're looking to accomplish. | ||
|
||
## Sparking imagination | ||
|
||
There's a few directions you could go to build upon the solution you've created. You could add a [Swagger](https://swagger.io/) implementation. You could implement caching to improve performance. You could add unit tests for the APIs. If you created additional models or data manipulations, you can expose those as well. | ||
|
||
## Next steps | ||
|
||
The primary goal of this exercise is to provide the opportunity to explore how GitHub Copilot works with a framework, and how you can help provide context by adding descriptive text at the beginning of the file. Now it's time to finish out the application by [creating the frontend](./3-create-frontend.md)! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Create a user experience | ||
|
||
With the API created it's time to close everything out by creating a frontend application. While the first two exercises have been relatively prescriptive in the frameworks and style, this exercise offers you the ability to choose the direction you'd like to go for creating a frontend. You can create a website using React or Svelte, a mobile app, a Windows app... Whatever you feel most comfortable with! You can also use this as an opportunity to explore a new framework. | ||
|
||
## Defining success | ||
|
||
You will have successfully completed the challenge after: | ||
|
||
- you have a UI which displays a list of days of the week and airport. | ||
- after the user makes their selection, the API you created is called. | ||
- the result is displayed to the user. | ||
|
||
## Tips | ||
|
||
As highlighted above, you're free to use the framework you desire and create the type of application you like. | ||
|
||
GitHub Copilot does not replace the need for a developer. While it can help guide and generate suggestions, the developer still needs to understand the code being generated. However, it can support a developer as they're exploring a framework for the first time. You can interact with GitHub Copilot through comments, describing what you're looking to accomplish, and seeing the suggested code. | ||
|
||
> **NOTE:** If you are using a web frontend framework you may run into CORS issues when calling the API. See if GitHub Copilot can help you out! | ||
## Sparking imagination | ||
|
||
Now it's time to put a bow on everything you've been creating up until this point! Call all the APIs you created. Implement client-side caching. Add style and flair! | ||
|
||
## Next steps | ||
|
||
Congratulations on completing the workshop! Over the course of these challenges you explored how: | ||
|
||
- GitHub Copilot can support development. | ||
- to provide context to GitHub Copilot to improve suggestions. | ||
- you need to be flexible when working with AI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- jupyter | ||
- matplotlib | ||
- numpy | ||
- psycopg2 | ||
- pylint |