Skip to content

Commit

Permalink
Merge pull request #741 from aliparlakci/development
Browse files Browse the repository at this point in the history
  • Loading branch information
Serene-Arc authored Jan 31, 2023
2 parents 1dc5ead + 0846aed commit 8c293a4
Show file tree
Hide file tree
Showing 88 changed files with 1,112 additions and 630 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/formatting_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: formatting_check
run-name: Check code formatting
on: [push, pull_request]
jobs:
formatting_check:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo gem install mdl
- uses: actions/checkout@v3
- uses: paolorechia/[email protected]
with:
tox_env: "format_check"
14 changes: 7 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
- name: Upload coverage report
uses: actions/upload-artifact@v2
- name: Upload dist folder
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
22 changes: 15 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ name: Python Test
on:
push:
branches: [ master, development ]
paths-ignore:
- "**.md"
- ".markdown_style.rb"
- ".mdlrc"
pull_request:
branches: [ master, development ]
paths-ignore:
- "**.md"
- ".markdown_style.rb"
- ".mdlrc"

jobs:
test:
Expand All @@ -19,16 +27,16 @@ jobs:
python-version: 3.9
ext: .ps1
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip flake8 pytest pytest-cov
pip install -r requirements.txt
python -m pip install --upgrade pip Flake8-pyproject pytest pytest-cov
pip install .
- name: Make configuration for tests
env:
Expand All @@ -38,14 +46,14 @@ jobs:
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --select=E9,F63,F7,F82
- name: Test with pytest
run: |
pytest -m 'not slow' --verbose --cov=./bdfr/ --cov-report term:skip-covered --cov-report html
- name: Upload coverage report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: coverage_report
path: htmlcov/
4 changes: 4 additions & 0 deletions .markdown_style.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
all
exclude_tag :line_length
rule 'MD007', :indent => 4
rule 'MD029', :style => 'ordered'
1 change: 1 addition & 0 deletions .mdlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
style "#{File.dirname(__FILE__)}/.markdown_style.rb"
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

repos:
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.11.4
hooks:
- id: isort
name: isort (python)

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [Flake8-pyproject]

- repo: https://github.com/markdownlint/markdownlint
rev: v0.12.0
hooks:
- id: markdownlint
Loading

0 comments on commit 8c293a4

Please sign in to comment.