Skip to content

Commit

Permalink
Merge pull request #12 from LLNL/fix-docs
Browse files Browse the repository at this point in the history
fix the sphinx build
  • Loading branch information
slyles1001 authored Feb 12, 2025
2 parents f57c6cb + d810254 commit 7f40ab0
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 110 deletions.
94 changes: 0 additions & 94 deletions docs/conf.py

This file was deleted.

86 changes: 74 additions & 12 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
import os
import sys

import requests

if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib

sys.path.insert(0, os.path.abspath("../../src/eyeon/"))



# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
Expand All @@ -6,27 +20,75 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

import os
import sys

sys.path.insert(0, os.path.abspath("../../src/eyeon/"))

project = "EyeON"
copyright = "2023, Lawrence Livermore National Laboratory"
author = "Wangmo Tenzing"
release = "1.0.0"
# pylint: disable-next=redefined-builtin
copyright = "2024, Lawrence Livermore National Security"
author = "Seth Lyles, Wangmo Tenzing, Jack Mooney, Grant Johnson, Isabel Gardner, Grant Espe"
release = "0.0.0rc4"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ["sphinx.ext.viewcode", "sphinx.ext.autodoc", "sphinx.ext.autosummary"]
extensions = [
# "myst_parser",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"sphinx.ext.githubpages",
"sphinx.ext.autosummary",
]

templates_path = ["_templates"]
exclude_patterns = []

exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "images.toml"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_rtd_theme"
html_theme = "alabaster"
html_theme_options = {
"description": "EyeON",
"github_user": "LLNL",
"github_repo": "pEyeON",
"github_button": "true",
"github_banner": "true",
"badge_branch": "main",
"fixed_sidebar": "false",
}

# -- Extension configuration -------------------------------------------------

# Napoleon settings for NumPy and Google style docstrings
napoleon_google_docstring = True
napoleon_numpy_docstring = True
html_favicon = html_logo = "../../Photo/EyeON_Mascot.png"
html_sidebars = {"**": ["globaltoc.html", "relations.html", "searchbox.html"]}
html_static_path = ["_static"]


# -- Fetch image references --------------------------------------------------
# Download all of the image files referenced in images.toml
# def download_images_from_toml(toml_file, image_dir):
# with open(toml_file, "rb") as f:
# data = tomllib.load(f)
#
# if not os.path.exists(image_dir):
# os.makedirs(image_dir)
#
# for file_name, url in data.get("images", {}).items():
# if file_name and url:
# response = requests.get(url)
# if response.status_code == 200:
# with open(os.path.join(image_dir, file_name), "wb") as img_file:
# img_file.write(response.content)
# else:
# print(f"Failed to download {url}")
#

# Path to the TOML file
# toml_file_path = os.path.join(os.path.dirname(__file__), "images.toml")
# Directory to save the images
# image_directory = os.path.join(os.path.dirname(__file__), "img")

# Download images
# download_images_from_toml(toml_file_path, image_directory)
1 change: 1 addition & 0 deletions docs/source/eyeon.cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Module contents
:members:
:undoc-members:
:show-inheritance:

2 changes: 2 additions & 0 deletions docs/source/eyeon.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ Module contents
:members:
:undoc-members:
:show-inheritance:


7 changes: 4 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.. EyeOn documentation master file, created by
sphinx-quickstart on Mon Nov 20 15:38:32 2023.
.. EyeON documentation master file, created by
sphinx-quickstart on Thu Jan 23 17:57:29 2025.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to EyeON's Documentation
=================================

EyeON is a CLI tool that allows users to get software data pertaining to their machines.
EyeON is a CLI tool that allows users to get software data pertaining to their machines by performing threat and inventory analysis. It can be used to quickly generate manifests of installed software or potential firmare patches. These manifests are then submitted to a database and LLNL can use them to continuously monitor OT software for threats.

.. toctree::
:maxdepth: 2
Expand All @@ -20,3 +20,4 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

1 change: 1 addition & 0 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ eyeon
:maxdepth: 4

eyeon

2 changes: 1 addition & 1 deletion src/eyeon/observe.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def set_issuer_sha256(self) -> None:
"""
Parses the certificates to build issuer_sha256 chain
The match between issuer and subject name is case insensitive,
as per RFC 5280 §4.1.2.4 section 7.1
as per RFC 5280 4.1.2.4 section 7.1
"""
subject_sha = {} # dictionary that maps subject to sha256
for sig in self.signatures:
Expand Down

0 comments on commit 7f40ab0

Please sign in to comment.