Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit 15dd314

Browse files
authored
Provide project documentation (#28)
1 parent 26fcc61 commit 15dd314

File tree

16 files changed

+166
-10
lines changed

16 files changed

+166
-10
lines changed

NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
## Security Hub finding updates
88

99
Security Hub findings can be updated. However, there are some limitations on which attributes can be updated
10-
and one should be aware of them. The list can be found [here](https://docs.aws.amazon.com/securityhub/latest/userguide/finding-update-batchupdatefindings.html#batchupdatefindings-fields)
10+
and one should be aware of them. The list can be found [here](https://docs.aws.amazon.com/securityhub/latest/userguide/finding-update-batchupdatefindings.html#batchupdatefindings-fields).
1111

1212
## Findings discovered while working with Security Hub
1313

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
[![codecov](https://codecov.io/gh/xen0l/python-asff/branch/master/graph/badge.svg?token=GEFB001RIX)](https://codecov.io/gh/xen0l/python-asff)
44
[![Documentation Status](https://readthedocs.org/projects/python-asff/badge/?version=latest)](https://python-asff.readthedocs.io/en/latest/?badge=latest)
55

6-
Python library to work with Amazon Security Finding Format (ASFF)
6+
Python library to work with Amazon Security Finding Format (ASFF)

docs/changelog.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/conf.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
#
1313
import os
1414
import sys
15+
from recommonmark.transform import AutoStructify
1516

1617
sys.path.insert(0, os.path.abspath("../"))
1718

18-
import sphinx_rtd_theme
19-
2019

2120
# -- Project information -----------------------------------------------------
2221

@@ -34,9 +33,10 @@
3433
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3534
# ones.
3635
extensions = [
36+
"sphinx.ext.inheritance_diagram",
37+
"sphinx.ext.napoleon",
3738
"sphinx.ext.autodoc",
3839
"autoapi.extension",
39-
"sphinx.ext.inheritance_diagram",
4040
"recommonmark",
4141
]
4242

@@ -76,15 +76,19 @@
7676
"show-inheritance",
7777
]
7878
autoapi_member_order = "groupwise"
79-
# autoapi_add_toctree_entry = True
79+
80+
# Uncomment, if you are working on documentation and want faster rebuilds.
81+
# autoapi_generate_api_docs = False
82+
# autoapi_add_toctree_entry = False
83+
# autoapi_keep_files = True
8084

8185
html_title = "python-asff"
8286

8387
html_theme_options = {
8488
# Set the name of the project to appear in the navigation.
8589
"nav_title": "python-asff",
8690
# Set you GA account ID to enable tracking
87-
"google_analytics_account": "UA-XXXXX",
91+
# "google_analytics_account": "UA-XXXXX",
8892
# Specify a base_url used to generate sitemap.xml. If not
8993
# specified, then no sitemap will be built.
9094
#'base_url': 'https://project.github.io/project',
@@ -109,3 +113,17 @@
109113
html_sidebars = {
110114
"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]
111115
}
116+
117+
118+
def setup(app):
119+
app.add_config_value(
120+
"recommonmark_config",
121+
{
122+
"auto_toc_tree_section": "Contents",
123+
"enable_math": False,
124+
"enable_inline_math": False,
125+
"enable_eval_rst": True,
126+
},
127+
True,
128+
)
129+
app.add_transform(AutoStructify)

docs/developer/changelog.md

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

docs/developer/contributing.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Contributing
2+
3+
Contributions are welcome in the following categories:
4+
5+
* integration into open source security tools
6+
* reporting bugs
7+
* documentation
8+
* new functionality & code
9+
10+
11+
## Reporting bugs
12+
13+
If you found a bug, you should report it in the project [issue tracker](https://github.com/xen0l/python-asff/issues).
14+
15+
## Documentation
16+
17+
All documentation contributions should be written in Markdown. The project uses Sphinx as a documentation generator,
18+
but this is because it provides the best support for generating documentation from docstrings. mkdocs alternatives did
19+
not provide an output of a similar quality (new project idea?).
20+
21+
## Pull requests
22+
23+
All code contributions have to be made as a pull request as CI checks will run automatically.
24+
Every new code added should be accompanied by a test as I would like to maintain 100% test coverage, so detecting regressions is simple
25+
as well as adding new functionality.

docs/developer/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Develper page
2+
=============
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
7+
contributing
8+
testing
9+
maintenance
10+
notes
11+
changelog
12+
license
File renamed without changes.

docs/developer/maintenance.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Maintenance
2+
3+
The repository contains some scripts in _tools_ directory, They are essential for project maintenance.
4+
This page documents them.
5+
6+
* **class_header.template.py** - header template for code generated from ASFF schema
7+
* **generate_class.py** - script for reading ASFF schema and generating classses in asff/generated.py
8+
* **download_securityhub_event_files.py** - helper script for downloading Security Hub event samples used for testing
9+
* **update_schema.py** - script to check for ASFF schema updates (used by Github Actions)

docs/developer/notes.md

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

0 commit comments

Comments
 (0)