From d4498a63085225393c4fbb9be44f44c4900c56b5 Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Tue, 10 Sep 2024 15:52:19 -0400 Subject: [PATCH] Update README.md (#265) * Refactor the README.md * Add installation section to intro.md --- README.md | 38 +++++++++++++++++------ book/content/installation.md | 58 ------------------------------------ book/content/intro.md | 54 ++++++++++++++++++++++++++++++++- 3 files changed, 82 insertions(+), 68 deletions(-) delete mode 100644 book/content/installation.md diff --git a/README.md b/README.md index ff62ee46..8e631d1d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![CI Tox](https://github.com/theochem/Selector/actions/workflows/ci_tox.yaml/badge.svg?branch=main)](https://github.com/theochem/Selector/actions/workflows/ci_tox.yaml) [![codecov](https://codecov.io/gh/theochem/Selector/graph/badge.svg?token=0UJixrJfNJ)](https://codecov.io/gh/theochem/Selector) -The `selector` library provides methods for selecting a diverse subset of a (molecular) dataset. +The `Selector` library provides methods for selecting a diverse subset of a (molecular) dataset. ## Citation @@ -25,30 +25,50 @@ Please use the following citation in any publication using the `selector` librar It is recommended to install `selector` within a virtual environment. To create a virtual environment, we can use the `venv` module (Python 3.3+, https://docs.python.org/3/tutorial/venv.html), `miniconda` (https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html), or -`pipenv` (https://pipenv.pypa.io/en/latest/). We use `miniconda` in the following example to create a virtual environment: +`pipenv` (https://pipenv.pypa.io/en/latest/). -```bash - # Create and activate qcdevs conda environment (optional, but recommended) - conda create -n qcdevs python=3.11 - conda activate qcdevs - -``` +### Installing from PyPI To install `selector` with `pip`, we can install the latest stable release from the Python Package Index (PyPI) as follows: ```bash - # Install the stable release. + # install the stable release. pip install qc-selector ``` +### Installing from The Prebuild Wheel Files + To download the prebuilt wheel files, visit the [PyPI page](https://pypi.org/project/qc-selector/) and [GitHub releases](https://github.com/theochem/Selector/tags). +```bash + # download the wheel file first to your local machine + # then install the wheel file + pip install file_path/qc_selector-0.0.2b12-py3-none-any.whl +``` + +### Installing from the Source Code + In addition, we can install the latest development version from the GitHub repository as follows: ```bash # install the latest development version pip install git+https://github.com/theochem/Selector.git +``` + +We can also clone the repository to access the latest development version, test it and install it as follows: + +```bash + # clone the repository + git clone git@github.com:theochem/Selector.git + + # change into the working directory + cd Selector + # run the tests + python -m pytest . + + # install the package + pip install . ``` diff --git a/book/content/installation.md b/book/content/installation.md deleted file mode 100644 index 889896be..00000000 --- a/book/content/installation.md +++ /dev/null @@ -1,58 +0,0 @@ -# Installation - -## Stable Releases - -
-Warning: - -We are preparing a 1.0 release. Until then, we can install the beta relase with PyPI, -https://pypi.org/project/qc-selector/. -
- -The following dependencies are required to run selector properly, - -* Python >= 3.9: http://www.python.org/ -* NumPy >= 1.21.2: http://www.numpy.org/ -* SciPy >= 1.11.1: http://www.scipy.org/ -* bitarray >= 2.5.1: https://pypi.org/project/bitarray/ - -Normally, you don’t need to install these dependencies manually. They will be installed automatically when you follow the instructions below. - -It is recommended to install `selector` within a virtual environment. To create a virtual -environment, we can use the `venv` module (Python 3.3+, -https://docs.python.org/3/tutorial/venv.html), `miniconda` (https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html), or -`pipenv` (https://pipenv.pypa.io/en/latest/). We use `miniconda` in the following example to create a virtual environment: - -```bash - # Create and activate qcdevs conda environment (optional, but recommended) - conda create -n qcdevs python=3.11 - conda activate qcdevs - -``` - -To install `selector` with `pip`, we can install the latest stable release from the Python Package Index (PyPI) as follows: - -```bash - # Install the stable release. - pip install qc-selector -``` - -## Prebuilt Wheels - -To download the prebuilt wheel files, visit the [PyPI page](https://pypi.org/project/qc-selector/) -and [GitHub Releases](https://github.com/theochem/Selector/releases). - -```bash - # install the prebuilt wheel file - pip install qc_selector-0.0.2b10-py3-none-any.whl -``` - -## Development Version - -In addition, we can install the latest development version from the GitHub repository as follows: - -```bash - # install the latest development version - pip install git+https://github.com/theochem/Selector.git - -``` diff --git a/book/content/intro.md b/book/content/intro.md index 579df585..06173162 100644 --- a/book/content/intro.md +++ b/book/content/intro.md @@ -19,4 +19,56 @@ distance between and similarity of samples, as well as tools based on spatial pa addition, it includes seven diversity measures for quantifying the diversity of a given set. We also implemented various mathematical formulations to convert similarities into dissimilarities. - + +## Installation + +It is recommended to install `selector` within a virtual environment. To create a virtual +environment, we can use the `venv` module (Python 3.3+, +https://docs.python.org/3/tutorial/venv.html), `miniconda` (https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html), or +`pipenv` (https://pipenv.pypa.io/en/latest/). + +### Installing from PyPI + +To install `selector` with `pip`, we can install the latest stable release from the Python Package Index (PyPI) as follows: + +```bash + # install the stable release. + pip install qc-selector +``` + +### Installing from The Prebuild Wheel Files + +To download the prebuilt wheel files, visit the [PyPI page](https://pypi.org/project/qc-selector/) +and [GitHub releases](https://github.com/theochem/Selector/tags). + +```bash + # download the wheel file first to your local machine + # then install the wheel file + pip install file_path/qc_selector-0.0.2b12-py3-none-any.whl +``` + +### Installing from the Source Code + +In addition, we can install the latest development version from the GitHub repository as follows: + +```bash + # install the latest development version + pip install git+https://github.com/theochem/Selector.git +``` + +We can also clone the repository to access the latest development version, test it and install it as follows: + +```bash + # clone the repository + git clone git@github.com:theochem/Selector.git + + # change into the working directory + cd Selector + # run the tests + python -m pytest . + + # install the package + pip install . + +``` +