Skip to content

Commit

Permalink
docs: update install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lappalainenj committed Dec 10, 2024
1 parent 2ddc5ea commit 1741a83
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 31 deletions.
6 changes: 6 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,9 @@ See [mkdocs user guide](https://www.mkdocs.org/user-guide/deploying-your-docs/)
```bash
mkdocs gh-deploy
```

or optionally specify a remote repository:

```bash
mkdocs gh-deploy --remote <remote_name>
```
41 changes: 21 additions & 20 deletions docs/docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,25 @@

## Local installation

> Note: `flyvis` is only tested on Linux.
Make sure to run `flyvis` in your active python environment.

### Create virtual environment
#### Option 1: Using conda (recommended)
### Option 1: Install from PyPI

1. Create a new conda environment: `conda create --name flyvision python=3.9 -y`
2. Activate the new conda environment: `conda activate flyvision`

#### Option 2: Using venv
```bash
pip install flyvis
```

1. Create a new virtual environment: `python -m venv flyvision_env`
2. Activate the virtual environment: `source flyvision_env/bin/activate`
> `flyvis` is tested on Linux for python 3.9, 3.10, 3.11, 3.12.
### Clone repo and install
### Option 2: Install from source

3. Clone the repository: `git clone https://github.com/TuragaLab/flyvis.git`
4. Navigate to the repo: `cd flyvis`
5. Install in developer mode: `pip install -e .`
1. Clone the repository: `git clone https://github.com/TuragaLab/flyvis.git`
2. Navigate to the repo: `cd flyvis`
3. Install in developer mode: `pip install -e .`

For development, documentation, or to run examples, you can install additional dependencies:
- For development: `pip install -e ".[dev]"`
- For documentation: `pip install -e ".[docs]"`
- For examples: `pip install -e ".[example]"`
- `pip install -e ".[dev,examples,docs]"`

> Note: We make flyvision available on pypi soon to simplify the installation process.

## Download pretrained models

Expand All @@ -36,9 +30,6 @@ After installation, download the pretrained models by running:
flyvis download-pretrained
```

Make sure to run this command from your active flyvision environment.


## Set environment variables

`flyvis` uses environment variables for configuration. These can be set using a `.env` file or manually.
Expand Down Expand Up @@ -66,3 +57,13 @@ export FLYVIS_ROOT_DIR='path/to/your/data'
```

> Note: The data directory is where `flyvis` will store downloaded models, cached data, and other files. If `FLYVIS_ROOT_DIR` is not set, it defaults to a `data` folder in the package directory.
## Training new models

For training new models with custom settings, the following command will create a default config in your current working directory to be able to create overrides.

```bash
flyvis init-config
```

See the config [hydra config docs](reference/hydra_default_config.md) for more details.
12 changes: 1 addition & 11 deletions docs/docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,11 @@ git push public_repo v1.1.2
# Clean previous builds
rm -rf dist/

# Build package
python -m build

# Set version temporarily for this session manually
export SETUPTOOLS_SCM_PRETEND_VERSION=1.1.2

# Now build and test
# Build package
python -m build
python -m twine upload --repository testpypi dist/*

# When done testing, unset it
unset SETUPTOOLS_SCM_PRETEND_VERSION

# Upload to Test PyPI first (recommended)
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ flyvis==1.1.2

# Upload to PyPI
python -m twine upload dist/*
Expand Down

0 comments on commit 1741a83

Please sign in to comment.