diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..252b23b --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,124 @@ +### +# ```{rubric} CodeQL Intro +# ``` +# --- +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ```{note} +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# ``` +# +# ```{literalinclude} ./.github/workflows/codeql.yml +# :caption: .github/workflows/codeql.yml#name +# :language: yaml +# :start-at: "name: CodeQL\n" +# :end-before: "###\n" +# ``` +name: CodeQL +permissions: + contents: read +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '18 22 * * 6' +### +# ```{rubric} CodeQL Jobs +# ``` +# --- +# Define the jobs that run in the CodeQL workflow. +# +# ```{literalinclude} ./.github/workflows/codeql.yml +# :caption: .github/workflows/codeql.yml#jobs +# :language: yaml +# :start-at: "jobs:\n" +# ``` +jobs: + analyze: + name: Analyze + ### + # Runner size impacts CodeQL analysis time. + # ```{note} + # To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners + # ``` + # + # Consider using larger runners for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + ### + # required for all workflows + security-events: write + ### + # only required for workflows in private repositories + actions: read + contents: read + strategy: + fail-fast: false + matrix: + ### + # CodeQL supports these languages. + # - `c-cpp` + # - `csharp` + # - `go` + # - `java-kotlin` + # - `javascript-typescript` + # - `python` + # - `ruby` + # - `swift` + # + # Use only `java-kotlin` to analyze code written in Java, Kotlin or both + # Use only `javascript-typescript` to analyze code written in + # JavaScript, TypeScript or both. + # + # Learn more about [CodeQL language support](https://aka.ms/codeql-docs/language-support) + language: [ 'javascript-typescript', 'python' ] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + ### + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + ### + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # For more details on CodeQL's query packs, see [here](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs) + # queries: `security-extended,security-and-quality` + languages: ${{ matrix.language }} + ### + # Autobuild attempts to build any compiled languages + # (C/C++, C#, Go, Java, or Swift). + # If this step fails, then you should remove it and run the build + # manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + ### + # - ℹī¸ Command-line programs to run using the OS shell. + # - 📚 See [here](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun) + # - If the Autobuild fails above, remove it and uncomment the following three lines. + # - modify them (or add more) to build your code if your project, + # - please refer to the EXAMPLE below for guidance. + # + # ```{code-block} yaml + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + # ``` + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/conf.py b/conf.py index 8381d25..0b4634d 100644 --- a/conf.py +++ b/conf.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -"""Configuration file for the Sphinx documentation builder.""" -# +"""Configuration file for the Sphinx documentation builder. + # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html @@ -10,47 +10,85 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -# -import os +""" +import pathlib import sys -sys.path.insert(0, os.path.abspath('../..')) +sys.path.insert(0, str(pathlib.Path('.').resolve)) +sys.path.insert(0, str(pathlib.Path('./tests').resolve)) -# -- Project information ----------------------------------------------------- - -project = 'Panegyric' -copyright = '2021, Xander Harris' -author = 'Xander Harris' - +# -- Project information ---------------------------------------------------- # The full version, including alpha/beta/rc tags -release = 'v0.1.1' - +author = 'Xander Harris' +copyright = '2021, Xander Harris' -# -- General configuration --------------------------------------------------- +### +# ```{rubric} General configuration +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [".venv/*"] # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - "sphinx.ext.autodoc", - "sphinx.ext.autosummary", - "sphinx.ext.coverage", - "sphinx.ext.duration", - "sphinx.ext.intersphinx", - "sphinx.ext.linkcode", - "sphinx.ext.todo", + 'myst_parser', + 'sphinx_copybutton', + 'sphinx_design', + 'sphinx_git', + 'sphinx_last_updated_by_git', + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.coverage', + 'sphinx.ext.duration', + 'sphinx.ext.githubpages', + 'sphinx.ext.graphviz', + 'sphinx.ext.intersphinx', + 'sphinx.ext.linkcode', + 'sphinx.ext.todo', + 'sphinxcontrib.autoyaml', ] +# -- Options for HTML output ------------------------------------------------- -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = [] +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} - +# Add any paths that contain templates here, relative to this directory. +myst_enable_extensions = [ + "amsmath", + "attrs_block", + "attrs_inline", + "colon_fence", + "deflist", + "dollarmath", + "fieldlist", + "html_admonition", + "html_image", + "linkify", + "replacements", + "smartquotes", + "strikethrough", + "substitution", + "tasklist", +] +myst_footnote_transition = True +myst_title_to_header = True +project = 'Panegyric' +release = 'v0.1.1' +show_authors = True +source_suffix = { + '.md': 'markdown' +} +templates_path = ['_templates'] def linkcode_resolve(domain, info): """Resolve link code links.""" @@ -63,16 +101,3 @@ def linkcode_resolve(domain, info): path = 'github.com/edwardtheharris/panegyric/blob/main' url = f'https://{path}/{filename}.py' return url - - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = 'alabaster' - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..121fcbd --- /dev/null +++ b/docs/index.md @@ -0,0 +1,15 @@ +--- +abstract: API, usage, and other documentation for Panegyric. +authors: Xander Harris +date: 2024-03-12 +title: Panegyric Docs Index +--- + +```{toctree} +modules +panegyric +tests +``` + +```{sectionauthor} Xander Harris +``` diff --git a/index.md b/index.md index 35948c7..39768e5 100644 --- a/index.md +++ b/index.md @@ -1,26 +1,33 @@ -.. Panegyric documentation master file, created by +--- +abstract: >- + Panegyric documentation master file, created by sphinx-quickstart on Sat Sep 11 11:56:24 2021. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. +authors: Xander Harris +date: 2024-03-12 +title: Panegyric Documentation +--- -Welcome to Panegyric's documentation! -===================================== +If you feel like complimenting my wife via text, this is a great way to do it. -This is a tool that allows you to send nice texts once a day. +```{toctree} +:maxdepth: 2 +:caption: Documentation -.. toctree:: - :maxdepth: 2 - :caption: Contents: +docs/index +``` - modules - panegyric - tests +```{toctree} +:caption: Minutiae +license +readme +security +``` +## Indices and tables -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` +- {ref}`genindex` +- {ref}`modindex` +- {ref}`search` diff --git a/readme.md b/readme.md index 5a21376..a40cf35 100644 --- a/readme.md +++ b/readme.md @@ -1,12 +1,20 @@ -# panegyric +--- +abstract: The Panegyric Application's readme. +authors: Xander Harris +date: 2024-03-12 +title: Panegyric +--- -[![circle ci build status](https://circleci.com/gh/edwardtheharris/panegyric.svg?style=shield)](https://app.circleci.com/pipelines/github/edwardtheharris/panegyric) [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com) [![codecov](https://codecov.io/gh/edwardtheharris/panegyric/branch/main/graph/badge.svg?token=7D17IAT6L7)](https://codecov.io/gh/edwardtheharris/panegyric) [![wakatime](https://wakatime.com/badge/github/edwardtheharris/panegyric.svg)](https://wakatime.com/badge/github/edwardtheharris/panegyric) + +[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com) +[![codecov](https://codecov.io/gh/edwardtheharris/panegyric/branch/main/graph/badge.svg?token=7D17IAT6L7)](https://codecov.io/gh/edwardtheharris/panegyric) +[![wakatime](https://wakatime.com/badge/github/edwardtheharris/panegyric.svg)](https://wakatime.com/badge/github/edwardtheharris/panegyric) A tool for sending praise via text on a regular schedule. -## Usage +## Installation -Make sure you've got Python 3 installed with pipenv available. +Make sure you've got Python 3 installed with `pipenv`{l=shell} available. ```bash pip3 install pipenv diff --git a/s.md b/s.md new file mode 100644 index 0000000..0682a9f --- /dev/null +++ b/s.md @@ -0,0 +1,8 @@ +--- +abstract: A security policy, one day. +authors: Xander Harris +date: 2024-03-13 +title: Security Policy +--- + +## Don't do anything stupid diff --git a/security.md b/security.md index e69de29..0682a9f 100644 --- a/security.md +++ b/security.md @@ -0,0 +1,8 @@ +--- +abstract: A security policy, one day. +authors: Xander Harris +date: 2024-03-13 +title: Security Policy +--- + +## Don't do anything stupid