Skip to content

Commit 0ae9c80

Browse files
authored
Merge pull request #44 from dbrennand/1.1.1
1.1.1
2 parents ed564c3 + 2244465 commit 0ae9c80

11 files changed

Lines changed: 471 additions & 1032 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,15 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Check out repository
11-
uses: actions/checkout@v4
11+
uses: actions/checkout@v6
1212

13-
- name: Set up Python
14-
id: setup-python
15-
uses: actions/setup-python@v5
16-
with:
17-
python-version: 3.12
18-
19-
- name: Load cached Poetry installation
20-
id: cached-poetry
21-
uses: actions/cache@v3
22-
with:
23-
path: ~/.local
24-
key: poetry-0
25-
26-
- name: Install Poetry
27-
if: steps.cached-poetry.outputs.cache-hit != 'true'
28-
uses: snok/install-poetry@v1
29-
with:
30-
virtualenvs-create: true
31-
virtualenvs-in-project: true
32-
installer-parallel: true
13+
- name: Install uv
14+
uses: astral-sh/setup-uv@v7
3315

34-
- name: Load cached venv
35-
id: cached-poetry-dependencies
36-
uses: actions/cache@v3
37-
with:
38-
path: .venv
39-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
40-
41-
- name: Install dependencies if cache does not exist
42-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
43-
run: poetry install --no-interaction --no-root
44-
45-
- name: Install library
46-
run: poetry install --no-interaction
16+
- name: Set up Python
17+
run: uv python install
4718

48-
- name: Run tests
19+
- name: Run linter and tests
4920
run: |
50-
source .venv/bin/activate
51-
black . --check
52-
pytest tests/ --cov=virustotal_python
21+
uv run black . --check
22+
uv run pytest tests/ --cov=virustotal_python

.github/workflows/publish.yml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,26 @@ on:
55
- "*.*.*"
66

77
jobs:
8-
Publish:
8+
publish:
99
if: github.repository == 'dbrennand/virustotal-python' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
1010
runs-on: ubuntu-latest
11+
environment:
12+
name: publish
13+
permissions:
14+
id-token: write
15+
contents: read
1116
steps:
12-
- name: Check out repository
13-
uses: actions/checkout@v4
17+
- name: Checkout
18+
uses: actions/checkout@v6
1419

15-
- name: Set up Python
16-
uses: actions/setup-python@v5
17-
with:
18-
python-version: 3.12
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v7
1922

20-
- name: Load cached Poetry installation
21-
id: cached-poetry
22-
uses: actions/cache@v3
23-
with:
24-
path: ~/.local
25-
key: poetry-0
23+
- name: Install Python
24+
run: uv python install
2625

27-
- name: Install Poetry
28-
if: steps.cached-poetry.outputs.cache-hit != 'true'
29-
uses: snok/install-poetry@v1
26+
- name: Build
27+
run: uv build
3028

31-
- name: Configure Poetry
32-
run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}"
33-
34-
- name: Publish virustotal-python
35-
run: poetry publish --build
29+
- name: Publish
30+
run: uv publish

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 1.1.1
4+
5+
* chore(deps): Update all dependencies.
6+
* chore: update license year.
7+
* chore: ci maintenance.
8+
* chore: migrate to uv instead of poetry.
9+
310
## 1.1.0
411

512
* chore(deps): Update all dependencies.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Daniel Brennand
3+
Copyright (c) 2026 Daniel Brennand
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,11 @@ with virustotal_python.Virustotal("<VirusTotal API Key>") as vtotal:
135135

136136
### Unit Tests
137137

138-
Install the development dependencies using Poetry:
139-
140-
```bash
141-
poetry install && poetry shell
142-
```
143-
144138
To run the unit tests, run `pytest` from the root of the project:
145139

146140
```bash
147-
pytest --cov=virustotal_python
141+
uv sync --dev
142+
uv run pytest --cov=virustotal_python
148143
```
149144

150145
### Publishing a new release

poetry.lock

Lines changed: 0 additions & 936 deletions
This file was deleted.

pyproject.toml

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
[tool.poetry]
1+
[project]
22
name = "virustotal-python"
3-
version = "1.1.0"
3+
version = "1.1.1"
44
description = "A Python library to interact with the public VirusTotal v3 and v2 APIs."
5-
authors = ["dbrennand"]
6-
license = "MIT"
5+
authors = [{ name = "dbrennand" }]
6+
requires-python = ">=3.12"
77
readme = "README.md"
8-
homepage = "https://github.com/dbrennand/virustotal-python"
9-
repository = "https://github.com/dbrennand/virustotal-python"
8+
license = "MIT"
109
keywords = [
1110
"VirusTotal",
1211
"Wrapper",
1312
"Public API",
1413
"Library",
1514
"v3",
16-
"v2"
15+
"v2",
1716
]
1817
classifiers = [
1918
"Programming Language :: Python :: 3",
@@ -23,25 +22,34 @@ classifiers = [
2322
"Programming Language :: Python :: 3.10",
2423
"Programming Language :: Python :: 3.11",
2524
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
26+
]
27+
dependencies = [
28+
"requests>=2.32.5",
2629
]
27-
exclude = [".gitignore"]
2830

29-
[tool.poetry.dependencies]
30-
python = "^3.12"
31-
requests = { version = "^2.31.0" }
32-
PySocks = { version = "^1.7.1", optional = true }
31+
[project.optional-dependencies]
32+
socks = ["PySocks>=1.7.1"]
3333

34-
[tool.poetry.extras]
35-
socks = ["PySocks"]
34+
[project.urls]
35+
Homepage = "https://github.com/dbrennand/virustotal-python"
36+
Repository = "https://github.com/dbrennand/virustotal-python"
3637

37-
[tool.poetry.dev-dependencies]
38-
black = "^24.4.2"
39-
twine = "^5.1.0"
40-
pytest = "^8.2.0"
41-
pytest-mock = "^3.14.0"
42-
requests-mock = "^1.12.1"
43-
pytest-cov = "^5.0.0"
38+
[dependency-groups]
39+
dev = [
40+
"black>=25.12.0",
41+
"pytest>=9.0.2",
42+
"pytest-mock>=3.15.1",
43+
"requests-mock>=1.12.1",
44+
"pytest-cov>=7.0.0",
45+
]
46+
47+
[tool.hatch.build.targets.sdist]
48+
exclude = [".gitignore"]
49+
50+
[tool.hatch.build.targets.wheel]
51+
exclude = [".gitignore"]
4452

4553
[build-system]
46-
requires = ["poetry-core>=1.0.0"]
47-
build-backend = "poetry.core.masonry.api"
54+
requires = ["hatchling"]
55+
build-backend = "hatchling.build"

tests/test_virustotal_python.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Tests for virustotal-python.
2-
"""
1+
"""Tests for virustotal-python."""
32

43
import virustotal_python
54
import json

0 commit comments

Comments
 (0)