Skip to content

Commit 49c74bc

Browse files
authored
Merge pull request #2 from dvermd/function_type_doc
Function type doc
2 parents fd0e287 + 6615048 commit 49c74bc

File tree

3 files changed

+239
-1051
lines changed

3 files changed

+239
-1051
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<img src="./logo.png" width="125" height="125" align="right" />
2+
3+
# `__doc__` for [RustPython](https://rustpython.github.io/)
4+
5+
This is the `__doc__` attributes generator for objects written in RustPython.
6+
7+
It's composed of two parts of:
8+
9+
- the `generate_docs.py` script that extracts the `__doc__` attributes from CPython to `docs.inc.rs`
10+
- the `rustpython-doc` rust crate that uses the `docs.inc.rs` file to create a documentation Database.
11+
12+
This documentation database is then used by macros `pymodule` and `pyclass` macros of the rustpython-derive crate to automatically add the `__doc__` attribute.
13+
14+
The `docs.inc.rs` database file can be generated with
15+
16+
$ python -m venv gendocs
17+
$ source gendocs/bin/activate
18+
$ python -I generate_docs.py <path_to_RustPython> docs.inc.rs
19+
$ deactivate
20+
21+
or using docker
22+
23+
$ docker pull python:slim
24+
$ docker run python:slim python --version
25+
Python 3.10.8
26+
$ ls
27+
__doc__ RustPython
28+
$ docker run -v $(pwd):/RustPython -w /RustPython/__doc__ python:slim python generate_docs.py ../RustPython docs.inc.rs
29+
30+
## Contributing
31+
32+
Contributions are more than welcome, and in many cases we are happy to guide
33+
contributors through PRs or on gitter. Please refer to the
34+
[development guide](https://github.com/RustPython/RustPython/DEVELOPMENT.md) as well for tips on developments.
35+
36+
## License
37+
38+
This project is licensed under the MIT license. Please see the
39+
[LICENSE](https://github.com/RustPython/RustPython/LICENSE) file for more details.
40+
41+
The [project logo](https://github.com/RustPython/RustPython/logo.png) is licensed under the CC-BY-4.0
42+
license. Please see the [LICENSE-logo](https://github.com/RustPython/RustPython/LICENSE-logo) file
43+
for more details.

0 commit comments

Comments
 (0)