Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the way to launch the web-app (or update the doc) #111

Open
Philippe-Neveux opened this issue Sep 14, 2021 · 6 comments
Open

Change the way to launch the web-app (or update the doc) #111

Philippe-Neveux opened this issue Sep 14, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@Philippe-Neveux
Copy link

Hello the community !

I'm using aequitas for the first time today and i was facing with some issues for launching the audit web-app locally.

To make the command python -m serve work, I had to clone the repository and add the following shell environment variable in my terminal HOST=localhost because it used in the server.py script.

I don't know if it was the best way to do it but finally it worked. So i was wondering if it would be possible to update the documentation or to simplify the process for the audit web-app

Thanks !

@jesteria jesteria added the question Further information is requested label Sep 14, 2021
@jesteria
Copy link
Member

jesteria commented Sep 14, 2021

Sure. Are you just looking for a way to invoke that script from the pip install … version of the package then?

Like…?

$ pip install aequitas
…

$ aequitas-serve

(If so, I imagine that wouldn't be too difficult to add….)


As for the HOST variable you can always:

$ HOST=localhost serve.py

But sure this could also be a proper command argument 😄

@Philippe-Neveux
Copy link
Author

Yes exactly ! And maybe add a default value for the host set to localhost 😃

@jesteria
Copy link
Member

Sure. Sounds like an enhancement to me.

@jesteria jesteria added enhancement New feature or request and removed question Further information is requested labels Sep 14, 2021
@jesteria
Copy link
Member

jesteria commented Sep 14, 2021

Technical discussion

  1. A CLI command could be added to the Python distribution, no- or little-different from the existing aequitas-report.
    • The existing serve.py could be included in the distribution via the setup.py scripts parameter [docs].
    • …And/or a Python package function could be added to the aequitas_webapp package for CLI command invocation (via the console_scripts parameter) and optionally via straight Python.
    • …And/or the aequitas_webapp package could be given a __main__.py such that it is invokable by python -m aequitas_webapp (without downloading the source). Dealer's choice?
  2. The serve.py script and/or derivative can read the environment and/or an argument. There's argparse. There's sys.argv. Etc.
    host = sys.argv[1] if len(sys.argv) > 1 else os.getenv('HOST', default='localhost')

@yajush1998
Copy link

Hello the community !

I'm using aequitas for the first time today and i was facing with some issues for launching the audit web-app locally.

To make the command python -m serve work, I had to clone the repository and add the following shell environment variable in my terminal HOST=localhost because it used in the server.py script.

I don't know if it was the best way to do it but finally it worked. So i was wondering if it would be possible to update the documentation or to simplify the process for the audit web-app

Thanks !

hey please, can u help me I am also facing the same problem you can contact me at [email protected] or my Whatsapp no, please I really need to solve this asap .

@yajush1998
Copy link

 pip install aequitas
``` where we have to add these things can u explain it in details,I am too facing problem in hosting Aequitas locally, please help me in using it 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants