github-actions[bot] c11aeb5dd2
build(deps-dev): bump ruff from 0.1.5 to 0.1.6 (#410)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.5 to 0.1.6.
<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.6</h2>
<h2>Changes</h2>
<h2>0.1.6</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>flake8-boolean-trap</code>] Extend
<code>boolean-type-hint-positional-argument</code> (<code>FBT001</code>)
to include booleans in unions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/7501">#7501</a>)</li>
<li>[<code>flake8-pie</code>] Extend
<code>reimplemented-list-builtin</code> (<code>PIE807</code>) to
<code>dict</code> reimplementations (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8608">#8608</a>)</li>
<li>[<code>flake8-pie</code>] Extend <code>unnecessary-pass</code>
(<code>PIE790</code>) to include ellipses (<code>...</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8641">#8641</a>)</li>
<li>[<code>flake8-pie</code>] Implement fix for
<code>unnecessary-spread</code> (<code>PIE800</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8668">#8668</a>)</li>
<li>[<code>flake8-quotes</code>] Implement
<code>unnecessary-escaped-quote</code> (<code>Q004</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8630">#8630</a>)</li>
<li>[<code>pycodestyle</code>] Implement fix for
<code>multiple-spaces-after-keyword</code> (<code>E271</code>) and
<code>multiple-spaces-before-keyword</code> (<code>E272</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8622">#8622</a>)</li>
<li>[<code>pycodestyle</code>] Implement fix for
<code>multiple-spaces-after-operator</code> (<code>E222</code>) and
<code>multiple-spaces-before-operator</code> (<code>E221</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8623">#8623</a>)</li>
<li>[<code>pyflakes</code>] Extend <code>is-literal</code>
(<code>F632</code>) to include comparisons against mutable initializers
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8607">#8607</a>)</li>
<li>[<code>pylint</code>] Implement
<code>redefined-argument-from-local</code> (<code>PLR1704</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8159">#8159</a>)</li>
<li>[<code>pylint</code>] Implement fix for
<code>unnecessary-lambda</code> (<code>PLW0108</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8621">#8621</a>)</li>
<li>[<code>refurb</code>] Implement <code>if-expr-min-max</code>
(<code>FURB136</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8664">#8664</a>)</li>
<li>[<code>refurb</code>] Implement <code>math-constant</code>
(<code>FURB152</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8727">#8727</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-annotations</code>] Add autotyping-like return type
inference for annotation rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8643">#8643</a>)</li>
<li>[<code>flake8-future-annotations</code>] Implement fix for
<code>future-required-type-annotation</code> (<code>FA102</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8711">#8711</a>)</li>
<li>[<code>flake8-implicit-namespace-package</code>] Avoid missing
namespace violations in scripts with shebangs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8710">#8710</a>)</li>
<li>[<code>pydocstyle</code>] Update <code>over-indentation</code>
(<code>D208</code>) to preserve indentation offsets when fixing
overindented lines (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8699">#8699</a>)</li>
<li>[<code>pyupgrade</code>] Refine <code>timeout-error-alias</code>
(<code>UP041</code>) to remove false positives (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8587">#8587</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Fix instability in <code>await</code> formatting with fluent style
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8676">#8676</a>)</li>
<li>Compare formatted and unformatted ASTs during formatter tests (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8624">#8624</a>)</li>
<li>Preserve trailing semicolon for Notebooks (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8590">#8590</a>)</li>
</ul>
<h3>CLI</h3>
<ul>
<li>Improve debug printing for resolving origin of config settings (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8729">#8729</a>)</li>
<li>Write unchanged, excluded files to stdout when read via stdin (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8596">#8596</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>[<code>isort</code>] Support disabling sections with
<code>no-sections = true</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8657">#8657</a>)</li>
<li>[<code>pep8-naming</code>] Support local and dynamic class- and
static-method decorators (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8592">#8592</a>)</li>
<li>[<code>pydocstyle</code>] Allow overriding pydocstyle convention
rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8586">#8586</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Avoid syntax error via importing <code>trio.lowlevel</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8730">#8730</a>)</li>
<li>Omit unrolled augmented assignments in <code>PIE794</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8634">#8634</a>)</li>
<li>Slice source code instead of generating it for <code>EM</code> fixes
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/7746">#7746</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.6</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>flake8-boolean-trap</code>] Extend
<code>boolean-type-hint-positional-argument</code> (<code>FBT001</code>)
to include booleans in unions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/7501">#7501</a>)</li>
<li>[<code>flake8-pie</code>] Extend
<code>reimplemented-list-builtin</code> (<code>PIE807</code>) to
<code>dict</code> reimplementations (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8608">#8608</a>)</li>
<li>[<code>flake8-pie</code>] Extend <code>unnecessary-pass</code>
(<code>PIE790</code>) to include ellipses (<code>...</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8641">#8641</a>)</li>
<li>[<code>flake8-pie</code>] Implement fix for
<code>unnecessary-spread</code> (<code>PIE800</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8668">#8668</a>)</li>
<li>[<code>flake8-quotes</code>] Implement
<code>unnecessary-escaped-quote</code> (<code>Q004</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8630">#8630</a>)</li>
<li>[<code>pycodestyle</code>] Implement fix for
<code>multiple-spaces-after-keyword</code> (<code>E271</code>) and
<code>multiple-spaces-before-keyword</code> (<code>E272</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8622">#8622</a>)</li>
<li>[<code>pycodestyle</code>] Implement fix for
<code>multiple-spaces-after-operator</code> (<code>E222</code>) and
<code>multiple-spaces-before-operator</code> (<code>E221</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8623">#8623</a>)</li>
<li>[<code>pyflakes</code>] Extend <code>is-literal</code>
(<code>F632</code>) to include comparisons against mutable initializers
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8607">#8607</a>)</li>
<li>[<code>pylint</code>] Implement
<code>redefined-argument-from-local</code> (<code>PLR1704</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8159">#8159</a>)</li>
<li>[<code>pylint</code>] Implement fix for
<code>unnecessary-lambda</code> (<code>PLW0108</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8621">#8621</a>)</li>
<li>[<code>refurb</code>] Implement <code>if-expr-min-max</code>
(<code>FURB136</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8664">#8664</a>)</li>
<li>[<code>refurb</code>] Implement <code>math-constant</code>
(<code>FURB152</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8727">#8727</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-annotations</code>] Add autotyping-like return type
inference for annotation rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8643">#8643</a>)</li>
<li>[<code>flake8-future-annotations</code>] Implement fix for
<code>future-required-type-annotation</code> (<code>FA102</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8711">#8711</a>)</li>
<li>[<code>flake8-implicit-namespace-package</code>] Avoid missing
namespace violations in scripts with shebangs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8710">#8710</a>)</li>
<li>[<code>pydocstyle</code>] Update <code>over-indentation</code>
(<code>D208</code>) to preserve indentation offsets when fixing
overindented lines (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8699">#8699</a>)</li>
<li>[<code>pyupgrade</code>] Refine <code>timeout-error-alias</code>
(<code>UP041</code>) to remove false positives (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8587">#8587</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Fix instability in <code>await</code> formatting with fluent style
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/8676">#8676</a>)</li>
<li>Compare formatted and unformatted ASTs during formatter tests (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8624">#8624</a>)</li>
<li>Preserve trailing semicolon for Notebooks (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8590">#8590</a>)</li>
</ul>
<h3>CLI</h3>
<ul>
<li>Improve debug printing for resolving origin of config settings (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8729">#8729</a>)</li>
<li>Write unchanged, excluded files to stdout when read via stdin (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8596">#8596</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>[<code>isort</code>] Support disabling sections with
<code>no-sections = true</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8657">#8657</a>)</li>
<li>[<code>pep8-naming</code>] Support local and dynamic class- and
static-method decorators (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8592">#8592</a>)</li>
<li>[<code>pydocstyle</code>] Allow overriding pydocstyle convention
rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8586">#8586</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Avoid syntax error via importing <code>trio.lowlevel</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8730">#8730</a>)</li>
<li>Omit unrolled augmented assignments in <code>PIE794</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8634">#8634</a>)</li>
<li>Slice source code instead of generating it for <code>EM</code> fixes
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/7746">#7746</a>)</li>
<li>Allow whitespace around colon in slices for
<code>whitespace-before-punctuation</code> (<code>E203</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8654">#8654</a>)</li>
<li>Use function range for <code>no-self-use</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8637">#8637</a>)</li>
<li>F-strings doesn't contain bytes literal for <code>PLW0129</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8675">#8675</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f460f9c5c0"><code>f460f9c</code></a>
Bump version to v0.1.6 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8744">#8744</a>)</li>
<li><a
href="2faac1e7a8"><code>2faac1e</code></a>
[<code>refurb</code>] Implement <code>math-constant</code>
(<code>FURB152</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8727">#8727</a>)</li>
<li><a
href="b7dbb9062c"><code>b7dbb90</code></a>
Remove incorrect deprecation label for stdout and stderr (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8743">#8743</a>)</li>
<li><a
href="66794bc9fe"><code>66794bc</code></a>
Remove erroneous bad-dunder-name reference (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8742">#8742</a>)</li>
<li><a
href="dca430f4d2"><code>dca430f</code></a>
Fix instability with await fluent style (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8676">#8676</a>)</li>
<li><a
href="841e6c889e"><code>841e6c8</code></a>
Add River in &quot;Who's Using Ruff?&quot; section (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8740">#8740</a>)</li>
<li><a
href="bd99175fea"><code>bd99175</code></a>
Update <code>D208</code> to preserve indentation offsets when fixing
overindented lines ...</li>
<li><a
href="4c86b155f2"><code>4c86b15</code></a>
Fix typo (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8735">#8735</a>)</li>
<li><a
href="e2109c1353"><code>e2109c1</code></a>
Improve debug printing for resolving origin of config settings (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8729">#8729</a>)</li>
<li><a
href="1fcccf82fc"><code>1fcccf8</code></a>
Avoid syntax error via importing trio.lowlevel (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8730">#8730</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.1.5...v0.1.6">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.5&new-version=0.1.6)](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-11-20 19:40:54 +00:00
2023-11-12 14:22:56 +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%