Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
gremid committed Oct 11, 2024
1 parent feac542 commit 759efa1
Show file tree
Hide file tree
Showing 22 changed files with 3,799 additions and 1,376 deletions.
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 80
extend-select = B950
extend-ignore = E203,E501,E701
per-file-ignores =
quaxa/__init__.py:F401
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/syntax-and-unit-tests.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Python application

on: [push]

jobs:
build:
strategy:
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
pip install -U pip
pip install '.[dev]'
- name: Run unit tests
run: |
pytest --cov=quaxa
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,4 @@ venv.bak/
.vscode
profile/data*
.theia
*.temp
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
21 changes: 0 additions & 21 deletions .zenodo.json

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
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.
limitations under the License.
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Wenn 1 Knock-out Kriterium identifiziert wird, dann wird direkt der Score direkt
| `has_blacklist_words` | bool | Satzbeleg enthält Wörter, sodass in keinem Fall der Satzbeleg als Wörterbuchbeispiel in Betracht gezogen wird; ausgenommen das Blacklist-Wort ist selbt der Wörterbucheintrag. (dt. Blacklist ist voreingestellt) | [1] GDEX blacklist |

### Diskontierungsfakoren
Je Kriterium wird ein Faktor berechnet, und alle Faktoren miteinander multipliziert.
Je Kriterium wird ein Faktor berechnet, und alle Faktoren miteinander multipliziert.
Wenn bspw. ein Faktor eine Penality von 0.1 bekommt, dann ist der Faktor 0.9.
Für den Gesamtscore wird der Gesamtfaktor mit 0.5 multipliziert.

Expand Down Expand Up @@ -79,11 +79,11 @@ pip install -r requirements-dev.txt --no-cache-dir
Publish

```sh
python setup.py sdist
python setup.py sdist
twine upload -r pypi dist/*
```

### Clean up
### Clean up

```sh
find . -type f -name "*.pyc" | xargs rm
Expand All @@ -104,6 +104,11 @@ Please contribute using [Github Flow](https://guides.github.com/introduction/flo
### Acknowledgements
The "Evidence" project was funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - [433249742](https://gepris.dfg.de/gepris/projekt/433249742) (GU 798/27-1; GE 1119/11-1).

QUAXA makes use of [VulGer](https://aclanthology.org/W19-3513), a
lexicon covering words from the lower end of the German language
register — terms typically considered rough, vulgar, or
obscene. VulGer is used under the terms of the CC-BY-SA license.

### Maintenance
- till 31.Aug.2023 (v0.1.0) the code repository was maintained within the DFG project [433249742](https://gepris.dfg.de/gepris/projekt/433249742)
- since 01.Sep.2023 (v0.1.0) the code repository is maintained by Ulf Hamster.
- since 01.Sep.2023 (v0.1.0) the code repository is maintained by Ulf Hamster.
34 changes: 0 additions & 34 deletions demo/demo.conllu

This file was deleted.

28 changes: 0 additions & 28 deletions demo/demo_quaxa.py

This file was deleted.

48 changes: 48 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "quaxa"
version = "0.1.1"
description = "QUAlity of sentence eXAmples scoring"
authors = [{name = "Ulf Hamster", email = "[email protected]"}]
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Topic :: Education",
"Topic :: Scientific/Engineering",
"Topic :: Text Processing :: Linguistic"
]
requires-python = ">=3.7"
dependencies = ["spacy>=3.7"]
dynamic = ["readme"]

[project.optional-dependencies]
dev = [
"coverage",
"flake8",
"flake8-bugbear",
"mypy",
"pre-commit",
"pytest",
"pytest-cov",
"de-core-news-sm @ https://github.com/explosion/spacy-models/releases/download/de_core_news_sm-3.7.0/de_core_news_sm-3.7.0-py3-none-any.whl#sha256=d88c737eb7eb766f730f6a2dcb99dfcdb81623e1e0d89a9c638a2182ac19c52e"
]

[project.urls]
Homepage = "https://github.com/ulf1/quaxa"

[tool.isort]
profile = "black"

[tool.setuptools.dynamic]
readme = {file = ["README.md"], content-type = "text/markdown"}

[tool.setuptools.packages.find]
exclude = ["tests"]

[tool.setuptools.package-data]
"quaxa" = ["VulGer.csv"]
Loading

0 comments on commit 759efa1

Please sign in to comment.