Skip to content

Commit

Permalink
Merge pull request #52 from gardenlinux/rename-cli
Browse files Browse the repository at this point in the history
Rename glvd to glvd-data
  • Loading branch information
waldiTM authored Dec 18, 2023
2 parents 9842c52 + 88d39c3 commit 0cdef76
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ packages = [
]

[tool.poetry.scripts]
glvd = 'glvd.cli.__main__:main'
glvd-data = 'glvd.cli.data.__main__:main'

[tool.poetry.dependencies]
python = ">=3.11"
Expand Down
8 changes: 8 additions & 0 deletions src/glvd/cli/data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: MIT

from __future__ import annotations

from ..registry import CliRegistry


cli = CliRegistry()
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
create_async_engine,
)

from ..database import Base, AllCve
from glvd.database import Base, AllCve
from . import cli


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
create_async_engine,
)

from ..database import Base, DistCpe, DebCve
from ..data.cpe import Cpe, CpeOtherDebian
from ..data.cvss import CvssSeverity
from glvd.database import Base, DistCpe, DebCve
from glvd.data.cpe import Cpe, CpeOtherDebian
from glvd.data.cvss import CvssSeverity
from . import cli


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
create_async_engine,
)

from ..database import Base, DistCpe, DebsecCve
from ..data.debsec_cve import DebsecCveFile
from ..data.dist_cpe import DistCpeMapper
from glvd.database import Base, DistCpe, DebsecCve
from glvd.data.debsec_cve import DebsecCveFile
from glvd.data.dist_cpe import DistCpeMapper
from . import cli


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
create_async_engine,
)

from ..database import Base, DistCpe, Debsrc
from ..data.debsrc import DebsrcFile
from ..data.dist_cpe import DistCpeMapper
from glvd.database import Base, DistCpe, Debsrc
from glvd.data.debsrc import DebsrcFile
from glvd.data.dist_cpe import DistCpeMapper
from . import cli


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
create_async_engine,
)

from ..database import Base, NvdCve
from ..util import requests
from glvd.database import Base, NvdCve
from glvd.util import requests
from . import cli


Expand Down
5 changes: 1 addition & 4 deletions src/glvd/cli/__init__.py → src/glvd/cli/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class _ActionWrapper:
kw: dict


class Cli:
class CliRegistry:
parser: argparse.ArgumentParser
subparsers: argparse._SubParsersAction

Expand Down Expand Up @@ -78,6 +78,3 @@ def main(self) -> None:
func(**v)
else:
self.parser.print_help()


cli = Cli()
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from sqlalchemy import select

from glvd.cli.combine_deb import CombineDeb
from glvd.cli.data.combine_deb import CombineDeb
from glvd.data.cvss import CvssSeverity
from glvd.data.dist_cpe import DistCpeMapper
from glvd.database import DistCpe, DebCve, DebsecCve, Debsrc, NvdCve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from sqlalchemy import select

from glvd.cli.ingest_debsec import IngestDebsec
from glvd.cli.data.ingest_debsec import IngestDebsec
from glvd.database import DebsecCve
from glvd.data.debsec_cve import DebsecCveFile

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from sqlalchemy import select

from glvd.cli.ingest_debsrc import IngestDebsrc
from glvd.cli.data.ingest_debsrc import IngestDebsrc
from glvd.database import Debsrc
from glvd.data.debsrc import DebsrcFile

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from sqlalchemy import select

from glvd.cli.ingest_nvd import IngestNvd
from glvd.cli.data.ingest_nvd import IngestNvd
from glvd.database import NvdCve


Expand Down

0 comments on commit 0cdef76

Please sign in to comment.