Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #16 from felixhoffmnn/project-config
Browse files Browse the repository at this point in the history
Added Python Project Config
  • Loading branch information
felixhoffmnn authored Oct 4, 2022
2 parents d21569b + decb93b commit 2d3704f
Show file tree
Hide file tree
Showing 18 changed files with 2,389 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
ignore = E203, E266, E501, W503
max-line-length = 120
max-complexity = 18
select = B,C,E,F,W,T4
16 changes: 16 additions & 0 deletions .github/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- dhbw
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
79 changes: 79 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
ci:
autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit.com hooks"
autofix_prs: true
skip: [pytest, pytest-cov]

repos:
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort
stages: [commit]
types: [python]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-yaml
stages: [commit]
types: [yaml]

- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
args: [--line-length=79]
stages: [commit]
types: [python]

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
name: flake8
stages: [commit]
types: [python]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
hooks:
- id: mypy
name: mypy
stages: [commit]
types: [python]
require_serial: true

- repo: local
hooks:
- id: pytest
name: pytest
stages: [commit]
language: system
entry: poetry run pytest
types: [python]
pass_filenames: false

- id: pytest-cov
name: pytest
stages: [push]
language: system
entry: poetry run pytest --cov --cov-fail-under=80
types: [python]
pass_filenames: false

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.7.1"
hooks:
- id: prettier
name: prettier
stages: [commit]
exclude_types: [python]

- repo: https://github.com/asottile/pyupgrade
rev: v2.38.2
hooks:
- id: pyupgrade
name: pyupgrade
stages: [commit]
args: [--py310-plus]
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
poetry.lock
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"endOfLine": "lf",
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": false,
"printWidth": 120
}
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"recommendations": [
"ms-toolsai.jupyter",
"esbenp.prettier-vscode",
"wayou.vscode-todo-highlight",
"yzhang.markdown-all-in-one",
"seatonjiang.gitmoji-vscode",
"streetsidesoftware.code-spell-checker",
"adpyke.codesnap",
Expand Down
10 changes: 8 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
{
"cSpell.language": "en,de-de",
"cSpell.language": "en, de-de, lorem-ipsum, python",
"cSpell.words": [
"autofix",
"autorefs",
"dhbw",
"DHBW",
"docstrings",
"fontawesome",
"Hoffmann",
"isort",
"kontakt",
"linkedin",
"mkdocs",
"mkdocstrings",
"mypy",
"pytest",
"pytests",
"Studienarbeit"
"pyupgrade",
"Studienarbeit",
"wontfix"
],
"cSpell.ignorePaths": [".git", ".vscode"],
"editor.formatOnSave": true,
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Felix Hoffmann and Leopold Fuchs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# PoliAna: Nachrichten und Politikanalyse mittels Natural Language Processing

- [PoliAna: Nachrichten und Politikanalyse mittels Natural Language Processing](#poliana-nachrichten-und-politikanalyse-mittels-natural-language-processing)
- [Abstract](#abstract)
- [Get started](#get-started)

## Abstract

<!-- TODO: Edit paragraph -->

Excepteur ea eiusmod adipisicing dolor do qui mollit tempor. Tempor sit cillum ipsum aliquip excepteur eiusmod ut laboris consectetur veniam. Ipsum ad ad officia voluptate amet. Tempor anim Lorem excepteur sit est magna ad ex in labore consequat est. Aute aliqua nisi labore elit eiusmod aute excepteur cillum. Consectetur do fugiat reprehenderit irure commodo anim eu et non id enim excepteur irure. Occaecat aliquip eiusmod sit officia do et quis ut duis duis cillum eiusmod.

## Get started

<!-- TODO: Edit list -->

1. Run `poetry install` to install all dependencies (even the ones for development)
- Afterwards, run `poetry shell` to activate the virtual environment
2. Install the pre-commit hooks with `poetry run pre-commit install`
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Studienarbeit

[![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-3100/)
37 changes: 37 additions & 0 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
site_name: studienarbeit
site_description: The studienarbeit is a scientific paper which is written in the 5th and 6th semester at the DHBW.
site_author: Felix Hoffmann und Leopold Fuchs
repo_name: studienarbeit
repo_url: https://github.com/felixhoffmnn/studienarbeit
nav:
- Getting started: index.md
plugins:
- search
- autorefs
- mkdocstrings
theme:
name: material
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/lightbulb
name: Switch to light mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/lightbulb-outline
name: Switch to dark mode
features:
- search.suggest
- search.highlight
- content.tabs.link
language: en
extra:
social:
- icon: fontawesome/brands/linkedin
link: https://www.linkedin.com/in/felix-emmanuel-hoffmann/
name: Felix Hoffmann
- icon: fontawesome/brands/linkedin
link: https://www.linkedin.com/in/leopold-fuchs/
name: Leopold Fuchs
Loading

0 comments on commit 2d3704f

Please sign in to comment.