diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a61a63a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,70 @@ +# Changelog + +All notable changes to this project are documented in this file. + +## [2.0.0rc1] - 2023-12-13 + +### Highlights + +This release drops support for Python 2.7. +This version should be compatible with Python 3.7 and later. + +The build system was also switched to Poetry. + +Nix files were also added as a way to build and test the project. + +No changes were made to the scenario YAML format. +You can update the version in your YAML files to `2.0.0`. + +### Bug Fixes + +- Crash when creating PDF report +- Fix reader tests +- Don't run CI on every push +- Only run Ruff GitHub Action on changed Python files +- Correctly parse Python versions +- Fix Ruff action ignoring changed files + +### Features + +- Configure ruff in pyproject.toml +- Add ruff check as GitHub action +- Add editor config file +- Add editor config check as GitHub action +- Add support for Nix without flakes +- Add Nix build as GitHub action +- Generate Nix bundle archives on tagged releases +- Add CHANGELOG generation support with git-cliff + +### Miscellaneous Tasks + +- [**breaking**] convert codebase to Python 3 +- [**breaking**] switch build system to Poetry +- Add Nix build +- Support more architectures with Nix, add a simple test +- Ruff format everything +- Run ruff check --fix +- Run ruff check --fix --unsafe-fixes +- Other ruff lint manual fixes +- Correct spelling toogle -> toggle +- Remove trailing whitespace, ensure final newlines +- Update README installation instructions +- README formatting and wording +- Add metadata to the Nix WeTest package +- Improve project metadata +- [**breaking**] Add pytest, bump min Python version to 3.7 +- Move tests to own directory +- Don't ask compatibility question +- Link to repository instead of print changelog +- Remove non-working tests +- Rename Ruff lint action workflow, make it clearer +- Update install-nix-action in CI +- Run Nix checks instead of build on CI +- Use Python3.9 in the Nix build + +### Refactor + +- Make validate_file return boolean +- Rename _version_is_supported -> supports_version +- Better fetch of WeTest version +- Use semver for version comparison diff --git a/nix/checks/simple.nix b/nix/checks/simple.nix index f5556b3..f2b00c9 100644 --- a/nix/checks/simple.nix +++ b/nix/checks/simple.nix @@ -16,7 +16,7 @@ pkgs.nixosTest { testScript = let scenario = pkgs.writeText "simple.yml" '' - version: {major: 1, minor: 2, bugfix: 2} + version: {major: 2, minor: 0, bugfix: 0} config: type: unit diff --git a/pyproject.toml b/pyproject.toml index 9d0b3d0..cb56748 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wetest" -version = "1.2.2" +version = "2.0.0rc1" description = "WeTest enables you to test EPICS modules" license = "EPICS" authors = [ @@ -68,6 +68,8 @@ ignore = [ ] # https://git-cliff.org/docs/configuration +# Run: +# git-cliff -c pyproject.toml --bump -u --prepend CHANGELOG.md [tool.git-cliff.changelog] header = """ # Changelog\n diff --git a/tests/acceptance-demo.yaml b/tests/acceptance-demo.yaml index 4bf58e0..f530bb4 100644 --- a/tests/acceptance-demo.yaml +++ b/tests/acceptance-demo.yaml @@ -1,7 +1,7 @@ version: - major: 1 - minor: 2 - bugfix: 2 + major: 2 + minor: 0 + bugfix: 0 config: type: functional diff --git a/tests/bad.yml b/tests/bad.yml index c211732..09d9934 100644 --- a/tests/bad.yml +++ b/tests/bad.yml @@ -1,7 +1,7 @@ version: - major: 1 - minor: 2 - bugfix: 2 + major: 2 + minor: 0 + bugfix: 0 config: type: unit diff --git a/tests/mks946-testing.yaml b/tests/mks946-testing.yaml index 8c721cb..43a95d7 100644 --- a/tests/mks946-testing.yaml +++ b/tests/mks946-testing.yaml @@ -1,7 +1,7 @@ version: - major: 1 - minor: 2 - bugfix: 2 + major: 2 + minor: 0 + bugfix: 0 config: type: unit diff --git a/tests/mks946.yaml b/tests/mks946.yaml index bbec254..3d7f117 100644 --- a/tests/mks946.yaml +++ b/tests/mks946.yaml @@ -1,7 +1,7 @@ version: - major: 1 - minor: 2 - bugfix: 2 + major: 2 + minor: 0 + bugfix: 0 config: type: unit diff --git a/tests/scenario_example01.yaml b/tests/scenario_example01.yaml index d8df0a3..89eb158 100644 --- a/tests/scenario_example01.yaml +++ b/tests/scenario_example01.yaml @@ -1,7 +1,7 @@ version: - major: 1 - minor: 2 - bugfix: 2 + major: 2 + minor: 0 + bugfix: 0 config: type: "unit" diff --git a/tests/scenario_example02.yaml b/tests/scenario_example02.yaml index 46b5159..c16e02a 100644 --- a/tests/scenario_example02.yaml +++ b/tests/scenario_example02.yaml @@ -1,7 +1,7 @@ version: - major: 1 - minor: 2 - bugfix: 2 + major: 2 + minor: 0 + bugfix: 0 config: {} diff --git a/tests/scenario_example03.yaml b/tests/scenario_example03.yaml index 96c1bf2..f1d307f 100644 --- a/tests/scenario_example03.yaml +++ b/tests/scenario_example03.yaml @@ -1,7 +1,7 @@ version: - major: 1 - minor: 2 - bugfix: 2 + major: 2 + minor: 0 + bugfix: 0 config: type: functional diff --git a/tests/scenario_example04.yaml b/tests/scenario_example04.yaml index ae9aef4..d5c8afb 100644 --- a/tests/scenario_example04.yaml +++ b/tests/scenario_example04.yaml @@ -1,7 +1,7 @@ version: - major: 1 - minor: 2 - bugfix: 2 + major: 2 + minor: 0 + bugfix: 0 config: type: functional diff --git a/tests/scenario_example05.yaml b/tests/scenario_example05.yaml index 83d16f7..8716408 100644 --- a/tests/scenario_example05.yaml +++ b/tests/scenario_example05.yaml @@ -1,7 +1,7 @@ version: - major: 1 - minor: 2 - bugfix: 2 + major: 2 + minor: 0 + bugfix: 0 config: type: functional diff --git a/tests/suite_example01.yaml b/tests/suite_example01.yaml index aed7fa2..07f7857 100644 --- a/tests/suite_example01.yaml +++ b/tests/suite_example01.yaml @@ -1,7 +1,7 @@ version: - major: 1 - minor: 2 - bugfix: 2 + major: 2 + minor: 0 + bugfix: 0 name: "ExampleSuite01" diff --git a/tests/test_testing_reader.py b/tests/test_testing_reader.py index b928a82..bcb0c01 100644 --- a/tests/test_testing_reader.py +++ b/tests/test_testing_reader.py @@ -10,10 +10,7 @@ def test_yaml_version_checker(): """Test supported versions are well identified.""" - assert ScenarioReader.supports_version(major=1, minor=0, bugfix=0) - assert ScenarioReader.supports_version(major=1, minor=1, bugfix=0) - assert ScenarioReader.supports_version(major=1, minor=2, bugfix=0) - assert ScenarioReader.supports_version(major=1, minor=2, bugfix=2) + assert ScenarioReader.supports_version(major=2, minor=0, bugfix=0) with pytest.raises(UnsupportedFileFormatError): ScenarioReader.supports_version(major=0, minor=0, bugfix=0) with pytest.raises(UnsupportedFileFormatError):