Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helper tooling #16

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ jobs:
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material[imaging]
- run: pip install -r requirements/docs-requirements.txt
- run: mkdocs gh-deploy --force
31 changes: 0 additions & 31 deletions .github/workflows/schema.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
tox:
name: Run Tox
steps:
- uses: actions/checkout@v2
- name: Run all envs
uses: fedora-python/tox-github-action@main
with:
tox_env: ${{ matrix.tox_env }}
strategy:
matrix:
tox_env: [black, ruff, schema]
runs-on: ubuntu-latest
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.cache
*.egg-info/
.tox
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
# security-data-guidelines
A set of documents detailing Red Hat's publishing of security data.


## Docs Development

To run a locally served docs site, run:

```
python3 -m venv venv
source venv/bin/activate
pip install -r requirements/docs-requirements.txt
mkdocs serve
```
16 changes: 9 additions & 7 deletions docs/purl.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,12 @@ that present different sets of qualifiers may still point to the same object. A
understanding this concept that is worth quoting here can be found in
[issue #242](https://github.com/package-url/purl-spec/issues/242) in the purl-spec:

> Each package type is like a country or state and defines how you can identify and locate a place reasonably
> uniquely. Uniquely enough that the post can deliver the mail. In a city with well[-]defined streets and street
> numbers, you get a precise location with the street name and number and may be an apartment number. In some cases
> you may want the address for a single person with its name, or the whole household. If someone is off the grid in
> the bayou or some isolated mountain, crafting a proper address may be more hairy and fuzzy. Worst case I may need
> GPS coordinates for these edge cases. I may also have many different ways to write an address or a name. Heck,
> some folks also live in orbit on the ISS and GPS will not work there!
!!! quote

_Each package type is like a country or state and defines how you can identify and locate a place reasonably
uniquely. Uniquely enough that the post can deliver the mail. In a city with well-defined streets and street
numbers, you get a precise location with the street name and number and may be an apartment number. In some cases
you may want the address for a single person with its name, or the whole household. If someone is off the grid in
the bayou or some isolated mountain, crafting a proper address may be more hairy and fuzzy. Worst case I may need
GPS coordinates for these edge cases. I may also have many different ways to write an address or a name. Heck,
some folks also live in orbit on the ISS and GPS will not work there!_
13 changes: 9 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
site_name: Red Hat Security Data Guidelines
site_url: https://redhatproductsecurity.github.io/security-data-guidelines/
edit_uri: "https://github.com/RedHatProductSecurity/security-data-guidelines/blob/main/docs"
copyright: Copyright &copy; Red Hat, Inc. &nbsp;&centerdot;&nbsp; <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>

theme:
name: material
Expand All @@ -12,7 +13,7 @@ theme:
- search.suggest
- search.highlight
- content.tabs.link
- content.code.annotation
- content.code.annotate
- content.code.copy
- content.action.view
language: en
Expand Down Expand Up @@ -46,12 +47,16 @@ extra:
link: "mailto:[email protected]"

markdown_extensions:
- pymdownx.highlight:
linenums: true
anchor_linenums: true
- pymdownx.highlight
- pymdownx.inlinehilite # https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/?h=snippets#inlinehilite
- pymdownx.snippets # https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/?h=snippets#snippets
- admonition # https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown/?h=#admonition
- footnotes # https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown/?h=#footnotes
- attr_list
- abbr # https://squidfunk.github.io/mkdocs-material/reference/tooltips/#adding-abbreviations
- md_in_html
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- toc:
permalink: 🔗 # Add anchor to each title element
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[tool.black]
line-length = 100

[tool.ruff]
line-length = 100

[tool.ruff.lint]
# https://beta.ruff.rs/docs/rules/
select = ["F", "E", "W", "I", "N"]
3 changes: 3 additions & 0 deletions requirements/dev-requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
black
check-jsonschema
ruff
Loading
Loading