Skip to content

Commit b12e29e

Browse files
authored
Merge pull request #10 from TGSAI/docs/syntax_improve
Add Install Instructions and Improve README.md
2 parents f20ef78 + c458f93 commit b12e29e

File tree

8 files changed

+301
-71
lines changed

8 files changed

+301
-71
lines changed

README.md

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ width=200"><br>
66
[![PyPI](https://img.shields.io/pypi/v/multidimio.svg)][pypi_]
77
[![Status](https://img.shields.io/pypi/status/multidimio.svg)][status]
88
[![Python Version](https://img.shields.io/pypi/pyversions/multidimio)][python version]
9-
[![License](https://img.shields.io/pypi/l/multidimio)][license]
9+
[![License](https://img.shields.io/pypi/l/multidimio)][license-link]
1010

1111
[![Read the documentation at https://mdio-python.readthedocs.io/](https://img.shields.io/readthedocs/mdio-python/latest.svg?label=Read%20the%20Docs)][read the docs]
1212
[![Tests](https://github.com/TGSAI/mdio-python/workflows/Tests/badge.svg)][tests]
@@ -29,6 +29,8 @@ The primary motivation behind **MDIO** is to represent multidimensional
2929
time series data in a format that makes it easier to use in resource assessment,
3030
machine learning, and data processing workflows.
3131

32+
See the [documentation][read the docs] for more information.
33+
3234
# Features
3335

3436
**Shared Features**
@@ -52,30 +54,20 @@ machine learning, and data processing workflows.
5254

5355
The features marked as **FUTURE** will be open-sourced at a later date.
5456

55-
# Installation
57+
# Installing MDIO
5658

57-
You can install _MDIO_ via [pip] from [PyPI]:
59+
Simplest way to install _MDIO_ via [pip] from [PyPI]:
5860

5961
```shell
6062
pip install multidimio
6163
```
6264

63-
You can also install some optional dependencies (extras) like this:
64-
65-
```shell
66-
pip install multidimio[distributed]
67-
pip install multidimio[cloud]
68-
pip install multidimio[lossy]
69-
```
70-
71-
`distributed` installs [Dask][dask] for parallel, distributed processing.\
72-
`cloud` installs [fsspec][fsspec] backed I/O libraries for [AWS' S3][s3fs],
73-
[Google's GCS][gcsfs], and [Azure ABS][adlfs].\
74-
`lossy` will install the [ZFPY][zfp] library for lossy chunk compression.
65+
For more instructions, please see the [installation instructions][read the docs]
66+
in the documentation.
7567

76-
# Usage
68+
# Using MDIO
7769

78-
Please see the [Command-line Reference] for details.
70+
Please see the [Command-line Reference][cli-ref-link] for details.
7971

8072
For Python API please see the [API Reference] for details.
8173

@@ -93,14 +85,14 @@ Distributed computing `[distributed]`: `distributed` and `bokeh`.\
9385
Cloud Object Store I/O `[cloud]`: `s3fs`, `gcsfs`, and `adlfs`.\
9486
Lossy Compression `[lossy]`: `zfpy`
9587

96-
# Contributing
88+
# Contributing to MDIO
9789

9890
Contributions are very welcome.
9991
To learn more, see the [Contributor Guide].
10092

101-
# License
93+
# Licensing
10294

103-
Distributed under the terms of the [Apache 2.0 license][license],
95+
Distributed under the terms of the [Apache 2.0 license][license-link],
10496
_MDIO_ is free and open source software.
10597

10698
# Issues
@@ -136,7 +128,8 @@ template.
136128

137129
<!-- github-only -->
138130

139-
[license]: https://github.com/TGSAI/mdio-python/blob/main/LICENSE
131+
[license-link]: https://github.com/TGSAI/mdio-python/blob/main/LICENSE
140132
[contributor guide]: https://github.com/TGSAI/mdio-python/blob/main/CONTRIBUTING.md
141-
[command-line reference]: https://mdio-python.readthedocs.io/en/latest/usage.html
133+
[cli-ref-link]: https://mdio-python.readthedocs.io/en/latest/usage.html
142134
[api reference]: https://mdio-python.readthedocs.io/en/latest/reference.html
135+
[install-link]: https://mdio-python.readthedocs.io/en/latest/installation.html

docs/conf.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
extensions = [
66
"sphinx.ext.autodoc",
77
"sphinx.ext.napoleon",
8+
"sphinx.ext.autosectionlabel",
89
"sphinx_click",
910
"sphinx_copybutton",
1011
"myst_nb",
@@ -14,13 +15,21 @@
1415
autodoc_typehints_format = "short"
1516
autodoc_member_order = "groupwise"
1617
autoclass_content = "both"
18+
autosectionlabel_prefix_document = True
1719

1820
html_theme = "furo"
1921

22+
myst_number_code_blocks = ["python"]
2023
myst_heading_anchors = 2
24+
myst_enable_extensions = [
25+
"linkify",
26+
"replacements",
27+
"smartquotes",
28+
]
2129

2230
# sphinx-copybutton configurations
2331
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
32+
copybutton_line_continuation_character = "\\"
2433
copybutton_prompt_is_regexp = True
2534

2635
nb_execution_mode = "off"

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ end-before: <!-- github-only -->
1313
hidden:
1414
maxdepth: 1
1515
---
16+
installation
1617
notebooks/quickstart
1718
usage
1819
reference

docs/installation.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Install Instructions
2+
3+
There are different ways to install MDIO:
4+
5+
- Install the latest release.
6+
- Building package from source.
7+
8+
```{note}
9+
We strongly recommend using a virtual environment `venv` or `conda`
10+
to avoid potential conflicts with other Python packages.
11+
```
12+
13+
## Using `pip` and `virtualenv`
14+
15+
Install the 64-bit version of Python 3 from https://www.python.org.
16+
17+
```shell
18+
$ python -m venv mdio-venv
19+
$ mdio-venv/Scripts/activate
20+
$ pip install -U multidimio
21+
```
22+
23+
## Using `conda`
24+
25+
MDIO can also be installed in a `conda` environment.
26+
27+
```{warning}
28+
Native `conda` installation for MDIO is work-in-progress. Due to the bundled
29+
packages with the [Anaconda](https://www.anaconda.com/products/distribution)
30+
distrtibution, installing MDIO using `pip` into the `conda` environment will
31+
cause your environment to break.
32+
33+
In the meantime, please use the
34+
[Miniconda](https://docs.conda.io/en/latest/miniconda.html) distribution which
35+
doesn't come with bundled packages.
36+
```
37+
38+
We first run the following to create and activate an environment:
39+
40+
```shell
41+
$ conda create -n mdio-env
42+
$ conda activate mdio-env
43+
```
44+
45+
Then we need to install with `pip`:
46+
47+
```shell
48+
$ pip install -U multidimio
49+
```
50+
51+
The above command will install MDIO into your `conda` environment.
52+
53+
## Checking Installation
54+
55+
After installing MDIO, run the following:
56+
57+
```shell
58+
$ python -c "import mdio; print(mdio.__version__)"
59+
```
60+
61+
You should see the version of MDIO printed to the screen.
62+
63+
## Extras
64+
65+
You can also install some optional dependencies (extras) like this:
66+
67+
```shell
68+
$ pip install multidimio[distributed]
69+
$ pip install multidimio[cloud]
70+
$ pip install multidimio[lossy]
71+
```
72+
73+
`distributed` installs [Dask][dask] for parallel, distributed processing.\
74+
`cloud` installs [fsspec][fsspec] backed I/O libraries for [AWS' S3][s3fs],
75+
[Google's GCS][gcsfs], and [Azure ABS][adlfs].\
76+
`lossy` will install the [ZFPY][zfp] library for lossy chunk compression.
77+
78+
[dask]: https://www.dask.org/
79+
[fsspec]: https://filesystem-spec.readthedocs.io/en/latest/
80+
[s3fs]: https://s3fs.readthedocs.io/
81+
[gcsfs]: https://gcsfs.readthedocs.io/
82+
[adlfs]: https://github.com/fsspec/adlfs
83+
[zfp]: https://computing.llnl.gov/projects/zfp

0 commit comments

Comments
 (0)