question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configure the python package to include the UI

See original GitHub issue

Is your feature request related to a specific problem?

Right now, the python package fidesctl does not include the admin-ui. Instead, we include it via docker.

Describe the solution you’d like

We should instead include the static build assets with the python package so that when we run fidesctl webserver everything will work, even without docker.

Describe alternatives you’ve considered, if any

Keeping everything done via docker

Additional context

This will help us get the admin-ui running in fidesctl+ as well https://ethyca.atlassian.net/wiki/spaces/PM/pages/2392260631/Hosting+the+datamap+UI+along+with+fidesctl+UI

I think this will also remove the need for these lines in the Dockerfile (or we’ll need to update them) https://github.com/ethyca/fides/blob/main/Dockerfile#L6-L18

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sanders41commented, Jul 25, 2022

Without having tested it I think the setup.py route could work as long as the person building it has node/npm. Maybe that is ok since the build and release will be done from a GitHub action. Could be confusing for a developer that wants to work with the code since something like pip install -e . would also require node/npm. A note in the contributing guide could be used to explain that.

0reactions
allisonkingcommented, Jul 25, 2022

Oh, and one thing to watch out for here that @PSalant726 and I found is the files will only included with the pip install if they are in the src/fidesctl directory.

We did something similar to this and found that even though the files were included in the build if they are outside that directory, they don’t get included when doing the pip install.

Oh dang, thanks for the tip, that’s great to know!

This looks like a useful resource that I’ll probably be basing my approach on: http://markneumann.xyz/blog/packaging_uis_in_python/

It doesn’t really have a step that automates the frontend build, though. However, Sebastian found that jupyterlab does something like what we want! Here’s its setup.py which looks like it calls npm directly 🤯

If it can be built directly in setup.py, that might work? Otherwise I think we may need to add some steps in both the github workflow that publishes the package, and also the dockerfile.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Packaging Python Projects
This tutorial walks you through how to package a simple Python project. It will show you how to add the necessary files and...
Read more >
PySimpleGUI: The Simple Way to Create a GUI With Python
To create the user interface, all you need is a Text() element, a Canvas() element, and a Button() element. Then you add all...
Read more >
Using the new Package Management UI
Adding Python Packages¶ · In the environment, select the Python tab, and click + Add Python Package tab. The Add Package(s) dialog appears...
Read more >
How to Import a PyQt5 .ui File in a Python GUI - Nitratine
If you haven't got the designer, you can use python -m pip install pyqt5-tools to install tools that contain the designer. Finding the ......
Read more >
Interface Python with MATLAB and Create Python Packages ...
Run Python in MATLAB-Run MATLAB in Python - Create Python packages from MATLAB and run in PythonSubscribe the channel and hit the bell...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found