-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
58 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
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,43 +1,36 @@ | ||
# Installation | ||
|
||
We recommend using `micromamba` to create a virtual | ||
environment and installing the package in editable mode. | ||
Alternatively, one can use `conda` or `mamba` to create the environment | ||
(they can be used interchangeably). | ||
After cloning the repository, navigate to the root folder and | ||
create the environment with the wished python version and the development dependencies. | ||
### Set up environment | ||
Use [`conda`](https://docs.conda.io/projects/conda/en/latest/index.html) or [`mamba`](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html) or [`micromamba`](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html) | ||
to create and activate the virtual environment `sb_env` via the `environment.yml` file: | ||
|
||
```bash | ||
micromamba create -n sb_env -c conda-forge python=3.12 osmnx | ||
micromamba activate sb_env | ||
pip install superblockify | ||
conda env create --file environment.yml | ||
conda activate sb_env | ||
``` | ||
|
||
This installs the package and its dependencies, | ||
ready for use when activating the environment. | ||
Now you are ready to use `superblockify` in your projects, | ||
as shown in the following [Usage](#usage) section. | ||
|
||
For development, see the [Development Setup](#development-setup) section. | ||
*Alternatively*, or if you run into issues, run: | ||
|
||
## Development Setup | ||
```bash | ||
conda create -n sb_env -c conda-forge python=3.12 osmnx=1.9.2 | ||
conda activate sb_env | ||
``` | ||
|
||
For development, clone the repository, navigate to the root folder and | ||
create the environment with the wished python version and the development dependencies. | ||
### Install package | ||
Next, install the package: | ||
|
||
```bash | ||
micromamba create -n sb_env -c conda-forge python=3.12 --file=environment.yml | ||
micromamba activate sb_env | ||
pip install superblockify | ||
``` | ||
|
||
Now it is possible to import the package relatively to the root folder. | ||
Optionally, register the package in editable mode with `pip`: | ||
### Set up Jupyter kernel | ||
If you want to use `superblockify` with its environment `sb_env` in Jupyter, run: | ||
|
||
```bash | ||
pip install --no-build-isolation --no-deps -e . | ||
pip install --user ipykernel | ||
python -m ipykernel install --user --name=sb_env | ||
``` | ||
|
||
## Testing | ||
This allows you to run Jupyter with the kernel `sb_env` (Kernel > Change Kernel > sb_env) | ||
|
||
The tests are specified using the `pytest` signature in the `tests/` folder and | ||
can be run using a test runner of choice. | ||
For a guided start after installation, see the following [Usage section](#usage). |