From 67c268b727a138efdcc51b1c1ecbaf30ab11b182 Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Fri, 20 May 2022 12:18:52 +0200 Subject: Docs: autodoc, model package docs --- docs/api/model.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/api/model.md (limited to 'docs/api/model.md') diff --git a/docs/api/model.md b/docs/api/model.md new file mode 100644 index 00000000..372815c7 --- /dev/null +++ b/docs/api/model.md @@ -0,0 +1,20 @@ +# Model package + +## CPEClassifier + +```{eval-rst} +.. currentmodule:: sec_certs.model +.. autoclass:: CPEClassifier + :members: +``` + +## SARTranformer + +```{eval-rst} +.. currentmodule:: sec_certs.model +.. autoclass:: SARTransformer + :members: +``` + +## DependencyFinder + -- cgit v1.3.1 From 99768447af7031d4ceb982ba58f49fcf8d4c4591 Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Fri, 20 May 2022 15:25:28 +0200 Subject: update docs --- docs/api/model.md | 22 ++++++++++++++++++++++ docs/index.md | 9 +++++---- docs/installation.md | 25 ++++++++++++++++++++----- docs/quickstart.md | 29 ++++++++++++++++++++++------- 4 files changed, 69 insertions(+), 16 deletions(-) (limited to 'docs/api/model.md') diff --git a/docs/api/model.md b/docs/api/model.md index 372815c7..406d24be 100644 --- a/docs/api/model.md +++ b/docs/api/model.md @@ -1,5 +1,14 @@ # Model package +```{eval-rst} +.. automodule:: sec_certs.model + :no-members: +``` + +```{tip} +The examples related to this package can be found at [model notebook](./../notebooks/examples/model.ipynb). +``` + ## CPEClassifier ```{eval-rst} @@ -18,3 +27,16 @@ ## DependencyFinder +```{eval-rst} +.. currentmodule:: sec_certs.model +.. autoclass:: DependencyFinder + :members: +``` + +## DependencyVulnerabilityFinder + +```{eval-rst} +.. currentmodule:: sec_certs.model +.. autoclass:: DependencyVulnerabilityFinder + :members: +``` \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 8e0883dc..3f44633b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,6 +4,10 @@ Welcome to the technical documentation of *sec-certs* tool for the data analysis There are three main parts of this documentation. *User's guide* describes high-level use of our tool. Driven by this knowledge, you can progress to *Notebook examples* that showcase most of the API that we use in the form of Jupyter notebooks. The documentation currently does not have all modules documented with `autodoc`, so for the API reference, you must directly inspect the [sec_certs](https://github.com/crocs-muni/sec-certs/tree/main/sec_certs) module. If you want, you can run the notebooks as they are stored in the [project repository](https://github.com/crocs-muni/sec-certs/tree/main/notebooks). If you are interested in contributing to our project or in other aspects of our development, you can consult the relevant *GitHub artifacts* +```{admonition} Launch notebooks in MyBinder +Each of the notebooks can be launched interactively in MyBinder by clicking on 🚀 icon (top-right corner). +``` + ```{toctree} :hidden: :caption: Navigation @@ -24,6 +28,7 @@ tutorial.md :caption: Notebook examples notebooks/examples/common_criteria.ipynb notebooks/examples/fips.ipynb +notebooks/examples/model.ipynb ``` ```{toctree} @@ -31,10 +36,6 @@ notebooks/examples/fips.ipynb api/model.md ``` -```{admonition} Launch notebooks in MyBinder -Each of the notebooks can be launched interactively in MyBinder by clicking on 🚀 icon (top-right corner). -``` - ```{toctree} :maxdepth: 2 :caption: GitHub artifacts diff --git a/docs/installation.md b/docs/installation.md index 8d71a170..71e685db 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,18 +1,28 @@ # Installation -The tool can be pulled as a docker image with +::::{tab-set} +:::{tab-item} PyPi (pip) + +The tool can be installed from PyPi with ```bash -docker pull seccerts/sec-certs +pip install -U sec-certs ``` -Alternatively, it can be installed from PyPi with +Note, that `Python>=3.8` is required. + +::: + +:::{tab-item} Docker + +The tool can be pulled as a docker image with ```bash -pip install -U sec-certs +docker pull seccerts/sec-certs ``` -Note, however, that `Python>=3.8` is required and there are some additional dependencies (see below) that are not shipped with the binary distribution. +::: +:::{tab-item} Build from sources The stable release is also published on [GitHub](https://github.com/crocs-muni/sec-certs/releases) from where it can be setup for development with @@ -24,6 +34,11 @@ pip install -e . Alternatively, our Our [Dockerfile](https://github.com/crocs-muni/sec-certs/blob/main/Dockerfile) represents a reproducible way of setting up the environment. +::: +:::: + +If you're not using Docker, you must install the dependencies as described below. + ## Dependencies - [Java](https://www.java.com/en) is needed to parse tables in FIPS pdf documents, must be available from `PATH`. diff --git a/docs/quickstart.md b/docs/quickstart.md index 48f7f1ce..14121212 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -1,18 +1,29 @@ # Quickstart +::::{tab-set} + +:::{tab-item} Common Criteria 1. Install the latest version with `pip install -U sec-certs` (see [installation](installation.md)). 2. Use ```python dset = CCDataset.from_web_latest() ``` +to obtain to obtain freshly processed dataset from [seccerts.org](https://seccerts.org). -(Common Criteria) or +3. Play with the dataset. See [example notebook](./notebooks/examples/common_criteria.ipynb). +::: +:::{tab-item} FIPS 140 +1. Install the latest version with `pip install -U sec-certs` (see [installation](installation.md)). +2. Use ```python dset = FIPSDataset.from_web_latest() ``` +to obtain to obtain freshly processed dataset from [seccerts.org](https://seccerts.org). -(FIPS 140) to obtain freshly processed datasets from [seccerts.org](https://seccerts.org). +3. Play with the dataset. See [example notebook](./notebooks/examples/fips.ipynb). +::: +:::: ```{hint} You can work with those with the help of the [common criteria notebook](notebooks/examples/common_criteria.ipynb) or [fips notebook](notebooks/examples/fips.ipynb) and even launch them in MyBinder without installing anything. Just use the 🚀 icon (top-right corner). @@ -20,14 +31,18 @@ You can work with those with the help of the [common criteria notebook](notebook If you insist on processing the whole certificates pipeline, make sure that you installed all [dependencies](installation.md#dependencies). Then, run +::::{tab-set} +:::{tab-item} Common Criteria ```bash -cc-certs all +$ cc-certs all ``` +::: -for Common Criteria processing, or - +:::{tab-item} FIPS 140 ```bash -fips-certs all +$ fips-certs new-run ``` +::: +:::: -for FIPS 140 processing. This script takes a long time to run (few hours) and will create `./cc_dset` or `./fips_dset` directory. To see all options, call the entrypoint with `--help`. \ No newline at end of file +This script takes a long time to run (few hours) and will create `./cc_dset` or `./fips_dset` directory. To see all options, call the entrypoint with `--help`. \ No newline at end of file -- cgit v1.3.1