Skip to content

Commit cb51064

Browse files
authored
[MRG] Solve bug of contribution link in docs + automated insert of readme in doc (#301)
* first try * bug solve * attempt to use m2r2 * More elegant dependency * readme.rst now generated automatically from readme.md * weird attempt * Revert "weird attempt" This reverts commit b45f0e6. * fixing readme links * Revert "fixing readme links" This reverts commit 0c6ca76. * full link for readme * correct CONTRIBUTING guidelines mistakes
1 parent 8b9e641 commit cb51064

File tree

9 files changed

+16
-549
lines changed

9 files changed

+16
-549
lines changed

.github/CONTRIBUTING.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,10 @@ reStructuredText documents live in the source code repository under the
182182
doc/ directory.
183183

184184
You can edit the documentation using any text editor and then generate
185-
the HTML output by typing ``make html`` from the doc/ directory.
185+
the HTML output by typing ``make html`` from the ``docs/`` directory.
186186
Alternatively, ``make`` can be used to quickly generate the
187-
documentation without the example gallery. The resulting HTML files will
188-
be placed in ``_build/html/`` and are viewable in a web browser. See the
189-
``README`` file in the ``doc/`` directory for more information.
187+
documentation without the example gallery with `make html-noplot`. The resulting HTML files will
188+
be placed in `docs/build/html/` and are viewable in a web browser.
190189

191190
For building the documentation, you will need
192191
[sphinx](http://sphinx.pocoo.org/),

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ This toolbox benefit a lot from open source research and we would like to thank
206206

207207
## Contributions and code of conduct
208208

209-
Every contribution is welcome and should respect the [contribution guidelines](.github/CONTRIBUTING.md). Each member of the project is expected to follow the [code of conduct](.github/CODE_OF_CONDUCT.md).
209+
Every contribution is welcome and should respect the [contribution guidelines](https://pythonot.github.io/contributing.html). Each member of the project is expected to follow the [code of conduct](https://pythonot.github.io/code_of_conduct.html).
210210

211211
## Support
212212

@@ -216,7 +216,7 @@ You can ask questions and join the development discussion:
216216
* On the POT [gitter channel](https://gitter.im/PythonOT/community)
217217
* On the POT [mailing list](https://mail.python.org/mm3/mailman3/lists/pot.python.org/)
218218

219-
You can also post bug reports and feature requests in Github issues. Make sure to read our [guidelines](.github/CONTRIBUTING.md) first.
219+
You can also post bug reports and feature requests in Github issues. Make sure to read our [guidelines](https://pythonot.github.io/contributing.html) first.
220220

221221
## References
222222

@@ -299,4 +299,4 @@ Machine Learning (pp. 4104-4113). PMLR.
299299
Conference on Machine Learning, PMLR 119:4692-4701, 2020
300300

301301
[38] C. Vincent-Cuaz, T. Vayer, R. Flamary, M. Corneli, N. Courty, [Online Graph
302-
Dictionary Learning](https://arxiv.org/pdf/2102.06555.pdf), International Conference on Machine Learning (ICML), 2021.
302+
Dictionary Learning](https://arxiv.org/pdf/2102.06555.pdf), International Conference on Machine Learning (ICML), 2021.

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ numpydoc
44
memory_profiler
55
pillow
66
networkx
7+
m2r2

docs/requirements_rtd.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ numpydoc
33
memory_profiler
44
pillow
55
networkx
6+
m2r2
67
numpy
78
scipy>=1.0
89
cython

docs/source/code_of_conduct.rst

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

docs/source/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def __getattr__(cls, name):
6969
'sphinx.ext.viewcode',
7070
'sphinx.ext.napoleon',
7171
'sphinx_gallery.gen_gallery',
72+
'm2r2'
7273
]
7374

7475
autosummary_generate = True
@@ -81,8 +82,8 @@ def __getattr__(cls, name):
8182

8283
# The suffix(es) of source filenames.
8384
# You can specify multiple suffix as a list of string:
84-
# source_suffix = ['.rst', '.md']
85-
source_suffix = '.rst'
85+
source_suffix = ['.rst', '.md']
86+
# source_suffix = '.rst'
8687

8788
# The encoding of source files.
8889
source_encoding = 'utf-8-sig'

docs/source/contributing.rst

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

docs/source/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ Contents
1717
all
1818
auto_examples/index
1919
releases
20+
contributing
21+
Code of Conduct <code_of_conduct>
2022

21-
.. include:: readme.rst
23+
.. mdinclude:: ../../README.md
2224
:start-line: 2
2325

2426

0 commit comments

Comments
 (0)