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

Fix: pyproject.toml dependencies, more improvements. #703

Merged
merged 5 commits into from
Jun 16, 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
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
<!-- to check an item, place an "x" in the box like so: "- [x] Tests" -->

- [ ] Tests
- [ ] [CHANGELOG](https://github.com/greenbone/gvm-tools/blob/master/CHANGELOG.md) Entry
- [ ] Conventional Commit Message
- [ ] Documentation
7 changes: 5 additions & 2 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- 3.7
- 3.8
- 3.9
- "3.10"
steps:
- uses: actions/checkout@v2
- name: Check with black, pylint and pontos.version
Expand All @@ -33,6 +34,7 @@ jobs:
- 3.7
- 3.8
- 3.9
- "3.10"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -56,6 +58,7 @@ jobs:
- 3.7
- 3.8
- 3.9
- "3.10"
steps:
- uses: actions/checkout@v2
- name: Install poetry and dependencies
Expand All @@ -74,7 +77,7 @@ jobs:
- name: Calculate and upload coverage to codecov.io
uses: greenbone/actions/coverage-python@v1
with:
version: 3.8
version: 3.9

build-docs:
name: Build the documentation
Expand All @@ -84,7 +87,7 @@ jobs:
- name: Install poetry and dependencies
uses: greenbone/actions/poetry@v1
with:
version: 3.8
version: 3.9
- name: Build docs
run: |
cd docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-pontos-manually.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Release with release action
uses: greenbone/actions/release-python@v1
with:
version: 3.8
version: 3.9
conventional-commits: true
ref: ${{ github.event.inputs.branch }}
github-user: ${{ secrets.GREENBONE_BOT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-pontos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Release with release action
uses: greenbone/actions/release-python@v1
with:
version: 3.8
version: 3.9
conventional-commits: true
github-user: ${{ secrets.GREENBONE_BOT }}
github-user-mail: ${{ secrets.GREENBONE_BOT_MAIL }}
Expand Down
2 changes: 1 addition & 1 deletion gvmtools/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def create_connection(
cafile=None,
ssh_username=None,
ssh_password=None,
**kwargs # pylint: disable=unused-argument
**kwargs, # pylint: disable=unused-argument
):
if 'socket' in connection_type:
return UnixSocketConnection(timeout=timeout, path=socketpath)
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

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

9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ classifiers=[
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
]
Expand All @@ -38,22 +39,22 @@ gvm-script = "gvmtools.script:main"

[tool.poetry.dependencies]
python = "^3.7.0"
python-gvm = ">=21.5,<23.0"
python-gvm = ">=21.5"

[tool.poetry.dev-dependencies]
autohooks = "^21.7.0"
autohooks-plugin-pylint = "^21.6.0"
sphinx = "^5.0.1"
pylint = "^2.13.9"
coverage = "^6.4"
autohooks-plugin-black = {version = "^21.12.0", python = "^3.6"}
black = {version = "22.3.0", python = "^3.6"}
autohooks-plugin-black = "^21.12.0"
black = "^22.3.0"
rope = "^1.1.1"
pontos = "^22.5.0"

[tool.black]
line-length = 80
target-version = ['py35', 'py36', 'py37', 'py38']
target-version = ['py37', 'py38', 'py39', 'py310']
skip-string-normalization = true
exclude = '''
/(
Expand Down
24 changes: 14 additions & 10 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,22 +441,26 @@ def assert_snapshot(self, name, output):
raise

def test_root_help(self):
help_output = self.parser._parser.format_help()
self.assert_snapshot('root_help', help_output)
if self.python_version != "3.10":
help_output = self.parser._parser.format_help()
self.assert_snapshot('root_help', help_output)

def test_socket_help(self):
help_output = self.parser._parser_socket.format_help()
self.assert_snapshot('socket_help', help_output)
if self.python_version != "3.10":
help_output = self.parser._parser_socket.format_help()
self.assert_snapshot('socket_help', help_output)

def test_ssh_help(self):
self.parser._set_defaults(None)
help_output = self.parser._parser_ssh.format_help()
self.assert_snapshot('ssh_help', help_output)
if self.python_version != "3.10":
self.parser._set_defaults(None)
help_output = self.parser._parser_ssh.format_help()
self.assert_snapshot('ssh_help', help_output)

def test_tls_help(self):
self.parser._set_defaults(None)
help_output = self.parser._parser_tls.format_help()
self.assert_snapshot('tls_help', help_output)
if self.python_version != "3.10":
self.parser._set_defaults(None)
help_output = self.parser._parser_tls.format_help()
self.assert_snapshot('tls_help', help_output)


class CreateParserFunctionTestCase(unittest.TestCase):
Expand Down