Skip to content

Commit

Permalink
(merge)
Browse files Browse the repository at this point in the history
  • Loading branch information
blais committed Jun 1, 2024
2 parents 1c95d94 + 19e3bb5 commit ebf1910
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 114 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- '3.9'
- '3.10'
- '3.11'
- '3.12-dev'
- '3.12'
beancount:
- '~=2.3.5'
- '@git+https://github.com/beancount/beancount.git'
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: build
on:
push:
tags:
- 'v[0-9]*'

jobs:
wheels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: python -m pip install build twine
- run: python -m build
- run: python -m twine upload dist/*
env:
TWINE_REPOSITORY: testpypi
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI }}
20 changes: 0 additions & 20 deletions .ruff.toml

This file was deleted.

8 changes: 0 additions & 8 deletions COPYING → LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,3 @@ proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.


------------------------------------------------------------

Note:
This is a GNU GPL "v2 only" license.
This is not a GNU GPL "v2 or any later version" license.
---Martin Blais
41 changes: 0 additions & 41 deletions README.md

This file was deleted.

19 changes: 19 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
beangulp: Importers Framework for Beancount
-------------------------------------------

``beangulp`` provides a framework for importing transactions into a
Beancoount ledger from account statements and other documents and for
managing documents.

``beangulp`` is compatible with both Beancount 2.3 and the unreleased
Beancount 3.0. ``beangup`` is the evolution of ``beancount.ingest`` in
Beancount 2.3 and replaces it in the upcoming Beancount 3.0 release.

Documentation is available in form of code docstrings and
`examples`__. The `documentation`__ for ``beancount.ingest`` provided
a good introduction and is still partially relevant to ``beangulp``.
The rest of the Beancount deocumentation can be found `here`__.

__ https://github.com/beancount/beangulp/tree/master/examples/
__ https://beancount.github.io/docs/importing_external_data.html
__ https://beancount.github.io/docs/
6 changes: 0 additions & 6 deletions beangulp/cache_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import os
import shutil
import sys
import tempfile
import time
import unittest
Expand Down Expand Up @@ -63,11 +62,6 @@ def test_cache_head_encoding(self):
data = b'asciiHeader1,\xf0\x9f\x8d\x8fHeader1,asciiHeader2'
# The 15th bytes is in the middle of the unicode character.
num_bytes = 15
if sys.version_info < (3, 7): # noqa: UP036
# Reading the documentation, a partial read from longer
# mocked file data should work just fine, however, this
# does not seem the case in practice.
data = data[:num_bytes]
with mock.patch('builtins.open', mock.mock_open(read_data=data)):
string = cache._FileMemo('filepath').head(num_bytes, encoding='utf-8')
self.assertEqual(string, 'asciiHeader1,')
Expand Down
70 changes: 70 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[build-system]
requires = ['setuptools >= 60.0']
build-backend = 'setuptools.build_meta'

[project]
name = 'beangulp'
version = '0.1.1'
license = { file = 'LICENSE' }
description = 'Importers Framework for Beancount'
readme = 'README.rst'
authors = [
{ name = 'Martin Blais', email = '[email protected]' },
{ name = 'Daniele Nicolodi', email = '[email protected]' },
]
maintainers = [
{ name = 'Daniele Nicolodi', email = '[email protected]' },
]
keywords = ['accounting', 'ledger', 'beancount', 'importer', 'import', 'converter', 'conversion']
classifiers = [
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Office/Business :: Financial :: Accounting',
'Topic :: Text Processing :: General',
]
dependencies = [
'beancount >=2.3.5',
'beautifulsoup4',
'chardet',
'click >8.0',
'lxml',
'python-magic >=0.4.12; sys_platform != "win32"',
]

[project.urls]
homepage = 'https://github.com/beancount/beangulp'
issues = 'https://github.com/beancount/beangulp/issues'

[tool.setuptools.packages]
find = {}

[tool.ruff]
line-length = 128
target-version = 'py37'
lint.select = ['E', 'F', 'W', 'UP', 'B', 'C4', 'PL', 'RUF']
lint.ignore = [
'B007',
'B020',
'E731',
'PLR0911',
'PLR0912',
'PLR0913',
'PLR0915',
'PLR2004',
'PLW2901',
'RUF012',
'UP015',
'UP032',
]

[tool.pytest.ini_options]
minversion = '6.0'
addopts = ['--doctest-glob=*.rst']
doctest_optionflags = ['ELLIPSIS', 'NORMALIZE_WHITESPACE']
testpaths = ['beangulp']
3 changes: 0 additions & 3 deletions pytest.ini

This file was deleted.

35 changes: 0 additions & 35 deletions setup.cfg

This file was deleted.

0 comments on commit ebf1910

Please sign in to comment.