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

adding requirements.txt for example_folder #88

Closed
wants to merge 3 commits into from

Conversation

someshfengde
Copy link

adding requirements for example_folder will help us to run the application more easily ( before we have to install required modules separately)
we can now just do pip install -r requirements.txt and pip will install dependencies for us.

@jonasvdd
Copy link
Member

Hi @someshfengde 👋🏼!

Thank you for contributing, very valid PR!
I think this can indeed be added, however I would opt to

  • omit the required packages which are already listed in our pyproject.toml ⬇️

    [tool.poetry.dependencies]
    python = "^3.7.1,<3.11"
    jupyter-dash = ">=0.4.2"
    plotly = "^5.6.0"
    dash = "^2.2.0"
    lttbc = "0.2.0"
    orjson = "^3.6.8"
    pandas = "^1.3.5"
    trace-updater = ">=0.0.8"

@jonasvdd jonasvdd self-assigned this Jun 28, 2022
@jonasvdd jonasvdd self-requested a review June 28, 2022 09:31
@jonasvdd jonasvdd added enhancement New feature or request examples Issues related to the examples labels Jun 28, 2022
@someshfengde
Copy link
Author

but if we omit those packages then we cannot run get requirements from one file. Either we can add these additional requirements in .toml file or we can have it here in requirements.txt
(I've made PR just considering the dash-examples folder so there might be more libraries which required)

@jonasvdd
Copy link
Member

Hi @someshfengde!

I discussed this with @jvdd and he was rather fond of adding these requirements to the poetry dev dependencies. (As otherwise, we would have multiple dependency management systems.) ⬇️

[tool.poetry.dev-dependencies]
jupyterlab = "^3.3.0"
numpy = "^1.21.2"
pytest = "^6.2.5"
pytest-cov = "^3.0.0"
black = "^22.3.0"
selenium = "^4.1.0"
pytest-selenium = "^2.0.1"
webdriver-manager = "^3.5.2"
pyarrow = "^6.0.1"
selenium-wire = "^4.5.6"
pyfunctional = "^1.4.3"
dash-bootstrap-components = "^1.0.3"
Sphinx = "^4.4.0"
pydata-sphinx-theme = "^0.9.0"
sphinx-autodoc-typehints = "^1.17.0"
ipywidgets = "^7.7.0"
memory-profiler = "^0.60.0"
line-profiler = "^3.5.1"

But then we made the observation that most users do not at all need / use poetry, so your requirements.txt makes a lot of sense! 😄

However, we might want to:

  • loosen the (version locked) requirements of your packages
  • also add the requirements of all the other example scripts/notebooks
  • add the install command in the examples its readme.md

@someshfengde
Copy link
Author

yes I've also seen using poetry first time 😄
yes sure
Should I loosen up version lock and and make PR again?

@jonasvdd
Copy link
Member

I think you can just re-use this PR and adjust the version lock!

@someshfengde
Copy link
Author

Yes sure

@jayceslesar
Copy link
Contributor

also if you are on the latest pip you should be able to just pip install -e . or pip install .

@someshfengde
Copy link
Author

ohh thanks

@jvdd jvdd added the documentation Improvements or additions to documentation label Jun 28, 2022
@someshfengde
Copy link
Author

Hi I've changed and loosened up a requirements a little bit
For now it's working fine on My Linux system (both dash app and plotly-resampler is working)

We can add installation instructions in readme.md file itself ( I haven't added it not sure if we should add this or not? )

@jonasvdd
Copy link
Member

The installation instructions can indeed be added to the readme!

@jonasvdd
Copy link
Member

Will close this PR as this will be handled in #104

@jonasvdd jonasvdd closed this Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request examples Issues related to the examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants