Skip to content

Commit

Permalink
Fix setup
Browse files Browse the repository at this point in the history
* force beancount < 3
* enable test on pull_requests
* pre-commit updates
* formatting with newer versions
  • Loading branch information
tarioch committed Aug 14, 2024
1 parent fa72974 commit 3dd511b
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: ci
on:
push:
pull_request:
jobs:
test:
name: Run tests and build distribution
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.12, 3.8]
steps:
- uses: actions/checkout@master
with:
Expand All @@ -34,7 +35,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: 3.9
python-version: 3.12
- name: Install Dependencies
run: |
pip install wheel setuptools
Expand Down
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
exclude: '^docs/conf.py'

repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
Expand All @@ -18,18 +18,18 @@ repos:
args: ['--fix=auto']

- repo: https://github.com/pycqa/isort
rev: 5.9.3
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 21.8b0
rev: 24.8.0
hooks:
- id: black
language_version: python3

- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8

Expand All @@ -40,7 +40,7 @@ repos:
files: README.rst

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
rev: v1.11.1
hooks:
- id: mypy
args: [--install-types, --non-interactive, --ignore-missing-imports]
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ packages = find:
setup_requires =
setuptools_scm
install_requires =
beancount>=2.0.0
beancount>=2.0.0,<3.0.0
scikit-learn>=0.19
numpy>=1.8.2
scipy>=0.13.3
Expand Down
1 change: 1 addition & 0 deletions smart_importer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Smart importer for Beancount and Fava."""

from smart_importer.entries import update_postings
from smart_importer.hooks import apply_hooks # noqa
from smart_importer.predictor import EntryPredictor
Expand Down
1 change: 1 addition & 0 deletions smart_importer/detector.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Duplicate detector hook."""

import logging

from beancount.ingest import similar
Expand Down
1 change: 1 addition & 0 deletions smart_importer/hooks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Importer decorators."""

import logging
from functools import wraps

Expand Down
1 change: 1 addition & 0 deletions smart_importer/pipelines.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Machine learning pipelines for data extraction."""

import operator
from typing import List

Expand Down
1 change: 1 addition & 0 deletions smart_importer/predictor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Machine learning importer decorators."""

# pylint: disable=unsubscriptable-object

import logging
Expand Down
1 change: 1 addition & 0 deletions tests/data_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the `PredictPostings` decorator"""

# pylint: disable=missing-docstring
import os
import pprint
Expand Down
1 change: 1 addition & 0 deletions tests/pipelines_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the Machine Learning Helpers."""

# pylint: disable=missing-docstring
from beancount.parser import parser

Expand Down
1 change: 1 addition & 0 deletions tests/predictors_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the `PredictPayees` and the `PredictPostings` decorator"""

# pylint: disable=missing-docstring
from beancount.ingest.importer import ImporterProtocol
from beancount.parser import parser
Expand Down

0 comments on commit 3dd511b

Please sign in to comment.