Skip to content

Commit b34fa3e

Browse files
committed
Documentation and licensing updates. Hurrah for Read the Docs. :-)
1 parent f90e31a commit b34fa3e

21 files changed

+1769
-77
lines changed

LICENSE.md

+660
Large diffs are not rendered by default.

docs/acknowledgements.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Acknowledgements
2+
3+
TextSmith wouldn't be possible without the work of many others who have made
4+
their code freely available for all to use. In no particular order I'd like to
5+
recognise the contributions of:
6+
7+
* Cole Maclean for [aiosmtplib](https://github.com/cole/aiosmtplib).
8+
* Jonathan Slenders for [asyncio-redis](https://github.com/jonathanslenders/asyncio-redis).
9+
* Hsiaoming Yang for [flask-wtf](https://github.com/lepture/flask-wtf).
10+
* Phil Jones for [quart](https://github.com/pgjones/quart).
11+
* David Beazley for [sly](https://github.com/dabeaz/sly).
12+
* Hynek Schlawack for [structlog](https://github.com/hynek/structlog).
13+
* The PyTest project for [pytest](https://github.com/pytest-dev/pytest).
14+
* The Python Babel developers for [flask-babel](https://github.com/python-babel/flask-babel).
15+
* The Pallets project for [jinja](https://github.com/pallets/jinja).
16+
* The Sphinx team for [Sphinx](https://github.com/sphinx-doc/sphinx).
17+
* The folks at [Read the Docs](https://readthedocs.org/) for making it so easy
18+
for documentation like this to be hosted online.
19+
* Innumerable [Python developers](https://python.org/) for many contributions
20+
to such a flourishing ecosystem.
21+
* The folks behind [Redis](https://redis.io/).
22+

docs/api.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# API
2+
3+
This API reference is automatically generated from the docstrings found within
4+
the source code. It's meant as an easy to use and easy to share window into the
5+
code base.
6+
7+
Take a look around! The code is simple and short.
8+
9+
## `textsmith.constants`
10+
11+
```eval_rst
12+
.. automodule:: textsmith.constants
13+
:members:
14+
```
15+
16+
## `textsmith.datastore`
17+
18+
```eval_rst
19+
.. automodule:: textsmith.datastore
20+
:members:
21+
```
22+
23+
## `textsmith.logic`
24+
25+
```eval_rst
26+
.. automodule:: textsmith.logic
27+
:members:
28+
```
29+
30+
## `textsmith.log`
31+
32+
```eval_rst
33+
.. automodule:: textsmith.log
34+
:members:
35+
```
36+
37+
## `textsmith.parser`
38+
39+
```eval_rst
40+
.. automodule:: textsmith.parser
41+
:members:
42+
```
43+
44+
## `textsmith.pubsub`
45+
46+
```eval_rst
47+
.. automodule:: textsmith.pubsub
48+
:members:
49+
```
50+
51+
## `textsmith.verbs`
52+
53+
```eval_rst
54+
.. automodule:: textsmith.verbs
55+
:members:
56+
```

docs/architecture.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Architecture
2+
3+
TBD

docs/authors.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Authors
2+
3+
The following folks have made significant contributions to TextSmith's
4+
development:
5+
6+
[Nicholas H.Tollervey](https://ntoll.org/) - creator and maintainer.

docs/code_of_conduct.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Code of Conduct
2+
3+
We expect contributors to follow the Code of Conduct reproduced below (based
4+
upon that of the Python Software Foundation).
5+
6+
The Python community is made up of members from around the globe with a diverse
7+
set of skills, personalities, and experiences. It is through these differences
8+
that our community experiences great successes and continued growth. When
9+
you're working with members of the community, we encourage you to follow these
10+
guidelines which help steer our interactions and strive to keep Python a
11+
positive, successful, and growing community.
12+
13+
A member of the Python community is:
14+
15+
## Open
16+
17+
Members of the community are open to collaboration, whether it's on PEPs,
18+
patches, problems, or otherwise. We're receptive to constructive comment and
19+
criticism, as the experiences and skill sets of other members contribute to the
20+
whole of our efforts. We're accepting of all who wish to take part in our
21+
activities, fostering an environment where anyone can participate and everyone
22+
can make a difference.
23+
24+
## Considerate
25+
26+
Members of the community are considerate of their peers -- other Python users.
27+
We're thoughtful when addressing the efforts of others, keeping in mind that
28+
often times the labor was completed simply for the good of the community. We're
29+
attentive in our communications, whether in person or online, and we're tactful
30+
when approaching differing views.
31+
32+
## Respectful
33+
34+
Members of the community are respectful. We're respectful of others, their
35+
positions, their skills, their commitments, and their efforts. We're respectful
36+
of the volunteer efforts that permeate the Python community. We're respectful
37+
of the processes set forth in the community, and we work within them. When we
38+
disagree, we are courteous in raising our issues.
39+
40+
Overall, we're good to each other. We contribute to this community not because
41+
we have to, but because we want to. If we remember that, these guidelines will
42+
come naturally.

docs/conf.py

+20-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
import sys
1515
sys.path.insert(0, os.path.abspath('..'))
1616

17+
# Markdown dammit!
18+
import recommonmark
19+
from recommonmark.transform import AutoStructify
20+
source_suffix = ".md"
21+
1722

1823
# -- Project information -----------------------------------------------------
1924

@@ -33,7 +38,8 @@
3338
# ones.
3439
extensions = [
3540
'sphinx.ext.autodoc',
36-
'sphinx.ext.viewcode'
41+
'sphinx.ext.viewcode',
42+
"recommonmark",
3743
]
3844

3945
# Add any paths that contain templates here, relative to this directory.
@@ -66,10 +72,22 @@
6672
'searchbox.html',
6773
]
6874
}
75+
html_logo = 'icon.png'
6976

7077
# Add any paths that contain custom static files (such as style sheets) here,
7178
# relative to this directory. They are copied after the builtin static files,
7279
# so a file named "default.css" will overwrite the builtin "default.css".
7380
html_static_path = ['_static']
7481

75-
html_logo = 'icon.png'
82+
# The name of the Pygments (syntax highlighting) style to use.
83+
pygments_style = "sphinx"
84+
85+
# See: https://recommonmark.readthedocs.io/en/latest/auto_structify.html for
86+
# information on using Sphinx directives within Markdown.
87+
github_doc_root = 'https://github.com/ntoll/textsmith/tree/master/docs/'
88+
def setup(app):
89+
app.add_config_value('recommonmark_config', {
90+
'url_resolver': lambda url: github_doc_root + url,
91+
'auto_toc_tree_section': 'Contents',
92+
}, True)
93+
app.add_transform(AutoStructify)

docs/contributing.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Contributing
2+
3+
Hey! Many thanks for wanting to improve TextSmith.
4+
5+
Contributions are welcome without prejudice from *anyone* irrespective of who
6+
you are. If you're thinking, "but they don't mean me", *then we especially mean
7+
YOU*. Good quality code and constructive engagement with respect, humour and
8+
intelligence is what you should aim for.
9+
10+
* If you're from a background which isn't well-represented in most geeky
11+
groups, get involved - *we want to help you make a difference*.
12+
* If you're from a background which *is* well-represented in most geeky
13+
groups, get involved - *we want your help making a difference*.
14+
* If you're worried about not being technical enough, get involved - *your
15+
fresh perspective will be invaluable*.
16+
* If you think you're an imposter, get involved.
17+
* If your day job isn't code, get involved.
18+
* This isn't a group of experts, just people. Get involved!
19+
* We are interested in literature, technology, community and creativity. If you
20+
are too, get involved.
21+
* This is a new community. *No-one knows what they are doing*, so, get
22+
involved.
23+
24+
We expect contributors to follow the spirit of our
25+
[code_of_conduct](code_of_conduct.md).
26+
27+
Feedback may be given for contributions and, where necessary, changes will
28+
be politely requested and discussed with the originating author. Respectful
29+
yet robust argument is most welcome.
30+
31+
**Contributions are subject to the following caveats**: the contribution
32+
was created by the contributor who, by submitting the contribution, is
33+
confirming that they have the authority to submit the contribution and
34+
place it under the license as defined in the LICENSE file found within
35+
this repository.
36+
37+
## Checklist
38+
39+
* If your contribution includes non-obvious technical decision making please
40+
make sure you document this.
41+
* Your code should be commented in *plain English* (British spelling).
42+
* If your contribution is for a major block of work and you've not done so
43+
already, add yourself to the AUTHORS file following the convention found
44+
therein.
45+
* We have 100% test coverage - include tests to maintain this!
46+
* **Before submitting code ensure coding standards and test coverage by
47+
running**::
48+
```
49+
make check
50+
```
51+
* If in doubt, ask a question. The only stupid question is the one that's never
52+
asked.
53+
* Most importantly, **be creative and have fun!** :-)

docs/icon.png

13.5 KB
Loading

docs/index.md

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# TextSmith
2+
3+
A multi-user collaborative platform for creating and inhabiting text based
4+
literary worlds.
5+
6+
**This is very much a work in progress.**
7+
8+
## Developer Setup
9+
10+
This project uses Python 3.7+.
11+
12+
1. Ensure you have [Redis](https://redis.io/) installed.
13+
2. Clone the [repository](https://github.com/ntoll/textsmith).
14+
3. Create and start a new virtual environment.
15+
4. `pip install -r requirements.txt`
16+
5. Type `make` to see a list of common developer related tasks. For instance,
17+
to run the full test suite and code checks type: `make check`.
18+
19+
The application expects certain configuration settings to be found in the
20+
environment. These are (with default settings within parenthesis):
21+
22+
* `TEXTSMITH_REDIS_HOST` (`"localhost"`) - the server running Redis.
23+
* `TEXTSMITH_REDIS_PORT` (`6379`) - the port to use to connect to Redis.
24+
* `TEXTSMITH_REDIS_PASSWORD` (`None`) - the password to use to connect to
25+
Redis.
26+
* `TEXTSMITH_REDIS_POOLSIZE` (`10`) - the number of connections in the Redis
27+
connection pool.
28+
* `TEXTSMITH_KEY` (`"CHANGEME"`) - the secret key used by the web application
29+
for cryptographic operations.
30+
* `TEXTSMITH_DEBUG` (`False`) - the debug flag which results in detailed debug
31+
information from the web application. This flag is assumed to be `True` if
32+
any value is set in the environment variable.
33+
* `RECAPTCHA_PUBLIC_KEY` (`"CHANGEME"`) - the public key for the reCaptcha v2
34+
challenge in the signup form.
35+
* `RECAPTCHA_PRIVATE_KEY` (`"CHANGEME"`) - the private key for the reCaptcha
36+
v2 challenge in the signup form.
37+
* `TEXTSMITH_EMAIL_ADDRESS` (`"CHANGEME"`) - the email address of the account
38+
TextSmith uses to send emails to users.
39+
* `TEXTSMITH_EMAIL_PASSWORD` (`"CHANGEME"`) - the password for the email
40+
account TextSmith uses to send emails to users.
41+
* `TEXTSMITH_EMAIL_HOST` (`"CHANGEME"`) - the host for the email account
42+
TextSmith uses to send emails to users.
43+
* `TEXTSMITH_EMAIL_PORT` (`"CHANGEME"`) - the port for the email account
44+
TextSmith uses to send emails to users.
45+
46+
To run TextSmith, `make run` and connect to the
47+
[local server](http://localhost:8000/) with your browser. If the `make` command
48+
doesn't work, try the following command from the shell:
49+
`hypercorn textsmith.app:app`.
50+
51+
JSON based structured logging is emitted to stdout. Each log entry is on a
52+
single line and contains a timestamp and details of the system upon which the
53+
application is running.
54+
55+
## Contents
56+
```eval_rst
57+
.. toctree::
58+
:maxdepth: 2
59+
60+
contributing.md
61+
code_of_conduct.md
62+
architecture.md
63+
api.md
64+
license.md
65+
authors.md
66+
acknowledgements.md
67+
```

docs/index.rst

-15
This file was deleted.

0 commit comments

Comments
 (0)