-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NO-JIRA: Updated Python SDK fern autogenerated code (#700)
* NO-JIRA: Updated Python SDK fern autogenerated code * Rev2: update README.md
- Loading branch information
Showing
33 changed files
with
1,028 additions
and
63 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
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
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,33 @@ | ||
# How to generate new client code for communication with Opik backend | ||
|
||
## Pre-requirements | ||
For either the automatic script or the manual steps: | ||
- You'll need to install the fern SDK: https://github.com/fern-api/fern | ||
|
||
This is a one time process in the local machine generating the code. | ||
|
||
## Automatic process | ||
> [!IMPORTANT] | ||
> You should generally run this script instead of manual steps below. | ||
> The only pre-requirement is installing the fern SDK. | ||
The following script automates this whole process: | ||
```bash | ||
./scripts/generate_openapi.sh | ||
``` | ||
|
||
You simply need to run it from the repository base directory. | ||
|
||
## Manual process | ||
|
||
These are the manual steps (not recommended), as alternative to the automatic script. | ||
In this case, it's also a pre-requirement to install the fern SDK. | ||
Steps: | ||
1. Execute the `./build_and_run.sh script` from the root of repository | ||
2. Go to http://localhost:3003/ (URL for backend API specification) | ||
3. Download openapi specification file - `openapi.yaml` | ||
4. Put this file into `code_generation/fern/openapi/openapi.yaml` (overwrite it).<br> | ||
Note that this path contains the version of the schema from which the code in `src/opik/rest_api` for the SDK was generated. Therefore, it might not be the latest version of the schema. | ||
5. Run `fern generate` from inside `code_generation/fern` folder. This will generate a python code inside the directory called `sdks` near the `fern` one. | ||
7. Replace content of `src/opik/rest_api` with the python package inside `sdks` (there will be few nested directories, navigate until you find python files) | ||
8. Run `pre-commit run --all-files` to format code |
Oops, something went wrong.