From ae4f42c45e1b84d611515cf91d6e0eee0a5ac628 Mon Sep 17 00:00:00 2001 From: Benjamin Bannier Date: Mon, 16 Sep 2024 14:33:31 +0200 Subject: [PATCH 1/3] Updating CHANGES and VERSION. --- CHANGES | 118 +++++++++++++++++++++++++++++++++++++++++ VERSION | 2 +- zeekscript/__init__.py | 2 +- 3 files changed, 120 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 9e122e3..87574a5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,121 @@ +1.2.9-32 | 2024-09-16 11:50:13 +0000 + + * build(deps): bump pytest from 8.3.2 to 8.3.3 (dependabot[bot]) + + Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.2 to 8.3.3. + - [Release notes](https://github.com/pytest-dev/pytest/releases) + - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) + - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.2...8.3.3) + + --- + updated-dependencies: + - dependency-name: pytest + dependency-type: direct:production + update-type: version-update:semver-patch + ... + + Signed-off-by: dependabot[bot] + + * build(deps-dev): bump tree-sitter from 0.22.3 to 0.23.0 (dependabot[bot]) + + Bumps [tree-sitter](https://github.com/tree-sitter/py-tree-sitter) from 0.22.3 to 0.23.0. + - [Release notes](https://github.com/tree-sitter/py-tree-sitter/releases) + - [Commits](https://github.com/tree-sitter/py-tree-sitter/compare/v0.22.3...v0.23.0) + + --- + updated-dependencies: + - dependency-name: tree-sitter + dependency-type: direct:development + update-type: version-update:semver-minor + ... + + Signed-off-by: dependabot[bot] + + * build(deps): bump syrupy from 4.6.1 to 4.7.1 (dependabot[bot]) + + Bumps [syrupy](https://github.com/syrupy-project/syrupy) from 4.6.1 to 4.7.1. + - [Release notes](https://github.com/syrupy-project/syrupy/releases) + - [Changelog](https://github.com/syrupy-project/syrupy/blob/main/CHANGELOG.md) + - [Commits](https://github.com/syrupy-project/syrupy/compare/v4.6.1...v4.7.1) + + --- + updated-dependencies: + - dependency-name: syrupy + dependency-type: direct:production + update-type: version-update:semver-minor + ... + + Signed-off-by: dependabot[bot] + + * build(deps): bump pytest from 8.3.1 to 8.3.2 (dependabot[bot]) + + Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.1 to 8.3.2. + - [Release notes](https://github.com/pytest-dev/pytest/releases) + - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) + - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.1...8.3.2) + + --- + updated-dependencies: + - dependency-name: pytest + dependency-type: direct:production + update-type: version-update:semver-patch + ... + + Signed-off-by: dependabot[bot] + + * Bump pytest from 8.2.2 to 8.3.1 (dependabot[bot]) + + Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.2 to 8.3.1. + - [Release notes](https://github.com/pytest-dev/pytest/releases) + - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) + - [Commits](https://github.com/pytest-dev/pytest/compare/8.2.2...8.3.1) + + --- + updated-dependencies: + - dependency-name: pytest + dependency-type: direct:production + update-type: version-update:semver-minor + ... + + Signed-off-by: dependabot[bot] + + * Completely remove old `test/data` (Benjamin Bannier, Corelight) + + These test files were used in a couple of tests but didn't need to be + standalone. This patch moves them into `testutils`. + + * Bump pylint (Benjamin Bannier, Corelight) + + * Bump pre-commit hooks. (Benjamin Bannier, Corelight) + + All source changes in this patch are created automatically from `black`. + + * Simplify general test data (Benjamin Bannier, Corelight) + + This test file is used for e.g., CLI tests and we want to keep it even + with snapshot tests. This patch simplifies it so it is easier to + maintain while still performing some formatting. + + * Seed snapshot tests with `test1.zeek` (Benjamin Bannier, Corelight) + + * Add test for snapshot testing (Benjamin Bannier, Corelight) + + We are currently using a huge file `tests/data/test1.zeek` for manual + "snapshot testing". The idea is that one would add samples to the file + and then manually update the baseline `tests/data/test1.zeek.out`. As + this file grows this manual process becomes very cumbersome. + Additionally when the test fails it can be very hard to identify which + parts of the baseline differed. + + This patch introduces a dedicated test `test_samples` which automates + this. The idea is that one would add new compact samples to + `test/samples` which the test discovers automatically. When the test is + run equality assertions are automatically routed to checks against + managed snapshots which can be updated with `pytest --snapshot-update`. + This should reduce overhead from adding/updating snapshots which should + make it easier to add coverage. We will migrate the existing tests over + in follow-up commits. + 1.2.9-15 | 2024-06-21 19:44:29 +0200 * Bump actions/setup-python from 4 to 5 (dependabot[bot]) diff --git a/VERSION b/VERSION index 3247146..5635791 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.9-15 +1.2.9-32 diff --git a/zeekscript/__init__.py b/zeekscript/__init__.py index f873c7d..0194314 100644 --- a/zeekscript/__init__.py +++ b/zeekscript/__init__.py @@ -1,6 +1,6 @@ """Wrapper around more low-level tests.""" -__version__ = "1.2.9-15" +__version__ = "1.2.9-32" __all__ = ["cli", "error", "formatter", "node", "output", "script"] from .cli import * From 1e0d955297d616e2143e9eefaa1ff6b6192bde7d Mon Sep 17 00:00:00 2001 From: Benjamin Bannier Date: Mon, 16 Sep 2024 14:35:44 +0200 Subject: [PATCH 2/3] Bump deps pinned in pre-commit config to currently used versions --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b5a4faf..d3a4523 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,10 +14,10 @@ repos: hooks: - id: pylint additional_dependencies: - - "pytest==8.2.2" - - "syrupy==4.6.1" + - "pytest==8.3.3" + - "syrupy==4.7.1" - "setuptools" - - "tree-sitter==0.22.3" + - "tree-sitter==0.23.0" - "tree-sitter-zeek==0.1.1" - repo: https://github.com/psf/black From c1eada3db353ca7bbdffe04298fd6bc171d95765 Mon Sep 17 00:00:00 2001 From: Benjamin Bannier Date: Mon, 16 Sep 2024 14:36:20 +0200 Subject: [PATCH 3/3] Bump pre-commit hooks --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d3a4523..9a2c7e8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: check-added-large-files - repo: https://github.com/PyCQA/pylint - rev: v3.2.5 + rev: v3.2.7 hooks: - id: pylint additional_dependencies: @@ -21,12 +21,12 @@ repos: - "tree-sitter-zeek==0.1.1" - repo: https://github.com/psf/black - rev: 24.4.2 + rev: 24.8.0 hooks: - id: black - repo: https://github.com/asottile/pyupgrade - rev: v3.16.0 + rev: v3.17.0 hooks: - id: pyupgrade args: ["--py37-plus"]