generated from ghga-de/microservice-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include empty resources in summary stats (#61)
* template update * include empty resource classes in statistics * remove auto readme because of custom content * version bump * adapt template changes * more template-related updates * fix * roll requirements back to main * fix typo * adapt Dockerfile
- Loading branch information
Showing
104 changed files
with
783 additions
and
364 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Check if the config schema and the example are up to date. | ||
|
||
on: push | ||
|
||
jobs: | ||
static-code-analysis: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- id: common | ||
uses: ghga-de/gh-action-common@v4 | ||
|
||
- name: Check pyproject.toml | ||
run: | | ||
./scripts/update_pyproject.py --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!-- | ||
Copyright 2021 - 2023 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln | ||
for the German Human Genome-Phenome Archive (GHGA) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
# Generating the pyproject.toml | ||
|
||
The pyproject.toml of the service is generated by combining static configuration | ||
captured in [`./pyproject_template.toml`](./pyproject_template.toml) and custom | ||
package metadata specified in [`./pyproject_custom.toml`](./pyproject_custom.toml). | ||
|
||
The `./pyproject_template.toml` is managed by the template, please do not edit manually. | ||
|
||
You may specify properties in the `./pyproject_custom.toml` which are already specified | ||
in the `./pyproject_template.toml`. In that case, the `./pyproject_custom.toml` takes | ||
priority. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[project] | ||
name = "metldata" | ||
version = "1.2.0" | ||
description = "metldata - A framework for handling metadata based on ETL, CQRS, and event sourcing." | ||
dependencies = [ | ||
"hexkit[akafka,mongodb]~=1.0.0", | ||
"ghga-service-commons[api,auth]~=1.1.0", | ||
"ghga-event-schemas~=1.0.0", | ||
"typer~=0.9.0", | ||
"linkml==1.6.1", | ||
"linkml-runtime==1.6.0", | ||
"linkml-validator==0.4.5", | ||
] | ||
|
||
[project.urls] | ||
Repository = "https://github.com/ghga-de/metldata" | ||
|
||
[project.scripts] | ||
metldata = "metldata.__main__:run" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
[build-system] | ||
requires = ["setuptools>=67.7.2"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "German Human Genome Phenome Archive (GHGA)", email = "contact@ghga.de" }, | ||
] | ||
requires-python = ">=3.9" | ||
license = { text = "Apache 2.0" } | ||
classifiers = [ | ||
"Development Status :: 1 - Planning", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Topic :: Internet :: WWW/HTTP :: HTTP Servers", | ||
"Topic :: Software Development :: Libraries", | ||
"Intended Audience :: Developers", | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
|
||
[tool.ruff] | ||
exclude = [ | ||
".git", | ||
".devcontainer", | ||
"__pycache__", | ||
"build", | ||
"dist", | ||
] | ||
ignore = [ | ||
"E", # pycodestyle errors | ||
"W", # pycodestyle warnings - pycodestyle covered by black | ||
"PLW", # pylint warnings | ||
"RUF001", # ambiguous unicode character strings | ||
"RUF010", # explicit conversion to string or repr: !s or !r | ||
"RUF012", # mutable class variables need typing.ClassVar annotation | ||
"N818", # Errors need to have Error suffix | ||
"B008", # function call in arg defaults, | ||
"PLR2004", # magic numbers should be constants | ||
"D205", # blank-line-after-summary | ||
"D400", # first doc line ends in period | ||
"D401", # non-imperative-mood | ||
"D107", # missing docstring in __init__ | ||
"D206", # indent-with-spaces (ignored for formatter) | ||
"D300", # triple-single-quotes (ignored for formatter) | ||
] | ||
line-length = 88 | ||
select = [ | ||
"C90", # McCabe Complexity | ||
"F", # pyflakes codes | ||
"I", # isort | ||
"S", # flake8-bandit | ||
"B", # flake8-bugbear | ||
"N", # pep8-naming | ||
"UP", # pyupgrade | ||
"PL", # pylint | ||
"RUF", # ruff | ||
"SIM", # flake8-simplify | ||
"D", # pydocstyle | ||
] | ||
fixable = [ | ||
"UP", # e.g. List -> list | ||
"I", # sort imports | ||
"D", # pydocstyle | ||
] | ||
src = ["src", "tests", "examples", "scripts"] | ||
target-version = "py39" | ||
|
||
[tool.ruff.mccabe] | ||
max-complexity = 10 | ||
|
||
[tool.ruff.per-file-ignores] | ||
"scripts/*" = ["PL", "S", "SIM", "D"] | ||
"tests/*" = ["S", "SIM", "PLR", "B011"] | ||
".devcontainer/*" = ["S", "SIM", "D"] | ||
"examples/*" = ["S", "D"] | ||
"__init__.py" = ["D"] | ||
|
||
[tool.ruff.pydocstyle] | ||
convention = "pep257" | ||
|
||
[tool.mypy] | ||
disable_error_code = "import" | ||
show_error_codes = true | ||
exclude = [ | ||
'build/lib/', | ||
] | ||
warn_redundant_casts = true | ||
warn_unused_ignores = true | ||
check_untyped_defs = true | ||
no_site_packages = false | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "7.1" | ||
asyncio_mode = "strict" | ||
|
||
[tool.coverage.paths] | ||
source = [ | ||
"src", | ||
"/workspace/src", | ||
"**/lib/python*/site-packages", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.