tweag / nixpkgs-graph-explorer

Explore the nixpkgs dependency graph
MIT License
15 stars 0 forks source link

Convert client into a REST API #39

Closed dorranh closed 1 year ago

dorranh commented 1 year ago

This PR includes a variety of changes for converting the monolithic Flask client into a REST API which is only concerned with serving data. #37 introduces a new front-end which will utilize this updated API. While making the changes, I've also included an additional packages endpoint which can be used to list the packages available in the graph.

As a part of these changes, I've introduced a Nix flake which provides some of the project's dev dependencies. As discussed internally, I have also ported the Flask API to FastAPI to allow for better type checking and application life cycle management. Finally, I made some small updates to the documentation to reflect the changes to the project.

Note that I have introduced a few standard dev tools for the Python code, namely black, isort, flake8, and pyright. These can be run via the provided Nix flake commands in the api directory, and we can enforce them in CI as well (perhaps in a follow-up PR to avoid this one growing any larger).

dorranh commented 1 year ago

@jlesquembre, thanks for the review - I've pushed the requested changes. Let me know if you or @GuillaumeDesforges have any other feedback or if this is good to go.

GuillaumeDesforges commented 1 year ago

I'd rather merge it asap since it's a big change and #37 depends on it.

dorranh commented 1 year ago

Sounds good, thanks @GuillaumeDesforges.