Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mingi3314/PyRb
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.9.3
Choose a base ref
...
head repository: mingi3314/PyRb
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.9.4
Choose a head ref
  • 4 commits
  • 7 files changed
  • 1 contributor

Commits on Mar 3, 2024

  1. 🔐 add cors middleware (#98)

    ---
    
    <details open="true"><summary>Generated summary (powered by <a href="https://app.graphite.dev">Graphite</a>)</summary>
    
    > ## TL;DR
    > This pull request introduces Cross-Origin Resource Sharing (CORS) middleware to the FastAPI application and adds a new ping endpoint. It also includes a new script for building an executable.
    > 
    > ## What changed
    > - Added CORS middleware to the FastAPI application in `pyrb/controllers/api/main.py`. This allows the server to accept requests from any origin, with any method and headers.
    > - Added a new `/ping` endpoint to the FastAPI application in `pyrb/controllers/api/main.py`. This endpoint simply returns the string "pong".
    > - Added a new script `scripts/build-executable.sh` for building an executable. This script uses PyInstaller to compile the FastAPI application into a standalone executable.
    > 
    > ## How to test
    > - To test the CORS middleware, try making a request to the server from a different origin. The server should accept the request and respond appropriately.
    > - To test the new `/ping` endpoint, make a GET request to `/ping`. The server should respond with the string "pong".
    > - To test the new build script, run `./scripts/build-executable.sh`. This should create a new executable in the current directory.
    > 
    > ## Why make this change
    > - The CORS middleware is necessary for the server to accept requests from different origins. This is especially important for web applications, which often need to make requests to servers on different domains.
    > - The `/ping` endpoint is a simple health check that can be used to verify that the server is running and responding to requests.
    > - The build script makes it easy to compile the FastAPI application into a standalone executable, which can be useful for deployment or distribution.
    </details>
    mingi3314 authored Mar 3, 2024
    Configuration menu
    Copy the full SHA
    768fce5 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2024

  1. Configuration menu
    Copy the full SHA
    5b0a501 View commit details
    Browse the repository at this point in the history
  2. ✨ Add portfolio endpoint to retrieve account portfolio (#100)

    ---
    
    <details open="true"><summary>Generated summary (powered by <a href="https://app.graphite.dev">Graphite</a>)</summary>
    
    > ## TL;DR
    > This pull request adds error handling for when the account is not set in the context, and introduces a new endpoint to retrieve portfolio information.
    > 
    > ## What changed
    > - Added `HTTPException` import in `deps.py` for error handling.
    > - Modified `context_dep` function in `deps.py` to handle `InitializationError` and raise a `404` HTTPException.
    > - Added a new `PortfolioResponse` model in `main.py` to represent portfolio information.
    > - Added a new `/portfolio` endpoint in `main.py` to retrieve portfolio information.
    > - Added tests for the new `/portfolio` endpoint in `test_api.py`.
    > 
    > ## How to test
    > 1. Run the tests in `test_api.py`.
    > 2. Use a client to make a `GET` request to the `/portfolio` endpoint and verify the response.
    > 
    > ## Why make this change
    > - This change improves the error handling when the account is not set in the context by raising a `404` HTTPException.
    > - The addition of the `/portfolio` endpoint allows users to retrieve detailed portfolio information, enhancing the functionality of the API.
    </details>
    mingi3314 authored Mar 10, 2024
    Configuration menu
    Copy the full SHA
    05cb4d0 View commit details
    Browse the repository at this point in the history
  3. 🔖 release version 0.9.4 (#101)

    ---
    
    <details open="true"><summary>Generated summary (powered by <a href="https://app.graphite.dev">Graphite</a>)</summary>
    
    > ## TL;DR
    > This pull request updates the version of the Python Rebalancer (pyrb) from 0.9.3 to 0.9.4 in the `pyproject.toml` file.
    > 
    > ## What changed
    > The only change in this pull request is the version number of the pyrb package. The version has been incremented from 0.9.3 to 0.9.4.
    > 
    > ```diff
    >  [tool.poetry]
    >  name = "pyrb"
    > -version = "0.9.3"
    > +version = "0.9.4"
    >  description = "Python Rebalancer"
    >  authors = ["Minki Kim <mingi3314@gmail.com>"]
    >  readme = "README.md"
    > ```
    > 
    > ## How to test
    > To test this change, you can pull the changes from this branch and check the `pyproject.toml` file. The version of the pyrb package should be 0.9.4.
    > 
    > ## Why make this change
    > This change is necessary to keep the versioning of the pyrb package up to date. This new version may include bug fixes, new features, or other improvements.
    </details>
    mingi3314 authored Mar 10, 2024
    Configuration menu
    Copy the full SHA
    9f0b1e1 View commit details
    Browse the repository at this point in the history
Loading