From 27ce33723baf49f66fae26d4d55fbb1ad194b223 Mon Sep 17 00:00:00 2001 From: Gerit Wagner Date: Thu, 4 Apr 2024 16:28:52 +0200 Subject: [PATCH] release 0.12.0 --- CHANGELOG.md | 36 +++++++++++++++++++++++++++++ CITATION.cff | 4 ++-- colrev/loader/load_utils.py | 2 +- colrev/ops/upgrade.py | 2 +- pyproject.toml | 2 +- release-checklist.md | 3 ++- tests/0_core/review_manager_test.py | 2 +- tests/2_ops/check_test.py | 7 ++---- 8 files changed, 46 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d926510dc..809cb3573 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0). + + +## 0.12.0 - 2024-04-04 + +### Added + +- Add linter `colrev_records_variable_naming_convention` +- Test coverage increased from 71% to 80% + +### Changed + +- Split `records`, `dataset`, created `records` package. +- Extracted `process` as a separate package. +- Implemented loaders as a separate package, created a standard interface. SearchSources now create the specific mapping of IDs, entrytypes and fields. +- Moved field standardization from `load` to SearchSources. +- Extended use of constants +- SearchSourceInterface: renamed `run_search` to `search`, prefer `prep_link_md` over `get_masterdata` +- Renamed and refactored `GeneralOriginFeed` to `SearchAPIFeed` +- Pass record objects instead of dicts (in `local_index` in particular) +- Replaced unnecessary keyword arguments by positional arguments +- Moved `zotero_translation_service` to `bibliography_export` package +- Consolidated code for reference parsing in `tei_parser` +- Upgraded Grobid to 0.8.0 + +### Removed + +- Removed dead code +- Dropped `INCONSISTENT_WITH_DOI_METADATA` +- `transitions` dependency + +### Fixed + +- Do not require review_manager for `colrev env -i` +- Fixed `status_stats`, including special cases. +- Repository registration: resolve() and absolute() path ## 0.11.0 - 2024-02-17 diff --git a/CITATION.cff b/CITATION.cff index 4988caed1..e558f7f97 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -8,6 +8,6 @@ authors: given-names: "Julian" orcid: "https://orcid.org/0000-0003-2682-8036" title: "CoLRev: An open-source environment for collaborative reviews" -version: 0.11.0 -date-released: 2024-02-17 +version: 0.12.0 +date-released: 2024-04-04 url: "https://github.com/CoLRev-Environment/colrev" diff --git a/colrev/loader/load_utils.py b/colrev/loader/load_utils.py index 3ac5cb1c7..9791227cd 100644 --- a/colrev/loader/load_utils.py +++ b/colrev/loader/load_utils.py @@ -204,7 +204,7 @@ def get_nr_records( # type: ignore """Get the number of records in a file""" if not filename.exists(): - raise colrev_exceptions.ImportException(f"File not found: {filename.name}") + return 0 if filename.suffix == ".bib": parser = colrev.loader.bib.BIBLoader # type: ignore diff --git a/colrev/ops/upgrade.py b/colrev/ops/upgrade.py index 9096b531e..75e34adfd 100644 --- a/colrev/ops/upgrade.py +++ b/colrev/ops/upgrade.py @@ -193,7 +193,7 @@ def main(self) -> None: "version": CoLRevVersion("0.11.0"), "target_version": CoLRevVersion("0.12.0"), "script": self._migrate_0_12_0, - "released": False, + "released": True, }, ] print(f"installed_colrev_version: {installed_colrev_version}") diff --git a/pyproject.toml b/pyproject.toml index 0da7f2767..d77131122 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "colrev" -version = "0.11.0" +version = "0.12.0" description = "CoLRev: An open-source environment for collaborative reviews" authors = ["Gerit Wagner ", "Julian Prester "] license = "MIT" diff --git a/release-checklist.md b/release-checklist.md index e4005f62c..bbd1da795 100644 --- a/release-checklist.md +++ b/release-checklist.md @@ -12,12 +12,13 @@ For all releases: - Run [poetry update on GitHub](https://github.com/CoLRev-Environment/colrev/actions/workflows/poetry_update.yml). - Change released to `True` for the migration script in `ops/upgrade.py`, add a new migration script. - Update `settings.py - _add_missing_attributes()` to prevent exceptions. -- Update version in `tests/2_ops/check_test.py` +- Update version in `tests/0_core/review_manager_test.py` - Run `colrev env --update_package_list`. - Collect release notes and update the `CHANGELOG.md`. - Update **version** and **date** and date in `CITATION.cff`. - Update version in `SECURITY.md`. - Update the version in `pyproject.toml`. Check whether other parts of the `pyproject.toml` need to be updated. Check whether dependencies can be removed. +- Check: `pyproject.toml` cannot have direct depdencies (Github) - Commit the changes (`release 0.10.0`). - Push to Github. Check whether the installation, tests, and pre-commit hooks pass. - Run `git tag -s $VERSION` (format: "0.9.1"). diff --git a/tests/0_core/review_manager_test.py b/tests/0_core/review_manager_test.py index 8e8f8a955..362d935a4 100644 --- a/tests/0_core/review_manager_test.py +++ b/tests/0_core/review_manager_test.py @@ -52,7 +52,7 @@ def test_get_colrev_versions( base_repo_review_manager: colrev.review_manager.ReviewManager, ) -> None: colrev_versions = base_repo_review_manager.get_colrev_versions() - assert ["0.11.0", "0.11.0"] == colrev_versions + assert ["0.12.0", "0.12.0"] == colrev_versions def test_check_repository_setup( diff --git a/tests/2_ops/check_test.py b/tests/2_ops/check_test.py index d76b39063..d999f44fb 100644 --- a/tests/2_ops/check_test.py +++ b/tests/2_ops/check_test.py @@ -1,6 +1,7 @@ #!/usr/bin/env python """Tests of the CoLRev checks""" import platform +import typing from dataclasses import asdict from pathlib import Path @@ -15,10 +16,6 @@ def test_checks( # type: ignore checker = colrev.ops.checker.Checker(review_manager=base_repo_review_manager) - expected = ["0.11.0", "0.11.0"] - actual = checker.get_colrev_versions() - assert expected == actual - checker.check_repository_setup() # Note: no assertion (yet) @@ -26,7 +23,7 @@ def test_checks( # type: ignore actual = checker.check_repo_extended() current_platform = platform.system() - expected = [] + expected: typing.List[str] = [] assert expected == actual actual = checker.check_repo() # type: ignore