Flagsmith / edge-proxy

The Flagsmith Edge Proxy Docker Image
3 stars 3 forks source link

feat: Use `rye`, overhaul settings #98

Closed khvn26 closed 6 months ago

khvn26 commented 7 months ago

This is a chunky one:

Rye

We rely on Rye for setting up the dev environment and managing dependencies now. By design, Rye adheres to standards as much as it can, so we can use pyproject.toml to list dependencies. Rye's UX is a lot like Cargo's of Rust fame, so given that we have Rye installed, we're able to just clone the project and run

rye test

to have a working and usable developer environment.

Entrypoints, project layout, and default config.json generation

The project now uses the src layout correctly, so a simple pip install -r requirements.lock will add the code into PYTHONPATH. Additionally, installing the project now adds the following entrypoints:

I felt that having edge-proxy-render-config will greatly reduce maintenance overhead for keeping the config.json up to date.

config.json

The following settings have been renamed, with backwards compatibility retained:

matthewelwell commented 7 months ago

@khvn26 resolved the comment. Do you want to add some detail to the readme (maybe moving over the code in contributing.md added here and fix the conflicts, then we can get this merged?

I'm keen to do this sooner rather than later, otherwise we're going to be in a constant state of fixing conflicts.

khvn26 commented 7 months ago

Do you want to add some detail to the readme

Done, @matthewelwell. Also improved the whole config.json experience (see the PR description).