Skip to content

Commit cba91fc

Browse files
authored
Updated installation instructions (#74)
* fixes #57 * Updated installation instructions using pip and mamba/conda (README and docs)
1 parent a3c3d3e commit cba91fc

File tree

2 files changed

+91
-44
lines changed

2 files changed

+91
-44
lines changed

README.md

Lines changed: 43 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,64 +27,79 @@ IMDClient is bound by a [Code of Conduct](https://github.com/becksteinlab/imdrea
2727

2828
### Installation
2929

30-
IMDClient is available via PyPi and can be installed with pip:
31-
```bash
30+
#### Install via mamba (recommended)
31+
To install the latest release of IMDClient from conda-forge:
32+
33+
```
34+
mamba install -c conda-forge imdclient
35+
```
36+
37+
#### Install via pip
38+
To install the latest release of IMDClient from PyPI:
39+
40+
```
3241
pip install imdclient
3342
```
3443

35-
To build IMDClient from source,
36-
we highly recommend using virtual environments.
37-
If possible, we strongly recommend that you use
38-
[Anaconda](https://docs.conda.io/en/latest/) as your package manager.
39-
Below we provide instructions both for `conda` and
40-
for `pip`.
44+
---
45+
46+
### Building from Source
47+
To build IMDClient from source, we highly recommend using virtual environments.
48+
If possible, we recommend that you use [mamba](https://mamba.readthedocs.io/en/latest/) as your package manager through [miniforge](https://github.com/conda-forge/miniforge). (You can substitute `conda` for `mamba` in the commands below if you prefer.)
4149

42-
#### With conda
50+
Below we provide instructions both for `mamba` and for `pip`.
4351

44-
Ensure that you have [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) installed.
52+
#### Source build with mamba
53+
1. Ensure you have [mamba](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html) installed.
4554

46-
Create a virtual environment and activate it:
55+
2. Create and activate a new environment:
4756

4857
```
49-
conda create --name imdclient
50-
conda activate imdclient
58+
mamba create --name imdclient
59+
mamba activate imdclient
5160
```
5261

53-
<!-- Install the development and documentation dependencies:
62+
3. (Recommended) Install all dependencies using the provided environment YAML files for a clean and reproducible environment:
5463

5564
```
56-
conda env update --name imdreader --file devtools/conda-envs/test_env.yaml
57-
conda env update --name imdreader --file docs/requirements.yaml
58-
``` -->
65+
mamba env update --name imdclient --file devtools/conda-envs/test_env.yaml
66+
mamba env update --name imdclient --file docs/requirements.yaml
67+
```
5968

60-
Build this package from source:
69+
4. Build and install IMDClient in editable mode:
6170

6271
```
6372
pip install -e .
6473
```
6574

66-
If you want to update your dependencies (which can be risky!), run:
75+
5. (Optional) Update dependencies:
6776

6877
```
69-
conda update --all
78+
mamba update --all
7079
```
7180

72-
And when you are finished, you can exit the virtual environment with:
81+
6. Deactivate the environment when finished:
7382

7483
```
75-
conda deactivate
84+
mamba deactivate
7685
```
7786

78-
#### With pip
87+
#### Source build with pip
88+
89+
1. (Optional) Create and activate a virtual environment:
90+
91+
```
92+
python -m venv venv
93+
source venv/bin/activate
94+
```
7995

80-
To build the package from source, run:
96+
2. Install IMDClient from source:
8197

8298
```
8399
pip install .
84100
```
85101

86-
If you want to create a development environment, install
87-
the dependencies required for tests and docs with:
102+
3. (Optional) For development (tests and docs):
88103

89104
```
90105
pip install ".[test,doc]"
@@ -102,4 +117,5 @@ Copyright (c) 2024, Lawson
102117

103118
Project based on the
104119
[MDAnalysis Cookiecutter](https://github.com/MDAnalysis/cookiecutter-mda) version 0.1.
105-
<!-- Please cite [MDAnalysis](https://github.com/MDAnalysis/mdanalysis#citation) when using IMDReader in published work. -->
120+
121+
**If you use IMDClient in your research, please cite [IMDClient](https://github.com/Becksteinlab/imdclient) in your publications.**

docs/source/getting_started.rst

Lines changed: 48 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,68 @@ Getting Started
44
Installation
55
############
66

7-
To build imdclient from source, we highly recommend using virtual environments.
8-
If possible, we strongly recommend that you use
9-
`Anaconda <https://docs.conda.io/en/latest/>`_ as your package manager.
10-
Below we provide instructions both for installing into a `conda` environment.
7+
Install via mamba (recommended)
8+
-------------------------------
119

12-
With conda
13-
----------
10+
To install the latest release of imdclient from conda-forge::
1411

15-
Ensure that you have `conda <https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html>`_ installed.
12+
mamba install -c conda-forge imdclient
1613

17-
Create a virtual environment and activate it::
14+
Install via pip
15+
---------------
1816

19-
conda create --name imdclient
20-
conda activate imdclient
17+
To install the latest release of imdclient from PyPI::
18+
19+
pip install imdclient
20+
21+
Building from Source
22+
####################
23+
24+
We highly recommend using virtual environments to source-build IMDClient. If possible, we recommend that you use `mamba <https://mamba.readthedocs.io/en/latest/>`_ as your package manager through `miniforge <https://github.com/conda-forge/miniforge>`_.
25+
26+
Source build with mamba
27+
-----------------------
28+
29+
Ensure that you have `mamba <https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html>`_ installed.
30+
31+
Create and activate a new environment::
32+
33+
mamba create --name imdclient
34+
mamba activate imdclient
35+
36+
(Recommended) Install all dependencies using the provided environment YAML files for a clean and reproducible environment::
37+
38+
mamba env update --name imdclient --file devtools/conda-envs/test_env.yaml
39+
mamba env update --name imdclient --file docs/requirements.yaml
2140

2241
Build this package from source::
2342

2443
pip install -e <path/to/repo>
2544

45+
Source build with pip
46+
---------------------
47+
48+
(Optional) Create and activate a virtual environment::
49+
50+
python -m venv venv
51+
source venv/bin/activate
52+
53+
Install imdclient from source::
54+
55+
pip install <path/to/repo>
56+
2657
Development environment installation
2758
------------------------------------
59+
For development or documentation builds, use the following commands after activating your environment:
2860

29-
After creating and activating a conda environment as described, install
30-
the package with documentation and testing dependencies::
61+
To install development and documentation dependencies::
3162

32-
pip install -e <path/to/repo>[doc, test]
63+
pip install -e <path/to/repo>[doc,test]
3364

34-
Then, to install the development dependencies::
65+
To update the development dependencies using mamba::
3566

36-
conda env update --name imdclient --file devtools/conda-envs/test_env.yaml
67+
mamba env update --name imdclient --file devtools/conda-envs/test_env.yaml
3768

38-
Or the documentation building dependencies::
69+
Or to update the documentation building dependencies::
3970

40-
conda env update --name imdclient --file docs/requirements.yaml
71+
mamba env update --name imdclient --file docs/requirements.yaml

0 commit comments

Comments
 (0)