Skip to content

Commit

Permalink
Merge pull request #154 from ufal/isort
Browse files Browse the repository at this point in the history
Isort
  • Loading branch information
kasnerz authored Nov 21, 2024
2 parents 78fa769 + 37c60ad commit 2315e97
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 4 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/isort_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Black

on:
push:
branches: [ main, release-1.0.0]
pull_request:
branches: [ main, release-1.0.0]

jobs:

check-black:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install isort 5.13.2 - check setup.py if version matches
run: |
python -m pip install --upgrade pip
pip install isort==5.13.2
- name: Isort check
run: |
isort --check --diff factgenie || echo "We know it fails ATM"
isort --check --diff tests
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[tool.black]
line-length = 120
target-version = ['py39']
force-exclude = '''
/(
\.git
| \.github
)/
'''

[tool.isort]
profile="black"
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
# See also pyproject.toml and setup of line length (to 120 characters)
"ipdb",
"black==24.10.0",
"isort==5.13.2",
],
"test": [
"pytest>=8.3.3",
Expand Down
4 changes: 3 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# conftest.py
import pytest
import shutil

import pytest

from factgenie import MAIN_CONFIG_PATH


Expand Down
6 changes: 3 additions & 3 deletions tests/test_cli_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Run cli commands which wrap high level functionalites as a kind of functional tests.
"""

from pathlib import Path
import subprocess
import logging
import subprocess
from pathlib import Path

from factgenie import INPUT_DIR, OUTPUT_DIR, CAMPAIGN_DIR
from factgenie import CAMPAIGN_DIR, INPUT_DIR, OUTPUT_DIR


def test_factgenie_help():
Expand Down

0 comments on commit 2315e97

Please sign in to comment.