mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-24 17:12:34 +02:00
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.8 to 0.1.9. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>v0.1.9</h2> <h2>Changes</h2> <h3>Breaking changes</h3> <ul> <li>Add site-packages to default exclusions (<a href="https://redirect.github.com/astral-sh/ruff/pull/9188">#9188</a>)</li> </ul> <h3>Preview features</h3> <ul> <li>Fix: Avoid parenthesizing subscript targets and values (<a href="https://redirect.github.com/astral-sh/ruff/pull/9209">#9209</a>)</li> <li>[<code>pylint</code>] Implement <code>too-many-locals</code> (<code>PLR0914</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9163">#9163</a>)</li> <li>Implement <code>reimplemented_operator</code> (FURB118) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9171">#9171</a>)</li> <li>Add a rule to detect string members in runtime-evaluated unions (<a href="https://redirect.github.com/astral-sh/ruff/pull/9143">#9143</a>)</li> <li>Implement <code>no_blank_line_before_class_docstring</code> preview style (<a href="https://redirect.github.com/astral-sh/ruff/pull/9154">#9154</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li><code>CONSTANT_CASE</code> variables are improperly flagged for yoda violation (<code>SIM300</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9164">#9164</a>)</li> <li>[<code>flake8-pyi</code>] Cover ParamSpecs and TypeVarTuples (<code>PYI018</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9198">#9198</a>)</li> <li>[<code>flake8-bugbear</code>] Add fix for <code>zip-without-explicit-strict</code> (<code>B905</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9176">#9176</a>)</li> <li>Add fix to automatically remove <code>print</code> and <code>pprint</code> statements (<code>T201</code>, <code>T203</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9208">#9208</a>)</li> <li>Prefer <code>Never</code> to <code>NoReturn</code> in auto-typing in Python >= 3.11 (<code>ANN201</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9213">#9213</a>)</li> </ul> <h3>Formatter</h3> <ul> <li><code>can_omit_optional_parentheses</code>: Exit early for unparenthesized expressions (<a href="https://redirect.github.com/astral-sh/ruff/pull/9125">#9125</a>)</li> <li>Fix <code>dynamic</code> mode with doctests so that it doesn't exceed configured line width (<a href="https://redirect.github.com/astral-sh/ruff/pull/9129">#9129</a>)</li> <li>Fix <code>can_omit_optional_parentheses</code> for expressions with a right most fstring (<a href="https://redirect.github.com/astral-sh/ruff/pull/9124">#9124</a>)</li> <li>Add <code>target_version</code> to formatter options (<a href="https://redirect.github.com/astral-sh/ruff/pull/9220">#9220</a>)</li> </ul> <h3>CLI</h3> <ul> <li>Update <code>ruff format --check</code> to display message for already formatted files (<a href="https://redirect.github.com/astral-sh/ruff/pull/9153">#9153</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Reverse order of arguments for <code>operator.contains</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/9192">#9192</a>)</li> <li>Iterate over lambdas in deferred type annotations (<a href="https://redirect.github.com/astral-sh/ruff/pull/9175">#9175</a>)</li> <li>Fix panic in <code>D208</code> with multibyte indent (<a href="https://redirect.github.com/astral-sh/ruff/pull/9147">#9147</a>)</li> <li>Add support for <code>NoReturn</code> in auto-return-typing (<a href="https://redirect.github.com/astral-sh/ruff/pull/9206">#9206</a>)</li> <li>Allow removal of <code>typing</code> from <code>exempt-modules</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/9214">#9214</a>)</li> <li>Avoid <code>mutable-class-default</code> violations for Pydantic subclasses (<a href="https://redirect.github.com/astral-sh/ruff/pull/9187">#9187</a>)</li> <li>Fix dropped union expressions for piped non-types in <code>PYI055</code> autofix (<a href="https://redirect.github.com/astral-sh/ruff/pull/9161">#9161</a>)</li> <li>Enable annotation quoting for multi-line expressions (<a href="https://redirect.github.com/astral-sh/ruff/pull/9142">#9142</a>)</li> <li>Deduplicate edits when quoting annotations (<a href="https://redirect.github.com/astral-sh/ruff/pull/9140">#9140</a>)</li> <li>Prevent invalid utf8 indexing in cell magic detection (<a href="https://redirect.github.com/astral-sh/ruff/pull/9146">#9146</a>)</li> <li>Avoid nested quotations in auto-quoting fix (<a href="https://redirect.github.com/astral-sh/ruff/pull/9168">#9168</a>)</li> <li>Add base-class inheritance detection to flake8-django rules (<a href="https://redirect.github.com/astral-sh/ruff/pull/9151">#9151</a>)</li> <li>Avoid <code>asyncio-dangling-task</code> violations on shadowed bindings (<a href="https://redirect.github.com/astral-sh/ruff/pull/9215">#9215</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.1.9</h2> <h3>Breaking changes</h3> <ul> <li>Add site-packages to default exclusions (<a href="https://redirect.github.com/astral-sh/ruff/pull/9188">#9188</a>)</li> </ul> <h3>Preview features</h3> <ul> <li>Fix: Avoid parenthesizing subscript targets and values (<a href="https://redirect.github.com/astral-sh/ruff/pull/9209">#9209</a>)</li> <li>[<code>pylint</code>] Implement <code>too-many-locals</code> (<code>PLR0914</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9163">#9163</a>)</li> <li>Implement <code>reimplemented_operator</code> (FURB118) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9171">#9171</a>)</li> <li>Add a rule to detect string members in runtime-evaluated unions (<a href="https://redirect.github.com/astral-sh/ruff/pull/9143">#9143</a>)</li> <li>Implement <code>no_blank_line_before_class_docstring</code> preview style (<a href="https://redirect.github.com/astral-sh/ruff/pull/9154">#9154</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li><code>CONSTANT_CASE</code> variables are improperly flagged for yoda violation (<code>SIM300</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9164">#9164</a>)</li> <li>[<code>flake8-pyi</code>] Cover ParamSpecs and TypeVarTuples (<code>PYI018</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9198">#9198</a>)</li> <li>[<code>flake8-bugbear</code>] Add fix for <code>zip-without-explicit-strict</code> (<code>B905</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9176">#9176</a>)</li> <li>Add fix to automatically remove <code>print</code> and <code>pprint</code> statements (<code>T201</code>, <code>T203</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9208">#9208</a>)</li> <li>Prefer <code>Never</code> to <code>NoReturn</code> in auto-typing in Python >= 3.11 (<code>ANN201</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9213">#9213</a>)</li> </ul> <h3>Formatter</h3> <ul> <li><code>can_omit_optional_parentheses</code>: Exit early for unparenthesized expressions (<a href="https://redirect.github.com/astral-sh/ruff/pull/9125">#9125</a>)</li> <li>Fix <code>dynamic</code> mode with doctests so that it doesn't exceed configured line width (<a href="https://redirect.github.com/astral-sh/ruff/pull/9129">#9129</a>)</li> <li>Fix <code>can_omit_optional_parentheses</code> for expressions with a right most fstring (<a href="https://redirect.github.com/astral-sh/ruff/pull/9124">#9124</a>)</li> <li>Add <code>target_version</code> to formatter options (<a href="https://redirect.github.com/astral-sh/ruff/pull/9220">#9220</a>)</li> </ul> <h3>CLI</h3> <ul> <li>Update <code>ruff format --check</code> to display message for already formatted files (<a href="https://redirect.github.com/astral-sh/ruff/pull/9153">#9153</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Reverse order of arguments for <code>operator.contains</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/9192">#9192</a>)</li> <li>Iterate over lambdas in deferred type annotations (<a href="https://redirect.github.com/astral-sh/ruff/pull/9175">#9175</a>)</li> <li>Fix panic in <code>D208</code> with multibyte indent (<a href="https://redirect.github.com/astral-sh/ruff/pull/9147">#9147</a>)</li> <li>Add support for <code>NoReturn</code> in auto-return-typing (<a href="https://redirect.github.com/astral-sh/ruff/pull/9206">#9206</a>)</li> <li>Allow removal of <code>typing</code> from <code>exempt-modules</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/9214">#9214</a>)</li> <li>Avoid <code>mutable-class-default</code> violations for Pydantic subclasses (<a href="https://redirect.github.com/astral-sh/ruff/pull/9187">#9187</a>)</li> <li>Fix dropped union expressions for piped non-types in <code>PYI055</code> autofix (<a href="https://redirect.github.com/astral-sh/ruff/pull/9161">#9161</a>)</li> <li>Enable annotation quoting for multi-line expressions (<a href="https://redirect.github.com/astral-sh/ruff/pull/9142">#9142</a>)</li> <li>Deduplicate edits when quoting annotations (<a href="https://redirect.github.com/astral-sh/ruff/pull/9140">#9140</a>)</li> <li>Prevent invalid utf8 indexing in cell magic detection (<a href="https://redirect.github.com/astral-sh/ruff/pull/9146">#9146</a>)</li> <li>Avoid nested quotations in auto-quoting fix (<a href="https://redirect.github.com/astral-sh/ruff/pull/9168">#9168</a>)</li> <li>Add base-class inheritance detection to flake8-django rules (<a href="https://redirect.github.com/astral-sh/ruff/pull/9151">#9151</a>)</li> <li>Avoid <code>asyncio-dangling-task</code> violations on shadowed bindings (<a href="https://redirect.github.com/astral-sh/ruff/pull/9215">#9215</a>)</li> </ul> <h3>Documentation</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="0263f2715e
"><code>0263f27</code></a> Bump version to v0.1.9 (<a href="https://redirect.github.com/astral-sh/ruff/issues/9231">#9231</a>)</li> <li><a href="c6d8076034
"><code>c6d8076</code></a> Set target versions in Black tests (<a href="https://redirect.github.com/astral-sh/ruff/issues/9221">#9221</a>)</li> <li><a href="8cb7950102
"><code>8cb7950</code></a> Add <code>target_version</code> to formatter options (<a href="https://redirect.github.com/astral-sh/ruff/issues/9220">#9220</a>)</li> <li><a href="ef4bd8d5ff
"><code>ef4bd8d</code></a> Fix: Avoid parenthesizing subscript targets and values (<a href="https://redirect.github.com/astral-sh/ruff/issues/9209">#9209</a>)</li> <li><a href="5d41c84ef7
"><code>5d41c84</code></a> SIM300: CONSTANT_CASE variables are improperly flagged for yoda violation (<a href="https://redirect.github.com/astral-sh/ruff/issues/9">#9</a>...</li> <li><a href="cbe3bf9bde
"><code>cbe3bf9</code></a> Avoid <code>asyncio-dangling-task</code> violations on shadowed bindings (<a href="https://redirect.github.com/astral-sh/ruff/issues/9215">#9215</a>)</li> <li><a href="4b4160eb48
"><code>4b4160e</code></a> Allow removal of <code>typing</code> from <code>exempt-modules</code> (<a href="https://redirect.github.com/astral-sh/ruff/issues/9214">#9214</a>)</li> <li><a href="29846f5b09
"><code>29846f5</code></a> Prefer <code>Never</code> to <code>NoReturn</code> in auto-typing (<a href="https://redirect.github.com/astral-sh/ruff/issues/9213">#9213</a>)</li> <li><a href="07b293d949
"><code>07b293d</code></a> Add fix to automatically remove <code>print</code> and <code>pprint</code> statements (<a href="https://redirect.github.com/astral-sh/ruff/issues/9208">#9208</a>)</li> <li><a href="5ccc21aea2
"><code>5ccc21a</code></a> Add support for <code>NoReturn</code> in auto-return-typing (<a href="https://redirect.github.com/astral-sh/ruff/issues/9206">#9206</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/v0.1.8...v0.1.9">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
aki_prj23_transparenzregister
Contributions
See the CONTRIBUTING.md about how code should be formatted and what kind of rules we set ourselves.
Available entrypoints
The project has currently the following entrypoint available:
- data-transformation > Transfers all the data from the mongodb into the sql db to make it available as production data.
- data-processing > Processes the data using NLP methods and transfers matched data into the SQL table ready for use.
- reset-sql > Resets all sql tables in the connected db.
- copy-sql > Copys the content of a db to another db.
- webserver > Starts the webserver showing the analysis results.
DB Connection settings
To connect to the SQL db see sql/connector.py To connect to the Mongo db see [connect]
Create a secrets.json
in the root of this repo with the following structure (values to be replaces by desired config):
The sqlite db is alternative to the postgres section.
{
"sqlite": "path-to-sqlite.db",
"postgres": {
"username": "username",
"password": "password",
"host": "localhost",
"database": "db-name",
"port": 5432
},
"mongo": {
"username": "username",
"password": "password",
"host": "localhost",
"database": "transparenzregister",
"port": 27017
}
}
Alternatively, the secrets can be provided as environment variables. One option to do so is to add a .env
file with
the following layout:
PYTHON_POSTGRES_USERNAME=postgres
PYTHON_POSTGRES_PASSWORD=postgres
PYTHON_POSTGRES_HOST=postgres
PYTHON_POSTGRES_DATABASE=postgres
PYTHON_POSTGRES_PORT=5432
PYTHON_MONGO_USERNAME=username
PYTHON_MONGO_HOST=mongodb
PYTHON_MONGO_PASSWORD=password
PYTHON_MONGO_PORT=27017
PYTHON_MONGO_DATABASE=transparenzregister
PYTHON_SQLITE_PATH=PathToSQLite3.db # An overwrite path to an sqllite db
PYTHON_DASH_LOGIN_USERNAME=some-login-to-webgui
PYTHON_DASH_LOGIN_PW=some-pw-to-login-to-webgui
PYTHON_INGEST_SCHEDULE=12 # Every x hours
CR=ghcr.io/fhswf/aki_prj23_transparenzregister
TAG=latest
HTTP_PORT=80
The prefix PYTHON_
can be customized by setting a different prefix
when constructing the ConfigProvider.
Description
Languages
Jupyter Notebook
84.5%
HTML
12.1%
Python
3.3%