-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update README, add jupyter as dependency
- Loading branch information
1 parent
d0b33d3
commit 6f1232b
Showing
2 changed files
with
30 additions
and
5 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 |
---|---|---|
@@ -1,23 +1,47 @@ | ||
|
||
## Installation | ||
```bash | ||
# clone the repository | ||
git clone https://github.com/mackelab/labproject.git | ||
|
||
First, clone the repository with `git clone https://github.com/mackelab/labproject.git` and then install the package `labproject` with its dependencies with `pip install -e | ||
.` or when you also want to edit the tutorials `pip install -e ".[docs]"`. | ||
You may want to do this in an environment but you can also use your standard Python installation. | ||
# (optional but recommended) create conda environment | ||
conda create -n labproject python=3.9 | ||
conda activate labproject | ||
|
||
## Coding | ||
# install labproject package with dependencies | ||
pip install -e . | ||
# if you want to edit the tutorials, install the docs dependencies | ||
pip install -e ".[docs]" | ||
``` | ||
|
||
`pip install -e .` installs the labproject package in editable mode, i.e. changes to the code are immediately reflected in the package. | ||
|
||
The environment now contains, `numpy`, `scipy`, `matplotlib`, `torch`, and `jupyter`. | ||
|
||
## Development | ||
|
||
Develop code in your desired way, e.g. in local notebooks (you don't commit, the public notebooks for the website can be found in `docs/notebooks/`). | ||
|
||
Once you want other people to see your figure/experiment, add them to `plotting.py` and `experiments.py` and call the corresponding functions in `run.py`. | ||
|
||
After committing and pushing your changes, GitHub will execute `run.py` and update the figures in Overleaf. | ||
|
||
You can obviously also run it yourself with `python labproject/run.py`. | ||
|
||
|
||
|
||
## Documentation | ||
|
||
We use mkdocs to create the public version of our tutorials (notebooks) and the API documentation. mkdocs are written in Markdown and are found in `docs/`. | ||
After installing the necessary dependencies with `pip install -e ".[docs]"`, you can view your local version with `mkdocs serve` in `labproject/` and then open http://127.0.0.1:8000/. | ||
This especially helpful when editing the documentation. | ||
|
||
### Notebooks | ||
The jupyter notebooks are found in `docs/notebooks/` | ||
The jupyter notebooks are found in `docs/notebooks/`. | ||
|
||
For your convenience, at the beginning of the jupyter notebook, run | ||
```python | ||
%load_ext autoreload | ||
%autoreload 2 | ||
``` | ||
for automatic reloading of modules, in case you make any running changes to the labproject code. |
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ name = "labproject" | |
version = "0.1" | ||
|
||
dependencies = [ | ||
"jupyter", | ||
"numpy", | ||
"scipy", | ||
"matplotlib", | ||
|