-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detailed instructions to local notebooks and Streamlit
- Loading branch information
1 parent
997c5d4
commit 3d9f8f1
Showing
2 changed files
with
36 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,18 +97,18 @@ This can easily be done via |venv|_:: | |
|
||
python -m venv .venv | ||
source .venv/bin/activate | ||
pip install -r requirements-dev.txt | ||
|
||
Clone the repository | ||
-------------------- | ||
|
||
#. Create an user account on |the repository service| if you do not already have one. | ||
#. Fork the project repository_: click on the *Fork* button near the top of the | ||
page. This creates a copy of the code under your account on |the repository service|. | ||
#. Clone this copy to your local disk:: | ||
#. Clone this copy to your local disk and install dev requirements:: | ||
|
||
git clone [email protected]:YourLogin/pH-diagrams.git | ||
cd pH-diagrams | ||
pip install -r requirements-dev.txt | ||
|
||
#. Check if all tests are passing:: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,15 @@ pH diagrams | |
:alt: header animation | ||
:align: center | ||
|
||
| | ||
Interactive web app: | ||
|
||
.. image:: https://img.shields.io/badge/-Streamlit%20app-FF4B4B?style=for-the-badge&logo=Streamlit&logoColor=white | ||
:alt: Streamlit app | ||
:align: center | ||
:target: https://phdiagrams.herokuapp.com/ | ||
|
||
Installation | ||
============ | ||
|
||
|
@@ -67,10 +76,6 @@ Changing the ``backend`` parameter to ``plotly``, and removing the ``ax`` parame | |
(it works only with Matplotlib), will open a browser window for each plot. | ||
Since Plotly_ is interactive, the user can zoom, pan, and see values on hover. | ||
|
||
For more basic usage examples, see the ``tutorial.ipynb`` notebook on ``notebooks`` folder. | ||
In the same folder, the ``tutorial_interactive_ipywidgets.ipynb`` file shows how to | ||
use ipywidgets_ to create interactive diagrams. | ||
|
||
Full documentation is hosted on `Read the Docs`_. | ||
|
||
A live interactive version of this project can be seen clicking in the following badge: | ||
|
@@ -82,13 +87,33 @@ A live interactive version of this project can be seen clicking in the following | |
|
||
The web app was made with Streamlit_ and hosted on Heroku_. | ||
|
||
A local version of the Streamlit_ app can be used cloning the repo and running | ||
``streamlit run Home.py`` on a terminal. A browser window will open (if not, follow | ||
the instructions shown on the terminal output). | ||
|
||
A brief explanation on the chemical theory behind each diagram can be seen | ||
`here <https://phdiagrams.herokuapp.com/How_to_use_and_theory>`_. | ||
|
||
Local Streamlit app and Jupyter notebooks | ||
----------------------------------------- | ||
|
||
This repo has Jupyter Notebooks and scripts for a fully functional | ||
Streamlit_ app. First, create a virtual environment, clone the repo and | ||
install dependencies:: | ||
|
||
python -m venv .venv | ||
source .venv/bin/activate | ||
git clone [email protected]:chicolucio/pH-diagrams.git | ||
cd pH-diagrams | ||
pip install -r requirements.txt | ||
|
||
This considers that you have `Jupyter Notebook`_ installed. If not, install it with | ||
``pip install notebook``. | ||
|
||
For more basic usage examples, see the ``tutorial.ipynb`` notebook on ``notebooks`` folder. | ||
In the same folder, the ``tutorial_interactive_ipywidgets.ipynb`` file shows how to | ||
use ipywidgets_ to create interactive diagrams. Just run ``jupyter notebook`` on a | ||
terminal from the repo root folder and select the files. | ||
|
||
A local version of the Streamlit_ app can be used running, from the repo root folder, | ||
``streamlit run Home.py`` on a terminal. A browser window will open (if not, follow | ||
the instructions shown on the terminal output). | ||
|
||
Contributing | ||
============ | ||
|
@@ -132,3 +157,4 @@ If you use this project in a scientific publication or in classes, please consid | |
.. _contributing guide: CONTRIBUTING.rst | ||
.. _Read the Docs: https://ph-diagrams.readthedocs.io/en/latest/?badge=latest | ||
.. _ipywidgets: https://ipywidgets.readthedocs.io/en/stable/ | ||
.. _Jupyter Notebook: https://jupyter.org/ |