Skip to content

Commit

Permalink
docs!
Browse files Browse the repository at this point in the history
  • Loading branch information
raddessi committed Jan 27, 2024
1 parent 1da60f1 commit e9683e0
Show file tree
Hide file tree
Showing 22 changed files with 342 additions and 178 deletions.
8 changes: 4 additions & 4 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changes here will be overwritten by Copier
_commit: v1.5.0
_src_path: /home/raddessi/dev/spotx/copier-python
_src_path: /home/raddessi/dev/copier-python
author_email: [email protected]
author_fullname: Ryan Addessi
author_username: raddessi
Expand All @@ -9,12 +9,12 @@ copyright_holder: Ryan Addessi
copyright_license: BSD 2-Clause 'Simplified' License
friendly_name: salt-gnupg-rotate
github_actions_runner_type: GitHub-hosted
include_click_code_examples: true
include_click_code_examples: false
include_logger: true
include_logger_code_examples: false
include_logger_file_handler: true
include_logger_file_handler: false
include_logger_stdout_handler: true
include_logger_syslog_handler: true
include_logger_syslog_handler: false
include_main_dunder: false
include_main_entrypoint: true
max_python_version: "3.10"
Expand Down
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
BSD 2-Clause License

Copyright (c) 2024, Ryan Addessi
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,28 @@

# salt-gnupg-rotate

Easily rotate gnupg encryption keys
Easily rotate gnupg encrypted data blocks in files 🧂

<!-- Fill this in -->
## About

This project was created to help with the rotation of secret keys on saltstack controllers. Like probably at least some of you I am bad at rotating encryption keys due to the effort and time required. This tool is meant to make that task quick and painless.


## Documentation

