From a39ed59df890168a60e8efcef5936b3e452886b6 Mon Sep 17 00:00:00 2001 From: RKI | Metadata Exchange <121876825+RKIMetadataExchange@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:21:45 +0100 Subject: [PATCH] Bump cookiecutter template to 6c467f (#323) # Changes - bumped cookiecutter template to https://github.com/robert-koch-institut/mex-template/commit/6c467f --------- Co-authored-by: Nicolas Drebenstedt --- .cruft.json | 2 +- README.md | 19 +++++---- mex/common/testing/plugin.py | 7 ++-- pdm.lock | 79 +++++++++++++++++------------------- pyproject.toml | 53 ++++++++++++------------ requirements.txt | 2 +- 6 files changed, 81 insertions(+), 81 deletions(-) diff --git a/.cruft.json b/.cruft.json index 95c253f7..334e273a 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "checkout": null, - "commit": "fca460e90134ef8c10f54d491aa80891509b1b6c", + "commit": "6c467f8809dcc640c3b7aab80e42f3af1f89b1bd", "context": { "cookiecutter": { "project_name": "common", diff --git a/README.md b/README.md index 02104d7c..61b39781 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Common library for MEx python projects. [![open-code](https://github.com/robert-koch-institut/mex-common/actions/workflows/open-code.yml/badge.svg)](https://gitlab.opencode.de/robert-koch-institut/mex/mex-common) [![testing](https://github.com/robert-koch-institut/mex-common/actions/workflows/testing.yml/badge.svg)](https://github.com/robert-koch-institut/mex-common/actions/workflows/testing.yml) -## project +## Project The Metadata Exchange (MEx) project is committed to improve the retrieval of RKI research data and projects. How? By focusing on metadata: instead of providing the @@ -39,13 +39,14 @@ data Findable, Accessible, Interoperable and Reusable. **Contact** \ For more information, please feel free to email us at [mex@rki.de](mailto:mex@rki.de). -### Publisher of this document +### Publisher + **Robert Koch-Institut** \ Nordufer 20 \ 13353 Berlin \ Germany -## package +## Package The `mex-common` library is a software development toolkit that is used by multiple components within the MEx project. It contains utilities for building pipelines like a @@ -53,14 +54,14 @@ common commandline interface, logging and configuration setup. It also provides auxiliary connectors that can be used to fetch data from external services and a re-usable implementation of the MEx metadata schema as pydantic models. -## license +## License This package is licensed under the [MIT license](/LICENSE). All other software components of the MEx project are open-sourced under the same license as well. -## development +## Development -### installation +### Installation - on unix, consider using pyenv https://github.com/pyenv/pyenv - get pyenv `curl https://pyenv.run | bash` @@ -73,13 +74,13 @@ components of the MEx project are open-sourced under the same license as well. - switch version `pyenv global 3.11` - run `.\mex.bat install` -### linting and testing +### Linting and testing - run all linters with `pdm lint` - run only unit tests with `pdm unit` - run unit and integration tests with `pdm test` -### updating dependencies +### Updating dependencies - update boilerplate files with `cruft update` - update global requirements in `requirements.txt` manually @@ -87,7 +88,7 @@ components of the MEx project are open-sourced under the same license as well. - update package dependencies using `pdm update-all` - update github actions in `.github/workflows/*.yml` manually -### creating release +### Creating release - run `pdm release RULE` to release a new version where RULE determines which part of the version to update and is one of `major`, `minor`, `patch`. diff --git a/mex/common/testing/plugin.py b/mex/common/testing/plugin.py index 4d6feeed..6c44f6b9 100644 --- a/mex/common/testing/plugin.py +++ b/mex/common/testing/plugin.py @@ -76,7 +76,8 @@ def settings() -> BaseSettings: @pytest.fixture(autouse=True) def isolate_settings( - isolate_assets_dir: None, isolate_work_dir: None + isolate_assets_dir: None, # noqa: ARG001 + isolate_work_dir: None, # noqa: ARG001 ) -> Generator[None, None, None]: """Automatically reset the settings singleton store.""" SETTINGS_STORE.reset() @@ -157,7 +158,7 @@ def mocked_init(self: WikidataQueryServiceConnector) -> None: # mock search_wikidata_with_query def get_data_by_query( - self: WikidataQueryServiceConnector, query: str + _self: WikidataQueryServiceConnector, _query: str ) -> list[dict[str, dict[str, str]]]: return [ { @@ -181,7 +182,7 @@ def get_data_by_query( # mock get_wikidata_org_with_org_id def get_wikidata_item_details_by_id( - self: WikidataAPIConnector, item_id: str + _self: WikidataAPIConnector, _item_id: str ) -> dict[str, str]: return wikidata_organization_raw diff --git a/pdm.lock b/pdm.lock index 02781b12..4e4d8994 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "dev"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:963fa72feed9cb31e5b7d42bb995153e70aaa25ca30d47f277a52e63fd07250e" +content_hash = "sha256:0f37d7e9ce748d90b809b6a602406e582f93a17bc2c4796ece1a8268430d8fdf" [[metadata.targets]] requires_python = "==3.11.*" @@ -495,14 +495,14 @@ files = [ [[package]] name = "packaging" -version = "24.1" +version = "24.2" requires_python = ">=3.8" summary = "Core utilities for Python packages" groups = ["dev"] marker = "python_version == \"3.11\"" files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -624,23 +624,20 @@ files = [ [[package]] name = "pyarrow" -version = "17.0.0" -requires_python = ">=3.8" +version = "18.0.0" +requires_python = ">=3.9" summary = "Python library for Apache Arrow" groups = ["default"] marker = "python_version == \"3.11\"" -dependencies = [ - "numpy>=1.16.6", -] files = [ - {file = "pyarrow-17.0.0-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:1c8856e2ef09eb87ecf937104aacfa0708f22dfeb039c363ec99735190ffb977"}, - {file = "pyarrow-17.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2e19f569567efcbbd42084e87f948778eb371d308e137a0f97afe19bb860ccb3"}, - {file = "pyarrow-17.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b244dc8e08a23b3e352899a006a26ae7b4d0da7bb636872fa8f5884e70acf15"}, - {file = "pyarrow-17.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b72e87fe3e1db343995562f7fff8aee354b55ee83d13afba65400c178ab2597"}, - {file = "pyarrow-17.0.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:dc5c31c37409dfbc5d014047817cb4ccd8c1ea25d19576acf1a001fe07f5b420"}, - {file = "pyarrow-17.0.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:e3343cb1e88bc2ea605986d4b94948716edc7a8d14afd4e2c097232f729758b4"}, - {file = "pyarrow-17.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:a27532c38f3de9eb3e90ecab63dfda948a8ca859a66e3a47f5f42d1e403c4d03"}, - {file = "pyarrow-17.0.0.tar.gz", hash = "sha256:4beca9521ed2c0921c1023e68d097d0299b62c362639ea315572a58f3f50fd28"}, + {file = "pyarrow-18.0.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:d5795e37c0a33baa618c5e054cd61f586cf76850a251e2b21355e4085def6280"}, + {file = "pyarrow-18.0.0-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:5f0510608ccd6e7f02ca8596962afb8c6cc84c453e7be0da4d85f5f4f7b0328a"}, + {file = "pyarrow-18.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:616ea2826c03c16e87f517c46296621a7c51e30400f6d0a61be645f203aa2b93"}, + {file = "pyarrow-18.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a1824f5b029ddd289919f354bc285992cb4e32da518758c136271cf66046ef22"}, + {file = "pyarrow-18.0.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:6dd1b52d0d58dd8f685ced9971eb49f697d753aa7912f0a8f50833c7a7426319"}, + {file = "pyarrow-18.0.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:320ae9bd45ad7ecc12ec858b3e8e462578de060832b98fc4d671dee9f10d9954"}, + {file = "pyarrow-18.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:2c992716cffb1088414f2b478f7af0175fd0a76fea80841b1706baa8fb0ebaad"}, + {file = "pyarrow-18.0.0.tar.gz", hash = "sha256:a6aa027b1a9d2970cf328ccd6dbe4a996bc13c39fd427f502782f5bdb9ca20f5"}, ] [[package]] @@ -749,18 +746,18 @@ files = [ [[package]] name = "pytest-cov" -version = "5.0.0" -requires_python = ">=3.8" +version = "6.0.0" +requires_python = ">=3.9" summary = "Pytest plugin for measuring coverage." groups = ["dev"] marker = "python_version == \"3.11\"" dependencies = [ - "coverage[toml]>=5.2.1", + "coverage[toml]>=7.5", "pytest>=4.6", ] files = [ - {file = "pytest-cov-5.0.0.tar.gz", hash = "sha256:5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857"}, - {file = "pytest_cov-5.0.0-py3-none-any.whl", hash = "sha256:4f0764a1219df53214206bf1feea4633c3b558a2925c8b59f144f682861ce652"}, + {file = "pytest-cov-6.0.0.tar.gz", hash = "sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0"}, + {file = "pytest_cov-6.0.0-py3-none-any.whl", hash = "sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35"}, ] [[package]] @@ -852,30 +849,30 @@ files = [ [[package]] name = "ruff" -version = "0.7.2" +version = "0.7.3" requires_python = ">=3.7" summary = "An extremely fast Python linter and code formatter, written in Rust." groups = ["dev"] marker = "python_version == \"3.11\"" files = [ - {file = "ruff-0.7.2-py3-none-linux_armv6l.whl", hash = "sha256:b73f873b5f52092e63ed540adefc3c36f1f803790ecf2590e1df8bf0a9f72cb8"}, - {file = "ruff-0.7.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5b813ef26db1015953daf476202585512afd6a6862a02cde63f3bafb53d0b2d4"}, - {file = "ruff-0.7.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:853277dbd9675810c6826dad7a428d52a11760744508340e66bf46f8be9701d9"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21aae53ab1490a52bf4e3bf520c10ce120987b047c494cacf4edad0ba0888da2"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ccc7e0fc6e0cb3168443eeadb6445285abaae75142ee22b2b72c27d790ab60ba"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd77877a4e43b3a98e5ef4715ba3862105e299af0c48942cc6d51ba3d97dc859"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:e00163fb897d35523c70d71a46fbaa43bf7bf9af0f4534c53ea5b96b2e03397b"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f3c54b538633482dc342e9b634d91168fe8cc56b30a4b4f99287f4e339103e88"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7b792468e9804a204be221b14257566669d1db5c00d6bb335996e5cd7004ba80"}, - {file = "ruff-0.7.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dba53ed84ac19ae4bfb4ea4bf0172550a2285fa27fbb13e3746f04c80f7fa088"}, - {file = "ruff-0.7.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b19fafe261bf741bca2764c14cbb4ee1819b67adb63ebc2db6401dcd652e3748"}, - {file = "ruff-0.7.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:28bd8220f4d8f79d590db9e2f6a0674f75ddbc3847277dd44ac1f8d30684b828"}, - {file = "ruff-0.7.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9fd67094e77efbea932e62b5d2483006154794040abb3a5072e659096415ae1e"}, - {file = "ruff-0.7.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:576305393998b7bd6c46018f8104ea3a9cb3fa7908c21d8580e3274a3b04b691"}, - {file = "ruff-0.7.2-py3-none-win32.whl", hash = "sha256:fa993cfc9f0ff11187e82de874dfc3611df80852540331bc85c75809c93253a8"}, - {file = "ruff-0.7.2-py3-none-win_amd64.whl", hash = "sha256:dd8800cbe0254e06b8fec585e97554047fb82c894973f7ff18558eee33d1cb88"}, - {file = "ruff-0.7.2-py3-none-win_arm64.whl", hash = "sha256:bb8368cd45bba3f57bb29cbb8d64b4a33f8415d0149d2655c5c8539452ce7760"}, - {file = "ruff-0.7.2.tar.gz", hash = "sha256:2b14e77293380e475b4e3a7a368e14549288ed2931fce259a6f99978669e844f"}, + {file = "ruff-0.7.3-py3-none-linux_armv6l.whl", hash = "sha256:34f2339dc22687ec7e7002792d1f50712bf84a13d5152e75712ac08be565d344"}, + {file = "ruff-0.7.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:fb397332a1879b9764a3455a0bb1087bda876c2db8aca3a3cbb67b3dbce8cda0"}, + {file = "ruff-0.7.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:37d0b619546103274e7f62643d14e1adcbccb242efda4e4bdb9544d7764782e9"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d59f0c3ee4d1a6787614e7135b72e21024875266101142a09a61439cb6e38a5"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:44eb93c2499a169d49fafd07bc62ac89b1bc800b197e50ff4633aed212569299"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6d0242ce53f3a576c35ee32d907475a8d569944c0407f91d207c8af5be5dae4e"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:6b6224af8b5e09772c2ecb8dc9f3f344c1aa48201c7f07e7315367f6dd90ac29"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c50f95a82b94421c964fae4c27c0242890a20fe67d203d127e84fbb8013855f5"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7f3eff9961b5d2644bcf1616c606e93baa2d6b349e8aa8b035f654df252c8c67"}, + {file = "ruff-0.7.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8963cab06d130c4df2fd52c84e9f10d297826d2e8169ae0c798b6221be1d1d2"}, + {file = "ruff-0.7.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:61b46049d6edc0e4317fb14b33bd693245281a3007288b68a3f5b74a22a0746d"}, + {file = "ruff-0.7.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:10ebce7696afe4644e8c1a23b3cf8c0f2193a310c18387c06e583ae9ef284de2"}, + {file = "ruff-0.7.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:3f36d56326b3aef8eeee150b700e519880d1aab92f471eefdef656fd57492aa2"}, + {file = "ruff-0.7.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5d024301109a0007b78d57ab0ba190087b43dce852e552734ebf0b0b85e4fb16"}, + {file = "ruff-0.7.3-py3-none-win32.whl", hash = "sha256:4ba81a5f0c5478aa61674c5a2194de8b02652f17addf8dfc40c8937e6e7d79fc"}, + {file = "ruff-0.7.3-py3-none-win_amd64.whl", hash = "sha256:588a9ff2fecf01025ed065fe28809cd5a53b43505f48b69a1ac7707b1b7e4088"}, + {file = "ruff-0.7.3-py3-none-win_arm64.whl", hash = "sha256:1713e2c5545863cdbfe2cbce21f69ffaf37b813bfd1fb3b90dc9a6f1963f5a8c"}, + {file = "ruff-0.7.3.tar.gz", hash = "sha256:e1d1ba2e40b6e71a61b063354d04be669ab0d39c352461f3d789cac68b54a313"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 0c2c2ea9..4478bc5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,32 +8,32 @@ license = { file = "LICENSE" } urls = { Repository = "https://github.com/robert-koch-institut/mex-common" } requires-python = ">=3.11,<3.13" dependencies = [ - "backoff>=2.2.1,<3", - "click>=8.1.7,<9", - "langdetect>=1.0.9,<2", - "ldap3>=2.9.1,<3", + "backoff>=2,<3", + "click>=8,<9", + "langdetect>=1,<2", + "ldap3>=2,<3", "mex-model @ git+https://github.com/robert-koch-institut/mex-model.git@3.1.0", - "numpy>=2.1.2,<3", - "pandas>=2.2.3,<3", - "pyarrow>=17.0.0,<18", - "pydantic-settings>=2.5.2,<3", - "pydantic>=2.9.2,<3", - "pytz>=2024.1,<2024.2", - "requests>=2.32.3,<3", + "numpy>=2,<3", + "pandas>=2,<3", + "pyarrow>=18,<19", + "pydantic-settings>=2,<3", + "pydantic>=2,<3", + "pytz>=2024,<2024.2", + "requests>=2,<3", ] optional-dependencies.dev = [ - "ipdb>=0.13.13,<1", - "pandas-stubs>=2.2.3,<3", - "mypy>=1.11.2,<2", - "pytest-cov>=5.0.0,<6", - "pytest-random-order>=1.1.1,<2", - "pytest-xdist>=3.6.1,<4", - "pytest>=8.3.3,<9", - "ruff>=0.6.9,<1", - "sphinx>=8.0.2,<9", - "types-ldap3>=2.9.13,<3", - "types-pytz>=2024.1.0,<2025", - "types-requests>=2.32.0,<3", + "ipdb>=0.13,<1", + "pandas-stubs>=2,<3", + "mypy>=1,<2", + "pytest-cov>=6,<7", + "pytest-random-order>=1,<2", + "pytest-xdist>=3,<4", + "pytest>=8,<9", + "ruff>=0.7,<1", + "sphinx>=8,<9", + "types-ldap3>=2,<3", + "types-pytz>=2024,<2025", + "types-requests>=2,<3", ] [tool.cruft] @@ -111,6 +111,7 @@ ignore = [ "DJ", # Disable django specific checks (we are not using django) "FBT", # Disable boolean type hint checks (for more flexibility) "FIX", # Allow committing with open TODOs (don't punish committers) + "ISC001", # Disable checks for implicitly concatenated strings (formatter compat) "N805", # Allow first argument of a method to be non-self (pydantic compat) "N815", # Allow mixedCase variables in class scope (model compat) "PTH123", # Allow using builtin open method (simpler than pathlib) @@ -123,10 +124,10 @@ select = ["ALL"] [tool.ruff.lint.per-file-ignores] "docs/**" = [ - "INP001", # Docs do not need to be a package + "INP001", # Docs folder does not need to be a package ] -"mex/common/testing/**" = [ - "ARG001", # Allow unused function arguments for pytest plugin +"scripts/**" = [ + "INP001", # Scripts folder does not need to be a package ] "tests/**" = [ "ARG005", # Allow unused lambda arguments for mocking diff --git a/requirements.txt b/requirements.txt index bb7a8537..6e135e4d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cruft==2.15.0 -mex-release @ git+https://github.com/robert-koch-institut/mex-release.git +mex-release==0.2.0 pdm==2.19.3 pre-commit==4.0.1 wheel==0.44.0