Skip to content

Commit

Permalink
Add a "usage" session to nox (#2022)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLaPiana authored Dec 13, 2022
1 parent aaf1376 commit 2eef8f0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
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

0 comments on commit 2eef8f0

Please sign in to comment.