mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-24 17:02:33 +02:00
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.7 to 0.1.8. <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.8</h2> <h2>Changes</h2> <p>This release includes opt-in support for formatting Python snippets within docstrings via the <code>docstring-code-format</code> setting. <a href="https://astral.sh/blog/ruff-v0.1.8">Check out the blog post</a> for more details!</p> <h3>Preview features</h3> <ul> <li>Add <code>"preserve"</code> quote-style to mimic Black's skip-string-normalization (<a href="https://redirect.github.com/astral-sh/ruff/pull/8822">#8822</a>)</li> <li>Implement <code>prefer_splitting_right_hand_side_of_assignments</code> preview style (<a href="https://redirect.github.com/astral-sh/ruff/pull/8943">#8943</a>)</li> <li>[<code>pycodestyle</code>] Add fix for <code>unexpected-spaces-around-keyword-parameter-equals</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/9072">#9072</a>)</li> <li>[<code>pycodestyle</code>] Add fix for comment-related whitespace rules (<a href="https://redirect.github.com/astral-sh/ruff/pull/9075">#9075</a>)</li> <li>[<code>pycodestyle</code>] Allow <code>sys.path</code> modifications between imports (<a href="https://redirect.github.com/astral-sh/ruff/pull/9047">#9047</a>)</li> <li>[<code>refurb</code>] Implement <code>hashlib-digest-hex</code> (<code>FURB181</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9077">#9077</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>Allow <code>flake8-type-checking</code> rules to automatically quote runtime-evaluated references (<a href="https://redirect.github.com/astral-sh/ruff/pull/6001">#6001</a>)</li> <li>Allow transparent cell magics in Jupyter Notebooks (<a href="https://redirect.github.com/astral-sh/ruff/pull/8911">#8911</a>)</li> <li>[<code>flake8-annotations</code>] Avoid <code>ANN2xx</code> fixes for abstract methods with empty bodies (<a href="https://redirect.github.com/astral-sh/ruff/pull/9034">#9034</a>)</li> <li>[<code>flake8-self</code>] Ignore underscore references in type annotations (<a href="https://redirect.github.com/astral-sh/ruff/pull/9036">#9036</a>)</li> <li>[<code>pep8-naming</code>] Allow class names when <code>apps.get_model</code> is a non-string (<a href="https://redirect.github.com/astral-sh/ruff/pull/9065">#9065</a>)</li> <li>[<code>pycodestyle</code>] Allow <code>matplotlib.use</code> calls to intersperse imports (<a href="https://redirect.github.com/astral-sh/ruff/pull/9094">#9094</a>)</li> <li>[<code>pyflakes</code>] Support fixing unused assignments in tuples by renaming variables (<code>F841</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9107">#9107</a>)</li> <li>[<code>pylint</code>] Add fix for <code>subprocess-run-without-check</code> (<code>PLW1510</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/6708">#6708</a>)</li> </ul> <h3>Formatter</h3> <ul> <li>Add <code>docstring-code-format</code> knob to enable docstring snippet formatting (<a href="https://redirect.github.com/astral-sh/ruff/pull/8854">#8854</a>)</li> <li>Use double quotes for all docstrings, including single-quoted docstrings (<a href="https://redirect.github.com/astral-sh/ruff/pull/9020">#9020</a>)</li> <li>Implement "dynamic" line width mode for docstring code formatting (<a href="https://redirect.github.com/astral-sh/ruff/pull/9098">#9098</a>)</li> <li>Support reformatting Markdown code blocks (<a href="https://redirect.github.com/astral-sh/ruff/pull/9030">#9030</a>)</li> <li>add support for formatting reStructuredText code snippets (<a href="https://redirect.github.com/astral-sh/ruff/pull/9003">#9003</a>)</li> <li>Avoid trailing comma for single-argument with positional separator (<a href="https://redirect.github.com/astral-sh/ruff/pull/9076">#9076</a>)</li> <li>Fix handling of trailing target comment (<a href="https://redirect.github.com/astral-sh/ruff/pull/9051">#9051</a>)</li> </ul> <h3>CLI</h3> <ul> <li>Hide unsafe fix suggestions when explicitly disabled (<a href="https://redirect.github.com/astral-sh/ruff/pull/9095">#9095</a>)</li> <li>Add SARIF support to <code>--output-format</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/9078">#9078</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Apply unnecessary index rule prior to enumerate rewrite (<a href="https://redirect.github.com/astral-sh/ruff/pull/9012">#9012</a>)</li> <li>[<code>flake8-err-msg</code>] Allow <code>EM</code> fixes even if <code>msg</code> variable is defined (<a href="https://redirect.github.com/astral-sh/ruff/pull/9059">#9059</a>)</li> <li>[<code>flake8-pie</code>] Prevent keyword arguments duplication (<a href="https://redirect.github.com/astral-sh/ruff/pull/8450">#8450</a>)</li> <li>[<code>flake8-pie</code>] Respect trailing comma in <code>unnecessary-dict-kwargs</code> (<code>PIE804</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9015">#9015</a>)</li> <li>[<code>flake8-raise</code>] Avoid removing parentheses on ctypes.WinError (<a href="https://redirect.github.com/astral-sh/ruff/pull/9027">#9027</a>)</li> <li>[<code>isort</code>] Avoid invalid combination of <code>force-sort-within-types</code> and <code>lines-between-types</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/9041">#9041</a>)</li> <li>[<code>isort</code>] Ensure that from-style imports are always ordered first in <code>__future__</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/9039">#9039</a>)</li> <li>[<code>pycodestyle</code>] Allow tab indentation before keyword (<a href="https://redirect.github.com/astral-sh/ruff/pull/9099">#9099</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.8</h2> <p>This release includes opt-in support for formatting Python snippets within docstrings via the <code>docstring-code-format</code> setting. <a href="https://astral.sh/blog/ruff-v0.1.8">Check out the blog post</a> for more details!</p> <h3>Preview features</h3> <ul> <li>Add <code>"preserve"</code> quote-style to mimic Black's skip-string-normalization (<a href="https://redirect.github.com/astral-sh/ruff/pull/8822">#8822</a>)</li> <li>Implement <code>prefer_splitting_right_hand_side_of_assignments</code> preview style (<a href="https://redirect.github.com/astral-sh/ruff/pull/8943">#8943</a>)</li> <li>[<code>pycodestyle</code>] Add fix for <code>unexpected-spaces-around-keyword-parameter-equals</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/9072">#9072</a>)</li> <li>[<code>pycodestyle</code>] Add fix for comment-related whitespace rules (<a href="https://redirect.github.com/astral-sh/ruff/pull/9075">#9075</a>)</li> <li>[<code>pycodestyle</code>] Allow <code>sys.path</code> modifications between imports (<a href="https://redirect.github.com/astral-sh/ruff/pull/9047">#9047</a>)</li> <li>[<code>refurb</code>] Implement <code>hashlib-digest-hex</code> (<code>FURB181</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9077">#9077</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>Allow <code>flake8-type-checking</code> rules to automatically quote runtime-evaluated references (<a href="https://redirect.github.com/astral-sh/ruff/pull/6001">#6001</a>)</li> <li>Allow transparent cell magics in Jupyter Notebooks (<a href="https://redirect.github.com/astral-sh/ruff/pull/8911">#8911</a>)</li> <li>[<code>flake8-annotations</code>] Avoid <code>ANN2xx</code> fixes for abstract methods with empty bodies (<a href="https://redirect.github.com/astral-sh/ruff/pull/9034">#9034</a>)</li> <li>[<code>flake8-self</code>] Ignore underscore references in type annotations (<a href="https://redirect.github.com/astral-sh/ruff/pull/9036">#9036</a>)</li> <li>[<code>pep8-naming</code>] Allow class names when <code>apps.get_model</code> is a non-string (<a href="https://redirect.github.com/astral-sh/ruff/pull/9065">#9065</a>)</li> <li>[<code>pycodestyle</code>] Allow <code>matplotlib.use</code> calls to intersperse imports (<a href="https://redirect.github.com/astral-sh/ruff/pull/9094">#9094</a>)</li> <li>[<code>pyflakes</code>] Support fixing unused assignments in tuples by renaming variables (<code>F841</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9107">#9107</a>)</li> <li>[<code>pylint</code>] Add fix for <code>subprocess-run-without-check</code> (<code>PLW1510</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/6708">#6708</a>)</li> </ul> <h3>Formatter</h3> <ul> <li>Add <code>docstring-code-format</code> knob to enable docstring snippet formatting (<a href="https://redirect.github.com/astral-sh/ruff/pull/8854">#8854</a>)</li> <li>Use double quotes for all docstrings, including single-quoted docstrings (<a href="https://redirect.github.com/astral-sh/ruff/pull/9020">#9020</a>)</li> <li>Implement "dynamic" line width mode for docstring code formatting (<a href="https://redirect.github.com/astral-sh/ruff/pull/9098">#9098</a>)</li> <li>Support reformatting Markdown code blocks (<a href="https://redirect.github.com/astral-sh/ruff/pull/9030">#9030</a>)</li> <li>add support for formatting reStructuredText code snippets (<a href="https://redirect.github.com/astral-sh/ruff/pull/9003">#9003</a>)</li> <li>Avoid trailing comma for single-argument with positional separator (<a href="https://redirect.github.com/astral-sh/ruff/pull/9076">#9076</a>)</li> <li>Fix handling of trailing target comment (<a href="https://redirect.github.com/astral-sh/ruff/pull/9051">#9051</a>)</li> </ul> <h3>CLI</h3> <ul> <li>Hide unsafe fix suggestions when explicitly disabled (<a href="https://redirect.github.com/astral-sh/ruff/pull/9095">#9095</a>)</li> <li>Add SARIF support to <code>--output-format</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/9078">#9078</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Apply unnecessary index rule prior to enumerate rewrite (<a href="https://redirect.github.com/astral-sh/ruff/pull/9012">#9012</a>)</li> <li>[<code>flake8-err-msg</code>] Allow <code>EM</code> fixes even if <code>msg</code> variable is defined (<a href="https://redirect.github.com/astral-sh/ruff/pull/9059">#9059</a>)</li> <li>[<code>flake8-pie</code>] Prevent keyword arguments duplication (<a href="https://redirect.github.com/astral-sh/ruff/pull/8450">#8450</a>)</li> <li>[<code>flake8-pie</code>] Respect trailing comma in <code>unnecessary-dict-kwargs</code> (<code>PIE804</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9015">#9015</a>)</li> <li>[<code>flake8-raise</code>] Avoid removing parentheses on ctypes.WinError (<a href="https://redirect.github.com/astral-sh/ruff/pull/9027">#9027</a>)</li> <li>[<code>isort</code>] Avoid invalid combination of <code>force-sort-within-types</code> and <code>lines-between-types</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/9041">#9041</a>)</li> <li>[<code>isort</code>] Ensure that from-style imports are always ordered first in <code>__future__</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/9039">#9039</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="c014622003
"><code>c014622</code></a> Bump version to v0.1.8 (<a href="https://redirect.github.com/astral-sh/ruff/issues/9116">#9116</a>)</li> <li><a href="b6fb972e6f
"><code>b6fb972</code></a> config: add new <code>docstring-code-format</code> knob (<a href="https://redirect.github.com/astral-sh/ruff/issues/8854">#8854</a>)</li> <li><a href="18452cf477
"><code>18452cf</code></a> Add <code>as_slice</code> method for all string nodes (<a href="https://redirect.github.com/astral-sh/ruff/issues/9111">#9111</a>)</li> <li><a href="cb99815c3e
"><code>cb99815</code></a> Feature: Add SARIF output support (<a href="https://redirect.github.com/astral-sh/ruff/issues/9078">#9078</a>)</li> <li><a href="45f603000d
"><code>45f6030</code></a> <code>prefer_splitting_right_hand_side_of_assignments</code> preview style (<a href="https://redirect.github.com/astral-sh/ruff/issues/8943">#8943</a>)</li> <li><a href="1a65e544c5
"><code>1a65e54</code></a> Allow <code>flake8-type-checking</code> rules to automatically quote runtime-evaluated r...</li> <li><a href="4d2ee5bf98
"><code>4d2ee5b</code></a> Add named expression handling to <code>find_assigned_value</code> (<a href="https://redirect.github.com/astral-sh/ruff/issues/9109">#9109</a>)</li> <li><a href="8314c8bb05
"><code>8314c8b</code></a> [<code>typing</code>] Add <code>find_assigned_value</code> helper func to <code>typing.rs</code> to retrieve v...</li> <li><a href="cb201bc4a5
"><code>cb201bc</code></a> <code>PIE804</code>: Prevent keyword arguments duplication (<a href="https://redirect.github.com/astral-sh/ruff/issues/8450">#8450</a>)</li> <li><a href="6c0068eeec
"><code>6c0068e</code></a> Remove <code>ExprFormattedValue</code> formatting impl (<a href="https://redirect.github.com/astral-sh/ruff/issues/9108">#9108</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/v0.1.7...v0.1.8">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%