Skip to content
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
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
indent_size = 2
indent_style = space

[LICENSE.txt]
insert_final_newline = false

Expand Down
21 changes: 21 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
groups:
actions:
patterns:
- "*"
schedule:
# Check for updates to GitHub Actions every month
interval: monthly
- package-ecosystem: pip
directory: "/"
groups:
pip:
patterns:
- "*"
schedule:
# Check for updates to GitHub Actions every month
interval: monthly
21 changes: 0 additions & 21 deletions .github/dependabot.yml

This file was deleted.

10 changes: 2 additions & 8 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: "checks"
name: checks
permissions:
contents: read
pull-requests: read

"on":
pull_request:
branches:
- "main"
- main

jobs:
conventional-commits:
Expand All @@ -19,13 +19,7 @@ jobs:
uses: broadinstitute/shared-workflows/.github/workflows/pre-commit.yaml@v5.0.1
linting:
uses: broadinstitute/shared-workflows/.github/workflows/python-lint.yaml@v5.0.1
with:
ruff_version: '0.8.6'
use_pylama: false
use_ruff: true
unit-tests:
uses: broadinstitute/shared-workflows/.github/workflows/python-unit-test.yaml@v5.0.1
with:
python_package_name: pysudoers
run_coverage: false
test_runner: pytest
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "deploy"
name: deploy
permissions:
contents: read
pull-requests: read
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: "test_deploy"
name: test_deploy
permissions:
contents: read
pull-requests: read
"on":
pull_request:
branches:
- "main"
- main

jobs:
pypi_test_deploy:
Expand Down
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"proseWrap": "always",
"trailingComma": "es5"
}
37 changes: 18 additions & 19 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ compliant with the EBNF format of the file (yet), but it's getting there.
Currently, the script parses out 6 distinct line types from the file:

- Defaults (This is only a string currently. Pieces of a Defaults setting are
not parsed/separated.)
not parsed/separated.)
- Cmnd_Alias
- Host_Alias
- Runas_Alias
Expand All @@ -36,8 +36,8 @@ specification are separated out as part of the parsing:

One caveat to add is, this module currently does not do anything with
`#include`, `#includedir`, `@include` and `@includedir` lines, but simply
ignores them. You can, however, parse any included files individually if
needed, but any interdependencies between the files will not be resolved.
ignores them. You can, however, parse any included files individually if needed,
but any interdependencies between the files will not be resolved.

## Installing

Expand All @@ -50,8 +50,8 @@ pip install pysudoers
## Examples

Parsing of the `sudoers` file is done as part of initializing the `Sudoers`
object. So, you can start using the properties under `Sudoers` immediately.
The following example will print out all the different "types" from the file:
object. So, you can start using the properties under `Sudoers` immediately. The
following example will print out all the different "types" from the file:

```Python
from pysudoers import Sudoers
Expand Down Expand Up @@ -95,18 +95,17 @@ for rule in sobj.rules:

## Contributing

Pull requests to add functionality and fix bugs are always welcome. Please
check the CONTRIBUTING.md for specifics on contributions.
Pull requests to add functionality and fix bugs are always welcome. Please check
the CONTRIBUTING.md for specifics on contributions.

### Testing

We try to have a high level of test coverage on the code. Therefore, when
adding anything to the repo, tests should be written to test a new feature or
to test a bug fix so that there won't be a regression. This library is setup to
be pretty simple to build a working development environment using [Docker][3]
or [Podman][6]. Therefore, it is suggested that you have [Docker][3] or
[Podman][6] installed where you clone this repository to make development
easier.
We try to have a high level of test coverage on the code. Therefore, when adding
anything to the repo, tests should be written to test a new feature or to test a
bug fix so that there won't be a regression. This library is setup to be pretty
simple to build a working development environment using [Docker][3] or
[Podman][6]. Therefore, it is suggested that you have [Docker][3] or [Podman][6]
installed where you clone this repository to make development easier.

To start a development environment, you should be able to just run the `dev.sh`
script. This script will use the `Containerfile` in this repository to build a
Expand All @@ -131,11 +130,11 @@ Changelogs are now created as part of the GitHub release process.
## Versioning

Updating the version is typically done using the [bump2version][5] tool. This
tool takes care of updating the version in all necessary files, updating its
own configuration, and making a GitHub commit and tag. We typically do version
bumps as part of a PR, so you don't want to have [bump2version][5] tag the
version at the same time it does the commit as commit hashes may change.
Therefore, to bump the version a patch level, one would run the command:
tool takes care of updating the version in all necessary files, updating its own
configuration, and making a GitHub commit and tag. We typically do version bumps
as part of a PR, so you don't want to have [bump2version][5] tag the version at
the same time it does the commit as commit hashes may change. Therefore, to bump
the version a patch level, one would run the command:

```Shell
bump2version --verbose --no-tag patch
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml → mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
site_name: 'python-sudoers Documentation'
site_name: python-sudoers Documentation

nav:
- Home: README.md
Expand Down
Loading