github-actions[bot] 9140fc84bc
build(deps-dev): bump ruff from 0.1.6 to 0.1.7 (#441)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.6 to 0.1.7.
<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.7</h2>
<h2>Changes</h2>
<h3>Preview features</h3>
<ul>
<li>Implement multiline dictionary and list hugging for preview style
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8293">#8293</a>)</li>
<li>Implement the <code>fix_power_op_line_length</code> preview style
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8947">#8947</a>)</li>
<li>Use Python version to determine typing rewrite safety (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8919">#8919</a>)</li>
<li>[<code>flake8-annotations</code>] Enable auto-return-type involving
<code>Optional</code> and <code>Union</code> annotations (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8885">#8885</a>)</li>
<li>[<code>flake8-bandit</code>] Implement <code>django-raw-sql</code>
(<code>S611</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8651">#8651</a>)</li>
<li>[<code>flake8-bandit</code>] Implement
<code>tarfile-unsafe-members</code> (<code>S202</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8829">#8829</a>)</li>
<li>[<code>flake8-pyi</code>] Implement fix for
<code>unnecessary-literal-union</code> (<code>PYI030</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/7934">#7934</a>)</li>
<li>[<code>flake8-simplify</code>] Extend
<code>dict-get-with-none-default</code> (<code>SIM910</code>) to
non-literals (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8762">#8762</a>)</li>
<li>[<code>pylint</code>] - add
<code>unnecessary-list-index-lookup</code> (<code>PLR1736</code>) +
autofix (<a
href="https://redirect.github.com/astral-sh/ruff/pull/7999">#7999</a>)</li>
<li>[<code>pylint</code>] - implement R0202 and R0203 with autofixes (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8335">#8335</a>)</li>
<li>[<code>pylint</code>] Implement <code>repeated-keyword</code>
(<code>PLE1132</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8706">#8706</a>)</li>
<li>[<code>pylint</code>] Implement <code>too-many-positional</code>
(<code>PLR0917</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8995">#8995</a>)</li>
<li>[<code>pylint</code>] Implement
<code>unnecessary-dict-index-lookup</code> (<code>PLR1733</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8036">#8036</a>)</li>
<li>[<code>refurb</code>] Implement <code>redundant-log-base</code>
(<code>FURB163</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8842">#8842</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-boolean-trap</code>] Allow booleans in
<code>@override</code> methods (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8882">#8882</a>)</li>
<li>[<code>flake8-bugbear</code>] Avoid
<code>B015</code>,<code>B018</code> for last expression in a cell (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8815">#8815</a>)</li>
<li>[<code>flake8-pie</code>] Allow ellipses for enum values in stub
files (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8825">#8825</a>)</li>
<li>[<code>flake8-pyi</code>] Check PEP 695 type aliases for
<code>snake-case-type-alias</code> and
<code>t-suffixed-type-alias</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8966">#8966</a>)</li>
<li>[<code>flake8-pyi</code>] Check for kwarg and vararg
<code>NoReturn</code> type annotations (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8948">#8948</a>)</li>
<li>[<code>flake8-simplify</code>] Omit select context managers from
<code>SIM117</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8801">#8801</a>)</li>
<li>[<code>pep8-naming</code>] Allow Django model loads in
<code>non-lowercase-variable-in-function</code> (<code>N806</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8917">#8917</a>)</li>
<li>[<code>pycodestyle</code>] Avoid <code>E703</code> for last
expression in a cell (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8821">#8821</a>)</li>
<li>[<code>pycodestyle</code>] Update <code>E402</code> to work at cell
level for notebooks (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8872">#8872</a>)</li>
<li>[<code>pydocstyle</code>] Avoid <code>D100</code> for Jupyter
Notebooks (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8816">#8816</a>)</li>
<li>[<code>pylint</code>] Implement fix for
<code>unspecified-encoding</code> (<code>PLW1514</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8928">#8928</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Avoid unstable formatting in ellipsis-only body with trailing
comment (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8984">#8984</a>)</li>
<li>Inline trailing comments for type alias similar to assignments (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8941">#8941</a>)</li>
<li>Insert trailing comma when function breaks with single argument (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8921">#8921</a>)</li>
</ul>
<h3>CLI</h3>
<ul>
<li>Update <code>ruff check</code> and <code>ruff format</code> to
default to the current directory (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8791">#8791</a>)</li>
<li>Stop at the first resolved parent configuration (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8864">#8864</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>[<code>pylint</code>] Default <code>max-positional-args</code> to
<code>max-args</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8998">#8998</a>)</li>
<li>[<code>pylint</code>] Add <code>allow-dunder-method-names</code>
setting for <code>bad-dunder-method-name</code> (<code>PLW3201</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8812">#8812</a>)</li>
<li>[<code>isort</code>] Add support for <code>from-first</code> setting
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8663">#8663</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.7</h2>
<h3>Preview features</h3>
<ul>
<li>Implement multiline dictionary and list hugging for preview style
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8293">#8293</a>)</li>
<li>Implement the <code>fix_power_op_line_length</code> preview style
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8947">#8947</a>)</li>
<li>Use Python version to determine typing rewrite safety (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8919">#8919</a>)</li>
<li>[<code>flake8-annotations</code>] Enable auto-return-type involving
<code>Optional</code> and <code>Union</code> annotations (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8885">#8885</a>)</li>
<li>[<code>flake8-bandit</code>] Implement <code>django-raw-sql</code>
(<code>S611</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8651">#8651</a>)</li>
<li>[<code>flake8-bandit</code>] Implement
<code>tarfile-unsafe-members</code> (<code>S202</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8829">#8829</a>)</li>
<li>[<code>flake8-pyi</code>] Implement fix for
<code>unnecessary-literal-union</code> (<code>PYI030</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/7934">#7934</a>)</li>
<li>[<code>flake8-simplify</code>] Extend
<code>dict-get-with-none-default</code> (<code>SIM910</code>) to
non-literals (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8762">#8762</a>)</li>
<li>[<code>pylint</code>] - add
<code>unnecessary-list-index-lookup</code> (<code>PLR1736</code>) +
autofix (<a
href="https://redirect.github.com/astral-sh/ruff/pull/7999">#7999</a>)</li>
<li>[<code>pylint</code>] - implement R0202 and R0203 with autofixes (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8335">#8335</a>)</li>
<li>[<code>pylint</code>] Implement <code>repeated-keyword</code>
(<code>PLe1132</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8706">#8706</a>)</li>
<li>[<code>pylint</code>] Implement <code>too-many-positional</code>
(<code>PLR0917</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8995">#8995</a>)</li>
<li>[<code>pylint</code>] Implement
<code>unnecessary-dict-index-lookup</code> (<code>PLR1733</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8036">#8036</a>)</li>
<li>[<code>refurb</code>] Implement <code>redundant-log-base</code>
(<code>FURB163</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8842">#8842</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-boolean-trap</code>] Allow booleans in
<code>@override</code> methods (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8882">#8882</a>)</li>
<li>[<code>flake8-bugbear</code>] Avoid
<code>B015</code>,<code>B018</code> for last expression in a cell (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8815">#8815</a>)</li>
<li>[<code>flake8-pie</code>] Allow ellipses for enum values in stub
files (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8825">#8825</a>)</li>
<li>[<code>flake8-pyi</code>] Check PEP 695 type aliases for
<code>snake-case-type-alias</code> and
<code>t-suffixed-type-alias</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8966">#8966</a>)</li>
<li>[<code>flake8-pyi</code>] Check for kwarg and vararg
<code>NoReturn</code> type annotations (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8948">#8948</a>)</li>
<li>[<code>flake8-simplify</code>] Omit select context managers from
<code>SIM117</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8801">#8801</a>)</li>
<li>[<code>pep8-naming</code>] Allow Django model loads in
<code>non-lowercase-variable-in-function</code> (<code>N806</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8917">#8917</a>)</li>
<li>[<code>pycodestyle</code>] Avoid <code>E703</code> for last
expression in a cell (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8821">#8821</a>)</li>
<li>[<code>pycodestyle</code>] Update <code>E402</code> to work at cell
level for notebooks (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8872">#8872</a>)</li>
<li>[<code>pydocstyle</code>] Avoid <code>D100</code> for Jupyter
Notebooks (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8816">#8816</a>)</li>
<li>[<code>pylint</code>] Implement fix for
<code>unspecified-encoding</code> (<code>PLW1514</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8928">#8928</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Avoid unstable formatting in ellipsis-only body with trailing
comment (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8984">#8984</a>)</li>
<li>Inline trailing comments for type alias similar to assignments (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8941">#8941</a>)</li>
<li>Insert trailing comma when function breaks with single argument (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8921">#8921</a>)</li>
</ul>
<h3>CLI</h3>
<ul>
<li>Update <code>ruff check</code> and <code>ruff format</code> to
default to the current directory (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8791">#8791</a>)</li>
<li>Stop at the first resolved parent configuration (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8864">#8864</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>[<code>pylint</code>] Default <code>max-positional-args</code> to
<code>max-args</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8998">#8998</a>)</li>
<li>[<code>pylint</code>] Add <code>allow-dunder-method-names</code>
setting for <code>bad-dunder-method-name</code> (<code>PLW3201</code>)
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8812">#8812</a>)</li>
<li>[<code>isort</code>] Add support for <code>from-first</code> setting
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8663">#8663</a>)</li>
<li>[<code>isort</code>] Add support for <code>length-sort</code>
settings (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8841">#8841</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8d9912a83a"><code>8d9912a</code></a>
Bump version to v0.1.7 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8999">#8999</a>)</li>
<li><a
href="93258e8d5b"><code>93258e8</code></a>
Default <code>max-positional-args</code> to <code>max-args</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8998">#8998</a>)</li>
<li><a
href="b90027d037"><code>b90027d</code></a>
[<code>pylint</code>] Implement <code>too-many-positional</code>
(<code>PLR0917</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8995">#8995</a>)</li>
<li><a
href="060a25df09"><code>060a25d</code></a>
Rename semantic model flag <code>LITERAL</code> to
<code>TYPING_LITERAL</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8997">#8997</a>)</li>
<li><a
href="f5d4676c13"><code>f5d4676</code></a>
Bump ureq from 2.8.0 to 2.9.1 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8993">#8993</a>)</li>
<li><a
href="df69dc9f8d"><code>df69dc9</code></a>
Bump url from 2.4.1 to 2.5.0 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8994">#8994</a>)</li>
<li><a
href="cb6c37abd9"><code>cb6c37a</code></a>
Bump js-sys from 0.3.65 to 0.3.66 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8992">#8992</a>)</li>
<li><a
href="54de990621"><code>54de990</code></a>
Bump fs-err from 2.10.0 to 2.11.0 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8991">#8991</a>)</li>
<li><a
href="b91b09b961"><code>b91b09b</code></a>
Bump schemars from 0.8.15 to 0.8.16 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8990">#8990</a>)</li>
<li><a
href="0bda1913d1"><code>0bda191</code></a>
Create dedicated <code>is_*_enabled</code> functions for each preview
style (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8988">#8988</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.1.6...v0.1.7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.1.6&new-version=0.1.7)](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>
2023-12-07 16:18:18 +01:00
2023-11-12 14:22:56 +01:00
2023-12-04 19:05:52 +01:00
2023-12-04 19:05:52 +01:00

aki_prj23_transparenzregister

python Actions status Ruff pre-commit Checked with mypy Documentation Status Code style: black

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
No description provided
Readme 138 MiB
Languages
Jupyter Notebook 84.5%
HTML 12.1%
Python 3.3%