Skip to content

Commit 4243903

Browse files
committed
docs: Add security
1 parent 9f268a2 commit 4243903

File tree

15 files changed

+330
-33
lines changed

15 files changed

+330
-33
lines changed

AUTHORS.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Authors
2-
-------
2+
=======
33

44
* Xinyu Ma
5+
* Zhaoning Kong

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Changelog
2+
=========
3+
4+
0.2b1 (2019-11-20)
5+
++++++++++++++++++
6+
7+
The initial release.

Makefile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ upload:
99
python3 setup.py sdist bdist_wheel
1010
python3 -m twine upload dist/*
1111

12-
install-edit:
13-
venv/bin/pip3 install -e .
14-
15-
venv:
16-
python3.6 -m venv venv
17-
./venv/bin/pip3 install pytest pytest-cov
18-
12+
lint:
13+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
14+
flake8 src --exclude=src/ndn/contrib --count --ignore=F403,F405,W503,E226 \
15+
--exit-zero --max-complexity=20 --max-line-length=120 --statistics
16+
flake8 tests --count --ignore=F403,F405,W503,E226,E222,W504 \
17+
--exit-zero --max-complexity=50 --max-line-length=120 --statistics

README.rst

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,9 @@ python-ndn
88

99
A Named Data Networking client library with AsyncIO support in Python 3.
1010

11-
Instructions for developer
12-
--------------------------
13-
14-
To setup python3.6 virtual environment:
15-
16-
.. code-block:: bash
17-
18-
python3.6 -m venv venv
19-
. venv/bin/activate
20-
pip3 install -e .
21-
pip3 install pytest pytest-cov
22-
23-
To do unit tests:
24-
25-
.. code-block:: bash
26-
27-
make test
11+
It supports Python >=3.6 and PyPy3 >=7.1.1.
2812

13+
Please see our documentation_ if you have any issues.
2914

3015
.. |Test Badge| image:: https://github.com/zjkmxy/python-ndn/workflows/test/badge.svg
3116
:target: https://github.com/zjkmxy/python-ndn
@@ -42,3 +27,5 @@ To do unit tests:
4227
.. |Doc Badge| image:: https://readthedocs.org/projects/python-ndn/badge/?version=latest
4328
:target: https://python-ndn.readthedocs.io/en/latest/?badge=latest
4429
:alt: Doc Status
30+
31+
.. _documentation: https://python-ndn.readthedocs.io/en/latest

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Table Of Contents
2222
src/contribute_support
2323
src/future
2424
src/authors
25+
src/changelog
2526

2627

2728
Indices and tables

docs/src/changelog.rst

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

docs/src/contribute_support.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
Contribute and Support
22
======================
3+
4+
- Please submit any changes via `GitHub`_ pull requests.
5+
- If you use any existing code, please make sure it is compatible to *LGPL v3*
6+
- Ensure that your code complies to `PEP8`_.
7+
- Ensure that your code works with *Python 3.6* and *PyPy 7.1.1*.
8+
- Please contact the author first if your changes are not back compatible or import new dependencies.
9+
- Write unit tests. There is no need to cover all code, but please cover as much as you can.
10+
- Add your name to ``AUTHORS.rst``.
11+
12+
.. _GitHub: https://github.com/zjkmxy/python-ndn
13+
.. _PEP8: https://www.python.org/dev/peps/pep-0008/

docs/src/installation.rst

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,44 @@
22
Installation
33
============
44

5-
Install the package with pip::
5+
Install the latest release with pip::
66

77
$ pip install python-ndn
8+
9+
Install the latest development version::
10+
11+
$ pip install -U git+https://github.com/zjkmxy/python-ndn.git
12+
13+
Instructions for developer
14+
--------------------------
15+
16+
Setup python3.6 virtual environment with editable installation:
17+
18+
.. code-block:: bash
19+
20+
python3.6 -m venv venv
21+
. venv/bin/activate
22+
pip3 install -e .
23+
pip3 install pytest pytest-cov flake8
24+
25+
Run all tests:
26+
27+
.. code-block:: bash
28+
29+
make test
30+
31+
Run static analysis:
32+
33+
.. code-block:: bash
34+
35+
make lint
36+
37+
Please use python 3.7 or 3.8 to generate the documentation.
38+
39+
.. code-block:: bash
40+
41+
pip install Sphinx sphinx-autodoc-typehints readthedocs-sphinx-ext \
42+
sphinx-rtd-theme pycryptodomex pygtrie
43+
44+
cd docs && make html
45+
open _build/html/index.html

docs/src/security/security.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,41 @@ Introduction
55
------------
66

77
The :mod:`ndn.security` package provides basic tools for security use.
8+
9+
Signer
10+
------
11+
12+
A :any:`Signer` is a class used to sign a packet during encoding.
13+
14+
.. autoclass:: ndn.encoding.Signer
15+
:members:
16+
17+
Validator
18+
---------
19+
20+
A :any:`Validator` is a async function called to validate an Interest or Data packet.
21+
It takes 2 arguments: a :any:`FormalName` and a :any:`SignaturePtrs`,
22+
and returns whether the packet is validated.
23+
24+
Keychain
25+
--------
26+
27+
A :any:`Keychain` is a class which contains Identities, Keys associated with Identities and associated Certificates.
28+
29+
.. autoclass:: ndn.security.keychain.Keychain
30+
:members:
31+
32+
33+
KeychainDigest
34+
~~~~~~~~~~~~~~
35+
.. automodule:: ndn.security.keychain.keychain_digest
36+
:members:
37+
38+
39+
KeychainSqlite3
40+
~~~~~~~~~~~~~~~
41+
42+
This is the default Keychain.
43+
44+
.. automodule:: ndn.security.keychain.keychain_sqlite3
45+
:members:

setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
description='An NDN client library with AsyncIO support in Python 3',
1717
url='https://github.com/zjkmxy/python-ndn',
1818
author='Xinyu Ma',
19-
author_email='xinyu.ma@cs.ucla.edu',
19+
author_email='ma.xinyu.26a@kyoto-u.jp',
2020
download_url='https://pypi.python.org/pypi/python-ndn',
2121
project_urls={
2222
"Bug Tracker": "https://github.com/zjkmxy/python-ndn/issues",
@@ -26,16 +26,18 @@
2626
license='LGPLv3',
2727
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
2828
classifiers=[
29-
'Development Status :: 3 - Alpha',
29+
'Development Status :: 4 - Beta',
3030

3131
'Intended Audience :: Developers',
3232
'Topic :: Software Development :: Libraries',
33+
'Topic :: Internet',
34+
'Topic :: System :: Networking',
3335

3436
'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)',
3537

3638
'Programming Language :: Python :: 3.6',
3739
'Programming Language :: Python :: 3.7',
38-
'Programming Language :: Python :: 3.8'
40+
'Programming Language :: Python :: 3.8',
3941
],
4042

4143
keywords='NDN',

0 commit comments

Comments
 (0)