Skip to content

Commit 77b2b26

Browse files
authored
Merge pull request #180 from RacimoLab/changelog
Add changelog and developer docs
2 parents 119c8ab + 60d47ec commit 77b2b26

File tree

6 files changed

+127
-9
lines changed

6 files changed

+127
-9
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Changelog
2+
3+
## 0.2.0 - 2022-07-20
4+
5+
Initial release, featuring:
6+
7+
* `dinf` and `dinf-plot` CLIs,
8+
* train, predict, abc-gan, mcmc-gan, alfi-mcmc-gan, pg-gan,
9+
* two flavours of feature matrices, dinf-style `BinnedHaplotypeMatrix`
10+
and pg-gan-style `HaplotypeMatrix`,
11+
* two flavours of discriminator networks, dinf-style `ExchangeableCNN`
12+
and pg-gan-style `ExchangeablePGGAN`, plus multi-population versions
13+
of each.
14+
15+
16+
## 0.1.0 - 2021-12-08
17+
18+
Dummy release to reserve name on Pypi.

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md

docs/_toc.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ parts:
1717
- file: guide/performance
1818
- file: guide/multiple_demes
1919
- file: guide/empirical_data
20+
- file: guide/abc-gan
2021
- file: guide/mcmc-gan
2122
- file: guide/pg-gan
22-
- file: guide/gfo
2323
- caption: Reference
2424
chapters:
2525
- file: api
2626
- file: cli
27-
#- file: examples
28-
#- file: CHANGELOG
27+
- caption: Miscellaneous
28+
chapters:
29+
- file: development
30+
- file: CHANGELOG

docs/development.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
(sec_development)=
2+
3+
# Development
4+
5+
Contributions to Dinf are welcome!
6+
Please make pull requests against our
7+
[git repository](https://github.com/RacimoLab/dinf).
8+
9+
## Installation
10+
11+
Compared with a regular installation via `pip install dinf`,
12+
additional dependencies are required during development, as
13+
developers regularly run the test suite, build the documentation, and assess
14+
whether their code changes conform to style guidelines.
15+
For developers, installation is from the git repository directly,
16+
and a virtual environment is highly recommended. The `requirements.txt`
17+
file in the top-level folder points to the developer dependencies.
18+
19+
```sh
20+
# Clone the repository.
21+
git clone https://github.com/RacimoLab/dinf.git
22+
cd dinf
23+
# Create a virtual environment for development.
24+
python -m venv venv
25+
# Activate the environment.
26+
source venv/bin/activate
27+
pip install --upgrade pip
28+
# Install the developer dependencies.
29+
pip install -r requirements.txt
30+
```
31+
32+
```{note}
33+
Non-developer requirements are listed in the `install_requires` section
34+
of the ``setup.cfg`` file in the top-level folder of the sources.
35+
```
36+
37+
## Continuous integration (CI)
38+
39+
After a pull request is submitted, an automated process known as
40+
*continuous integration* (CI) will:
41+
42+
* assess if the proposed changes conform to style guidelines (known as *lint* checks),
43+
* run the test suite,
44+
* and build the documentation.
45+
46+
The CI process uses
47+
[GitHub Actions](https://docs.github.com/en/free-pro-team@latest/actions)
48+
and the configuration files detailing how these are run can be found under the
49+
`.github/workflows/` folder of the sources.
50+
51+
## Lint checks
52+
53+
The following tools are run during the linting process:
54+
55+
* [black](https://black.readthedocs.io/), a code formatter
56+
(code is only checked during CI, not reformatted),
57+
* [flake8](https://flake8.pycqa.org/),
58+
a [PEP8](https://www.python.org/dev/peps/pep-0008/) code-style checker,
59+
* [mypy](http://mypy-lang.org/), a static type checker.
60+
61+
Each of these tools can also be run manually from the top-level folder of the
62+
sources. The `setup.cfg` file includes some project-specific configuration
63+
for each of these tools, so running them from the command line should match
64+
the behaviour of the CI checks.
65+
66+
## Test suite
67+
68+
A suite of tests is included in the `tests/` folder.
69+
The CI process uses the `pytest` tool to run the tests, which can also be run
70+
manually from the top-level folder of the sources.
71+
72+
```sh
73+
python -m pytest -v tests --cov=dinf --cov-report=term-missing
74+
```
75+
76+
## Building the documentation
77+
78+
The Dinf documentation is built with [jupyter-book](https://jupyter-book.org/),
79+
which uses [sphinx](https://www.sphinx-doc.org/).
80+
Much of the documentation is under the `docs/` folder, written in the
81+
[MyST](https://myst-parser.readthedocs.io/en/latest/) flavour of Markdown,
82+
and is configured in the `docs/_config.yml` file.
83+
In contrast, the API documentation is automatically generated from "docstrings"
84+
in the Python code that use the
85+
[reStructuredText](https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html)
86+
format.
87+
Finally, some documentation files are ipython notebooks that get executed and
88+
converted into markdown by jupyter-book. A couple of these notebooks take a
89+
long time to run, so they are excluded from execution in the
90+
jupyter-book configuration file and run manually as required.
91+
92+
To build the documentation locally, run the following from the top-level folder.
93+
94+
```sh
95+
make -C docs
96+
```
97+

docs/guide/abc-gan.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
(sec_guide_abc_gan)=
2+
# ABC-GAN
3+
4+
```{todo}
5+
write me
6+
```

docs/guide/gfo.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)