Skip to content

Commit

Permalink
Bump cookiecutter template to 6c467f (#323)
Browse files Browse the repository at this point in the history
# Changes

- bumped cookiecutter template to
robert-koch-institut/mex-template@6c467f

---------

Co-authored-by: Nicolas Drebenstedt <drebenstedtn@rki.de>
  • Loading branch information
RKIMetadataExchange and cutoffthetop authored Nov 8, 2024
1 parent 30e60fd commit a39ed59
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"checkout": null,
"commit": "fca460e90134ef8c10f54d491aa80891509b1b6c",
"commit": "6c467f8809dcc640c3b7aab80e42f3af1f89b1bd",
"context": {
"cookiecutter": {
"project_name": "common",
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -39,28 +39,29 @@ 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
common commandline interface, logging and configuration setup. It also provides common
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`
Expand All @@ -73,21 +74,21 @@ 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
- update git hooks with `pre-commit autoupdate`
- 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`.
7 changes: 4 additions & 3 deletions mex/common/testing/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 [
{
Expand All @@ -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

Expand Down
79 changes: 38 additions & 41 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 27 additions & 26 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a39ed59

Please sign in to comment.