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

5.0.2 #250

Merged
merged 5 commits into from
Aug 29, 2024
Merged

5.0.2 #250

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
8 changes: 4 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[flake8]
max-line-length = 88
ignore =
W503, # line break before binary operator
E231, # missing whitespace after ',' (caused by black style)
W605, # invalid escape sequence (caused by regex)
W291 # trailing whitespace
W503,
E231,
W605,
W291,
exclude =
setup.py
*venv*
Expand Down
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## [5.0.2](https://github.com/intelowlproject/pyintelowl/releases/tag/5.0.2)
Fixed previous broken release

## [5.0.1](https://github.com/intelowlproject/pyintelowl/releases/tag/5.0.1)
- Updated documentation
- Removed old endpoints
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 24.8.0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files", "--skip", "pyquokka", "--skip", "venv"]
args: ["--profile", "black", "--filter-files", "--skip", "venv"]
11 changes: 1 addition & 10 deletions pyintelowl/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
from .analyse import analyse
from .commands import (
analyzer_healthcheck,
connector_healthcheck,
get_analyzer_config,
get_connector_config,
get_playbook_config,
)
from .commands import analyzer_healthcheck, connector_healthcheck
from .config import config
from .jobs import jobs
from .tags import tags
Expand All @@ -19,9 +13,6 @@


cmds = [
get_analyzer_config,
get_connector_config,
get_playbook_config,
analyzer_healthcheck,
connector_healthcheck,
]
8 changes: 5 additions & 3 deletions pyintelowl/cli/_jobs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ def _display_all_jobs(logger, rows):
table.add_row(
str(el["id"]),
el["observable_name"] if el["observable_name"] else el["file_name"],
el["observable_classification"]
if el["observable_classification"]
else el["file_mimetype"],
(
el["observable_classification"]
if el["observable_classification"]
else el["file_mimetype"]
),
", ".join([t["label"] for t in el["tags"]]),
", ".join(el["analyzers_to_execute"]),
", ".join(el["connectors_to_execute"]),
Expand Down
2 changes: 1 addition & 1 deletion pyintelowl/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.0.1"
__version__ = "5.0.2"
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ exclude = '''
/(
opt
| venv
| migrations
)/
'''
[tool.isort]
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,18 @@
"Environment :: Web Environment",
# Pick your license as you wish (should match "license" above)
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Libraries :: Python Modules",
],
packages=find_packages(),
python_requires=">=3.8",
python_requires=">=3.9",
include_package_data=True,
install_requires=requirements,
project_urls={
"Documentation": GITHUB_URL,
"Funding": "https://liberapay.com/IntelOwlProject/",
"Funding": "https://opencollective.com/intelowl-project",
"Source": GITHUB_URL,
"Tracker": f"{GITHUB_URL}/issues",
},
Expand Down
8 changes: 4 additions & 4 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
black==22.3.0
flake8==4.0.1
isort==5.10.1
pre-commit==2.17.0
black==24.8.0
flake8==7.1.1
isort==5.12.0
pre-commit==3.8.0
tox==3.25.1
tox-gh-actions==2.9.1
codecov==2.1.13
60 changes: 0 additions & 60 deletions tests/mocked_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,66 +5,6 @@ def mocked_raise_exception(*args, **kwargs):
raise Exception


def mocked_analyzer_config(*args, **kwargs):
return MockResponse(
{
"test_analyzer": {
"type": "observable",
"python_module": "test_class.test_module",
"description": "a test analyzer",
"disabled": False,
"external_service": False,
"leaks_info": False,
"observable_supported": ["domain"],
"config": {"soft_time_limit": 30, "queue": "default"},
"secrets": {},
}
},
200,
"/api/get_analyzer_configs",
)


def mocked_connector_config(*args, **kwargs):
return MockResponse(
{
"test_connector": {
"python_module": "test_class.test_module",
"description": "a test connector",
"disabled": False,
"maximum_tlp": "WHITE",
"config": {"soft_time_limit": 30, "queue": "default"},
"secrets": {},
}
},
200,
"/api/get_connector_configs",
)


def mocked_playbook_config(*args, **kwargs):
return MockResponse(
{
"test_playbook": {
"name": "test_playbook",
"supports": ["ip", "url", "domain", "generic", "hash"],
"python_module": "",
"disabled": False,
"description": "a test playbook",
"analyzers": {
"Classic_DNS": {
"query_type": "A",
},
},
"connectors": {},
"verification": {},
}
},
200,
"/api/get_playbook_configs",
)


def mocked_ask_analysis_success(*args, **kwargs):
return MockResponse(
{
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py{36,37,38,39,310}-click7
py{36,37,38,39,310}-click8
py{39,310,311}-click7
py{39,310,311}-click8

[testenv]
commands =
Expand All @@ -13,9 +13,9 @@ deps =

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311

[testenv:codecov]
passenv = TOXENV CI CODECOV_*
Expand Down
Loading