Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force beancount < 3 and enable tests also on pull_request #132

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: ci
on:
push:
pull_request:
jobs:
test:
name: Run tests and build distribution
Expand Down
72 changes: 33 additions & 39 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,46 @@
exclude: "^docs/conf.py"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: mixed-line-ending
args: ["--fix=auto"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: mixed-line-ending
args: ['--fix=auto']

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

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

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

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: ["--py37-plus"]

- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.1
hooks:
- id: rst-linter
files: README.rst

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
args: [--install-types, --non-interactive, --ignore-missing-imports]
- repo: https://github.com/pre-commit/mirrors-mypy
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 @@ -33,7 +33,7 @@ packages = find:
setup_requires =
setuptools_scm
install_requires =
beancount>=2.3.5
beancount>=2.3.5,<3.0.0
scikit-learn>=1.0
numpy>=1.18.0

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/predictor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Machine learning importer decorators."""

# pylint: disable=unsubscriptable-object

from __future__ import annotations
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
import numpy as np
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