Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.
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
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,22 @@ jobs:
Packages uploaded to ${{ inputs.repository }}
\`\`\`
pip install${INDEX} defectdojo-api-generated==${{ inputs.version }}
pip install${INDEX} defectdojo-api-generated-cli==${{ inputs.version }}
pip install${INDEX} defectdojo-cli==${{ inputs.version }}
\`\`\`
EOF
if [ "${{ inputs.repository }}" != "pypi" ]; then
cat <<EOF >> ${GITHUB_STEP_SUMMARY}
Run with \`uvx\`
\`\`\`
uvx --with 'defectdojo-api-generated @ https://test-files.pythonhosted.org/packages/source/d/defectdojo-api-generated/defectdojo_api_generated-${{ inputs.version }}.tar.gz' \\
'defectdojo-api-generated-cli @ https://test-files.pythonhosted.org/packages/source/d/defectdojo-api-generated-cli/defectdojo_api_generated_cli-${{ inputs.version }}.tar.gz'
'defectdojo-cli @ https://test-files.pythonhosted.org/packages/source/d/defectdojo-cli/defectdojo_cli-${{ inputs.version }}.tar.gz'
\`\`\`
EOF
else
cat <<EOF >> ${GITHUB_STEP_SUMMARY}
Run with \`uvx\`
\`\`\`
uvx defectdojo-api-generated-cli==${{ inputs.version }}
uvx defectdojo-cli==${{ inputs.version }}
\`\`\`
EOF
fi
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ Multiple changes done on top of default openapi-generator:
* Remove most of pydantic/schema validations due to inconsistencies with actual database schema/requirements (tracked in https://github.com/fopina/defectdojo-api-generated/issues/39)
* *Iterator* methods for every *list* API method to handle pagination automatically
* A nice CLI exposing all the API methods <3
* published as a separate package, to keep library-only installs free of console-script conflicts
* published as `defectdojo-cli`, a separate package to keep library-only installs free of console-script conflicts

## Example

### Library

```
pip install defectojo-api-generated
pip install defectdojo-api-generated
```

<!-- example-id: example.py -->
Expand All @@ -49,7 +49,7 @@ pip install defectojo-api-generated
> [uv](https://docs.astral.sh/uv/) recommended or [pipx](https://github.com/pypa/pipx)

```
uv tool install defectdojo-api-generated-cli
uv tool install defectdojo-cli
```

```
Expand All @@ -69,7 +69,7 @@ Commands:
You can also skip tool install and just run it with:

```
$ uvx defectdojo-api-generated-cli
$ uvx defectdojo-cli
Usage: dojo [OPTIONS] COMMAND [ARGS]...
...
```
Expand Down
2 changes: 1 addition & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This page provides documentation for the command line tool `dojo`.
> [uv](https://docs.astral.sh/uv/) recommended or [pipx](https://github.com/pypa/pipx)

```
uv tool install 'defectojo-api-generated[cli]'
uv tool install defectdojo-cli
```

::: mkdocs-click
Expand Down
8 changes: 6 additions & 2 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# defectdojo-api-generated-cli
# defectdojo-cli

Thin CLI wrapper distribution for [`defectdojo-api-generated`](https://pypi.org/project/defectdojo-api-generated/).
CLI for [DefectDojo](https://github.com/DefectDojo/django-DefectDojo) using
[`defectdojo-api-generated`](https://pypi.org/project/defectdojo-api-generated/).

This package owns the `dojo` console entrypoint and pulls in the optional CLI dependencies.

Documentation is available at
<https://defectdojo-api-generated.readthedocs.io/en/latest/cli/>.
4 changes: 2 additions & 2 deletions packages/cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=69.5.0,<80.0.0"]
build-backend = "setuptools.build_meta"

[project]
name = "defectdojo-api-generated-cli"
name = "defectdojo-cli"
version = "1.0.0"
description = "CLI wrapper for defectdojo-api-generated"
readme = "README.md"
Expand All @@ -16,7 +16,7 @@ dependencies = [

[project.scripts]
dojo = "defectdojo_api_generated.cli.__main__:main"
defectdojo-api-generated-cli = "defectdojo_api_generated.cli.__main__:main"
defectdojo-cli = "defectdojo_api_generated.cli.__main__:main"

[project.urls]
Homepage = "https://github.com/fopina/defectdojo-api-generated"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_cli_distribution_points_console_scripts_to_library_entrypoint(self):
pyproject['project']['scripts'],
{
'dojo': 'defectdojo_api_generated.cli.__main__:main',
'defectdojo-api-generated-cli': 'defectdojo_api_generated.cli.__main__:main',
'defectdojo-cli': 'defectdojo_api_generated.cli.__main__:main',
},
)

Expand Down
Loading