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 a "usage" session to nox #2022

Merged
merged 5 commits into from
Dec 13, 2022
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
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ The types of changes are:

## [Unreleased](https://github.com/ethyca/fides/compare/2.2.2...main)


## [2.2.2](https://github.com/ethyca/fides/compare/2.2.1...2.2.2)

### Docs

* Updated the readme to use new new [docs site](http://docs.ethyca.com) [#2020](https://github.com/ethyca/fides/pull/2020)

### Deprecated

* The documentation site hosted in the `/docs` directory has been deprecated. All documentation updates will be hosted at the new [docs site](http://docs.ethyca.com) [#2020](https://github.com/ethyca/fides/pull/2020)

### Fixed
Expand All @@ -32,12 +33,12 @@ The types of changes are:
* Update connection test endpoint to be effectively non-blocking [#2000](https://github.com/ethyca/fides/pull/2000)
* Update Fides connector to better handle children with no access results [#2012](https://github.com/ethyca/fides/pull/2012)


## [2.2.1](https://github.com/ethyca/fides/compare/2.2.0...2.2.1)

### Added

* Add health check indicator for data flow scanning option [#1973](https://github.com/ethyca/fides/pull/1973)
* Add a `usage` session to Nox to print full session docstrings. [#2022](https://github.com/ethyca/fides/pull/2022)

### Changed

Expand Down
17 changes: 17 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@
nox.options.reuse_existing_virtualenvs = True


@nox.session()
def usage(session: nox.Session) -> None:
"""Prints the documentation for a nox session provided: `nox -s usage -- <session>`."""

if not session.posargs:
session.error("Please provide a session name, such as `clean`")

command = session.posargs[0]

if not command in globals():
session.error(
"Sorry, this isn't a valid nox session.\nExamples: `clean`, `build`, `pytest_ctl`"
)

session.log(globals()[command].__doc__)


def check_for_env_file() -> None:
"""Create a .env file if none exists."""
env_file_example = "example.env"
Expand Down