Skip to content

Commit

Permalink
Updating readme to use of make, adding pytest, empty for now
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-echeverria committed Nov 22, 2024
1 parent 4d0168a commit 4656bf2
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 12 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To set up additional external tools that are used:
* Run `diffoscope --list-tools` for a full list. Also, the Dockerfile
should install all of them.

Note that it is much simpler to run Vessel in a Docker container, which already contains all these dependencies. See [Docker Setup](#docker).
Note that it is much simpler to run Vessel in a Docker container, which already contains all these dependencies. See [Docker Setup](#docker-setup).

### Docker Setup

Expand Down Expand Up @@ -65,14 +65,19 @@ Example running on two images from a private Docker registry:

## Development

To lint the code, execute:
* `ruff check`
Follow the instructions at [Local Environment Setup](#local-environment-setup) first to set up your local environment.

To apply the safe lint fixes, execute:
* `ruff check --fix`
To lint the code, and check for format and type issues, execute:
* `make check`

To format the code, execute:
* `ruff format`
To apply the safe lint fixes, and format fixes, execute:
* `make qa`

To run unit tests, execute:
* `make test`

To run all the above, execute:
* `make ci`

### Building

Expand Down
48 changes: 47 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ ruff = "^0.7.4"
mypy = "^1.13.0"
types-PyYAML = "^6.0.12"
actionlint-py = "^1.7.4.18"
pytest = "^7.3.1"

[build-system]
requires = ["poetry-core"]
Expand Down
Empty file added test/__init__.py
Empty file.
7 changes: 4 additions & 3 deletions vessel/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def vessel(logging_level: str) -> None:
resolve_path=True,
),
help=(
"Specify a data directory for unpacking the images. Default: Create a temporary directory that is "
"auto-deleted."
"Specify a data directory for unpacking the images. Default: Create a "
"temporary directory that is auto-deleted."
),
)
@click.option(
Expand All @@ -93,7 +93,8 @@ def vessel(logging_level: str) -> None:
resolve_path=True,
),
help=(
"Specify a output directory for diffoscope output. Default: Stores in current directory."
"Specify a output directory for diffoscope output. Default: Stores "
"in current directory."
),
)
def diff(
Expand Down
3 changes: 2 additions & 1 deletion vessel/utils/diffoscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ def parse_diffoscope_output(
(
diff.comments != []
and not any(
flag.regex["comment"].search(comment) for comment in diff.comments
flag.regex["comment"].search(comment)
for comment in diff.comments
)
)
or (
Expand Down

0 comments on commit 4656bf2

Please sign in to comment.