Skip to content

Commit 8cdee4a

Browse files
authored
Merge pull request #14 from SMI-Lab-Inha/docs-links-and-changelog
Fix doc links, changelog rendering, and beginner install
2 parents 61eb9ac + 05e499c commit 8cdee4a

5 files changed

Lines changed: 84 additions & 45 deletions

File tree

README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,21 @@ It targets compatibility with selected legacy *IECWind*-style workflows. It has
1818

1919
## Installation
2020

21-
`pyIECWind` is not yet on PyPI. Install from source:
21+
`pyIECWind` is not yet on PyPI. The simplest, most reliable setup is a conda
22+
environment (install [Miniconda](https://www.anaconda.com/docs/getting-started/miniconda/install)
23+
first if you don't already use Python):
2224

2325
```bash
2426
git clone https://github.com/SMI-Lab-Inha/pyIECWind.git
2527
cd pyIECWind
26-
python -m pip install -e .
28+
conda env create -f environment.yml
29+
conda activate pyiecwind
2730
```
2831

29-
Conda and development installs are described in
30-
[docs/installation.rst](docs/installation.rst). A PyPI release and a conda-forge
31-
package are planned.
32+
The [Installation guide](https://pyiecwind.readthedocs.io/en/latest/installation.html)
33+
has a step-by-step walkthrough (recommended if you're new to Python), plus
34+
pip-only and development installs. A PyPI release and a conda-forge package are
35+
planned.
3236

3337
## Usage
3438

@@ -75,12 +79,13 @@ closed (raises on the first invalid condition) unless `strict=False`.
7579
- Speed modifiers are valid only on the rated (`R`) reference.
7680
- This package generates inflow files; it does not run OpenFAST.
7781

78-
Full detail: [docs/limitations.rst](docs/limitations.rst).
82+
Full detail: [Scope and limitations](https://pyiecwind.readthedocs.io/en/latest/limitations.html).
7983

8084
## Validation
8185

8286
Output is protected by three layers of differing strength, documented with a
83-
per-scenario reproducibility matrix in [docs/validation.rst](docs/validation.rst):
87+
per-scenario reproducibility matrix in the
88+
[Validation docs](https://pyiecwind.readthedocs.io/en/latest/validation.html):
8489

8590
1. **Golden regression corpus** - committed reference `.wnd` files regenerated and
8691
compared on every run. These are generated by this package, so they detect
@@ -101,9 +106,11 @@ layer is future work.
101106

102107
Hosted at [pyiecwind.readthedocs.io](https://pyiecwind.readthedocs.io/en/latest/)
103108
(source in [`docs/`](docs/), built with Sphinx). Highlights:
104-
[Theory](docs/theory.rst) (IEC equations), [API reference](docs/api.rst),
105-
[API contract](docs/api_contract.rst), [Input files](docs/data_sources.rst),
106-
[Units](docs/units.rst).
109+
[Theory](https://pyiecwind.readthedocs.io/en/latest/theory.html) (IEC equations),
110+
[API reference](https://pyiecwind.readthedocs.io/en/latest/api.html),
111+
[API contract](https://pyiecwind.readthedocs.io/en/latest/api_contract.html),
112+
[Input files](https://pyiecwind.readthedocs.io/en/latest/data_sources.html),
113+
[Units](https://pyiecwind.readthedocs.io/en/latest/units.html).
107114

108115
## Development
109116

@@ -114,7 +121,8 @@ mypy
114121
pytest --cov=pyiecwind
115122
```
116123

117-
Quality gates and contribution guidelines: [docs/contributing.rst](docs/contributing.rst).
124+
Quality gates and contribution guidelines:
125+
[Contributing](https://pyiecwind.readthedocs.io/en/latest/contributing.html).
118126

119127
## Citation
120128

@@ -130,8 +138,8 @@ file under *Cite this repository*.
130138
- OpenFAST *InflowWind* module documentation, National Laboratory of the Rockies
131139
(formerly the National Renewable Energy Laboratory).
132140

133-
See [docs/theory.rst](docs/theory.rst) for the equations and their mapping to the
134-
implementation.
141+
See the [Theory](https://pyiecwind.readthedocs.io/en/latest/theory.html) page for
142+
the equations and their mapping to the implementation.
135143

136144
## License
137145

docs/changelog.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
Changelog
2-
=========
1+
.. This page renders the canonical CHANGELOG.md (single source) via MyST, so it
2+
never drifts. The page title comes from the Markdown H1.
33
4-
The changelog is maintained as a single source in ``CHANGELOG.md`` at the
5-
repository root and is included verbatim below, so this page never drifts out of
6-
sync with it.
7-
8-
.. literalinclude:: ../CHANGELOG.md
9-
:language: markdown
4+
.. include:: ../CHANGELOG.md
5+
:parser: myst_parser.sphinx_

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"sphinx.ext.viewcode",
2727
"sphinx.ext.intersphinx",
2828
"sphinx.ext.mathjax",
29+
"myst_parser", # only to parse the included Markdown CHANGELOG (see changelog.rst)
2930
]
3031

3132
source_suffix = {".rst": "restructuredtext"}

docs/installation.rst

Lines changed: 57 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,68 @@ Installation
66
.. note::
77

88
``pyIECWind`` is not yet published on PyPI, so ``pip install pyiecwind`` is not
9-
available. Install from source or conda as shown below. A PyPI release and a
10-
``conda-forge`` package are planned (see :doc:`deployment`).
9+
available. Install from source, ideally inside a conda environment as shown
10+
below. A PyPI release and a ``conda-forge`` package are planned (see
11+
:doc:`deployment`).
1112

12-
From source
13-
-----------
13+
Recommended: Miniconda (step by step)
14+
-------------------------------------
15+
16+
If you are coming from an engineering background and do not already have a Python
17+
workflow, this is the most reliable way to get started. It installs an isolated
18+
environment so ``pyIECWind`` cannot interfere with any other Python on your
19+
machine.
20+
21+
**1. Install Miniconda.** Download and run the installer for your operating system
22+
from https://www.anaconda.com/docs/getting-started/miniconda/install. Miniconda is
23+
a small distribution that provides ``conda`` (an environment and package manager)
24+
and Python. On Windows, accept the defaults and then open the **Anaconda Prompt**;
25+
on macOS/Linux, open a terminal.
26+
27+
**2. Get the code.** Clone the repository (or download the ZIP from GitHub and
28+
extract it), then change into the folder:
29+
30+
.. code-block:: console
31+
32+
git clone https://github.com/SMI-Lab-Inha/pyIECWind.git
33+
cd pyIECWind
34+
35+
**3. Create the environment.** This reads ``environment.yml`` and builds an
36+
isolated environment named ``pyiecwind`` with the correct Python, NumPy, and
37+
``pyIECWind`` itself:
1438

1539
.. code-block:: console
1640
17-
$ git clone https://github.com/SMI-Lab-Inha/pyIECWind.git
18-
$ cd pyIECWind
19-
$ python -m pip install -e .
41+
conda env create -f environment.yml
42+
43+
**4. Activate it.** Do this in every new terminal session before using the tool:
44+
45+
.. code-block:: console
2046
21-
Conda
22-
-----
47+
conda activate pyiecwind
2348
24-
Create the provided environment:
49+
**5. Check it works:**
2550

2651
.. code-block:: console
2752
28-
$ conda env create -f environment.yml
29-
$ conda run -n pyiecwind pyiecwind --help
53+
pyiecwind --help
54+
55+
You are ready -- continue with the :doc:`quickstart`.
56+
57+
Alternative installs
58+
--------------------
3059

31-
or install into an existing environment:
60+
If you already manage your own Python environments:
3261

3362
.. code-block:: console
3463
35-
$ conda create -n pyiecwind python=3.11 numpy pip -y
36-
$ conda run -n pyiecwind python -m pip install -e .
64+
# into an existing conda environment
65+
conda create -n pyiecwind python=3.11 numpy pip -y
66+
conda activate pyiecwind
67+
python -m pip install -e .
3768
38-
A ``conda-forge`` package is planned; see :doc:`deployment`.
69+
# or a plain pip install from a source checkout
70+
python -m pip install -e .
3971
4072
Optional dependency groups
4173
--------------------------
@@ -44,23 +76,24 @@ Two extras are available for contributors:
4476

4577
``dev``
4678
Test and quality tooling: ``pytest``, ``pytest-cov``, ``hypothesis``,
47-
``ruff``, ``mypy``, ``build``, and ``twine``.
79+
``ruff``, ``mypy``, ``build``, ``twine``, and ``pip-audit``.
4880

4981
``docs``
50-
Documentation tooling: ``sphinx`` and the ``furo`` theme.
82+
Documentation tooling: ``sphinx``, the ``sphinx-rtd-theme`` theme, and
83+
``myst-parser``.
5184

5285
.. code-block:: console
5386
54-
$ python -m pip install -e ".[dev]"
55-
$ python -m pip install -e ".[docs]"
87+
python -m pip install -e ".[dev]"
88+
python -m pip install -e ".[docs]"
5689
5790
Verifying the installation
5891
--------------------------
5992

6093
.. code-block:: console
6194
62-
$ pyiecwind --help
63-
$ python -c "import pyiecwind; print(pyiecwind.__version__)"
95+
pyiecwind --help
96+
python -c "import pyiecwind; print(pyiecwind.__version__)"
6497
65-
The version is single-sourced from the installed package metadata, so the
66-
import above and ``pip show pyiecwind`` always agree.
98+
The version is single-sourced from the installed package metadata, so the import
99+
above and ``pip show pyiecwind`` always agree.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ dev = [
4545
docs = [
4646
"sphinx>=7.0",
4747
"sphinx-rtd-theme>=2.0",
48+
"myst-parser>=2.0",
4849
]
4950

5051
[project.scripts]

0 commit comments

Comments
 (0)