Prebuilt zip files of the
[project documentation](https://github.com/raddessi/salt-gnupg-rotate/tree/main/docs)
are available for download from the
[Releases](https://github.com/raddessi/salt-gnupg-rotate/releases) page.


## Features

<!-- Fill this in -->
* It's fast! Rotate your keys in seconds
* Encrypted blocks are updated in-place in your files, keeping surrounding context and current indentation
* `--log-level trace` level logging will show you the decrypted block contents as well as the re-encrypted blocks for you to manually validate the changed before applying them
* If the `--write` flag is not given then no changes will be made


## Discussion

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Supported Versions

Here is a list of the release versions that should and should not be receiving
Here are the release versions that are currently supported and should be receiving
security updates:

| Version | Supported |
Expand Down
20 changes: 9 additions & 11 deletions docs/about.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# About these docs

<!--
The layout here is based on the system outlined at
[https://documentation.divio.com/](https://documentation.divio.com/).
-->

## How the documentation is organized

- [Tutorials](./tutorials/index) take you through the steps to complete
scenarios like using this project template to create a new project
- [Tutorials](./tutorials/index) contains lessons that take the reader through a series
of steps to complete a project of some kind
- [Topic guides](./topic-guides/index) discuss key topics and concepts at a
fairly high level and provide useful background information and explanation.
- [Reference guides](./reference-guides/index) contain technical reference
Expand All @@ -13,12 +20,3 @@
steps involved in addressing key problems and use-cases. They are more
advanced than tutorials and assume some knowledge of how the application
works.

## Documentation style

The layout here is based on the system outlined at
[https://documentation.divio.com/](https://documentation.divio.com/).

---

See [](../how-to-guides/building-documentation) for how to build the docs.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
author = "Ryan Addessi"
copyright = f"{datetime.now().year}, {author}" # pylint: disable=redefined-builtin


autodoc_typehints = "description"
autosectionlabel_maxdepth = 1
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
Expand Down
6 changes: 3 additions & 3 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Contributions are welcome, and they are greatly appreciated!
Contributions are welcome and greatly appreciated!

- It's recommended to file a bug before starting work on anything. It will give
a chance to talk it over with the owners and validate your approach.
Expand All @@ -11,6 +11,6 @@ Thank you for helping improve the project!

Some useful documentation to check out:

- [](tutorials/setting-up-for-development)
- [](tutorials/running-tests)
- [](how-to-guides/setting-up-for-development)
- [](how-to-guides/running-tests)
- [](how-to-guides/building-documentation)
20 changes: 13 additions & 7 deletions docs/how-to-guides/building-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@ the docs one-time if you want to get a static build for deployment, or you can
start up a server to auto build the documentation when any of the source files
are modified.

## Building documentation
```{note}
This tutorial assumes you have already followed the [](setting-up-for-development)
steps to set up for developing this project.
```

## Building static documentation

To only generate the documentation:
To generate a static copy of the documentation:

```bash
nox -s docs-build
```

## Serving documentation
The generated documentation will be placed in the `docs/_build` directory.

## Live-view documentation

To build and serve the documentation via `sphinx-autobuild` while rebuilding any
modified documents dynamically:
To view the documentation live in your browser while editing it you can run:

```bash
nox -s docs
```

A browser window will be opened to the sphinx server so you can view changes
live :)
A browser window will be opened to the sphinx server so you can view updates
dynamically
12 changes: 11 additions & 1 deletion docs/how-to-guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@ These guides are recipes. They guide you through the steps involved in
addressing key problems and use-cases. They are more advanced than tutorials and
assume some knowledge of how the application works.

## For developing/maintaining this project
- [](setting-up-for-development) Takes you through the setup of any dependencies
you would need to work on this project
- [](running-tests) Shows how to run the test suites
- [](building-documentation) Shows how to build and modify the project documentation


```{toctree}
:maxdepth: 2
:hidden: true
setting-up-for-development
running-tests
building-documentation
troubleshooting
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Here we will run the test suite for the `salt-gnupg-rotate` project.

```{note}
This tutorial assumes you have already followed the [](setting-up-for-development)
tutorial to set up for using this project.
steps to set up for developing this project.
```

## Running all the test suites
Expand All @@ -14,3 +14,16 @@ To run all of the test suites:
```bash
nox
```

## Running a specific test suite
List out the available nox test suites:

```bash
nox -s
```

Select the suite you would like to run from the list of available suites and run it with:

```bash
nox -s <suite name>
```
36 changes: 36 additions & 0 deletions docs/how-to-guides/setting-up-for-development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Setting Up for Development

Here we will set up your system to develop this project.

## Install dependencies

You will need the following python modules installed on your system:

- `poetry`
- `nox`
- `nox-poetry`

````{tab} pip
```bash
pip install poetry nox nox-poetry
```
````

You will also need either `conda` or `mamba` for virtual environment management.
I am partial to miniforge myself but any flavor should work.

```{tab} Miniforge
See the Miniforge [README](https://github.com/conda-forge/miniforge)
```

````{tab} Fedora
```bash
sudo dnf install conda
```
````

Once these are installed you should be good to go.

---

See [](running-tests) for how to run the test suite. nox nox-poetry
3 changes: 0 additions & 3 deletions docs/how-to-guides/troubleshooting.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/reference-guides/salt-gnupg-rotate.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
API Reference
CLI Reference
=============

.. click:: salt_gnupg_rotate.cli:cli
Expand Down
5 changes: 3 additions & 2 deletions docs/topic-guides/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Topic Guides

These guides should discuss key topics and concepts at a fairly high level and
Nothing here at the moment :/

These guides discuss key topics and concepts at a fairly high level and
provide useful background information and explanation.

```{toctree}
:maxdepth: 2
md-vs-rst-examples/examples
```
46 changes: 0 additions & 46 deletions docs/topic-guides/md-vs-rst-examples/example_markdown.md

This file was deleted.

42 changes: 0 additions & 42 deletions docs/topic-guides/md-vs-rst-examples/example_restructuredtext.rst

This file was deleted.

Loading

0 comments on commit e9683e0

Please sign in to comment.