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.
* Update template files * Update tests * Update all * Use sync sleep --------- Co-authored-by: TheByronHimes <[email protected]>
- Loading branch information
1 parent
c313e47
commit e079dbc
Showing
53 changed files
with
1,422 additions
and
1,096 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
host: 127.0.0.1 | ||
port: 8080 | ||
log_level: info | ||
workers: 1 | ||
auto_reload: true | ||
cors_allowed_origins: [] | ||
|
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,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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ jobs: | |
- uses: actions/checkout@v3 | ||
|
||
- id: common | ||
uses: ghga-de/gh-action-common@v3 | ||
uses: ghga-de/gh-action-common@v4 | ||
|
||
- uses: pre-commit/[email protected] | ||
env: | ||
|
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 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
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,16 @@ | ||
[project] | ||
name = "wps" | ||
version = "1.0.1" | ||
description = "Work Package Service" | ||
dependencies = [ | ||
"ghga-event-schemas~=3.0.0", | ||
"ghga-service-commons[api,auth,crypt]>=2, <3", | ||
"hexkit[akafka,mongodb]>=2.1.0", | ||
"typer>=0.9.0", | ||
] | ||
|
||
[project.urls] | ||
Repository = "https://github.com/ghga-de/work-package-service" | ||
|
||
[project.scripts] | ||
wps = "wps.__main__:cli" |
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 |
---|---|---|
@@ -1,11 +1,37 @@ | ||
[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 = "[email protected]" }, | ||
] | ||
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 | ||
|
@@ -23,9 +49,7 @@ ignore = [ | |
"D206", # indent-with-spaces (ignored for formatter) | ||
"D300", # triple-single-quotes (ignored for formatter) | ||
] | ||
|
||
line-length = 88 | ||
|
||
select = [ | ||
"C90", # McCabe Complexity | ||
"F", # pyflakes codes | ||
|
@@ -39,26 +63,45 @@ select = [ | |
"SIM", # flake8-simplify | ||
"D", # pydocstyle | ||
] | ||
|
||
fixable = [ | ||
"UP", # e.g. List -> list | ||
"I", # sort imports | ||
"D", # pydocstyle | ||
] | ||
|
||
src = ["src", "tests", "examples", "scripts"] | ||
|
||
target-version = "py39" | ||
|
||
[mccabe] | ||
[tool.ruff.mccabe] | ||
max-complexity = 10 | ||
|
||
[per-file-ignores] | ||
[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"] | ||
|
||
[pydocstyle] | ||
[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
File renamed without changes.
File renamed without changes.
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!-- | ||
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. | ||
--> | ||
|
||
# Template File Lists | ||
|
||
This directory contains multiple text files that are listing paths to other files | ||
of this repository. The listed files are affected in different ways by template updates | ||
as explained in the following. | ||
|
||
## `static_files.txt` | ||
The files listed here are synced with their counterparts in the template. They should | ||
never be modified manually. | ||
|
||
## `static_files_ignore.txt` | ||
To opt out of template updates just for individual files declared as static | ||
(e.g. because you would like manually modify them), you may add them to this list. | ||
|
||
## `mandatory_files.txt` | ||
The contents of the files listed here are not synced with the template, however, upon | ||
every template update it is checked that the files exist. You should modify them | ||
manually to the needs of your repository. | ||
|
||
## `mandatory_files_ignore.txt` | ||
To opt out of existence checks for individual files declared as mandatory, you may add | ||
them to this list. | ||
|
||
## `deprecated_files.txt` | ||
Files listed here must not exist in your repository and are automatically deleted upon | ||
a template update. | ||
|
||
## `deprecated_files_ignore.txt` | ||
If you would like to keep files declared as deprecated, you may add them to this list. |
Oops, something went wrong.