Skip to content

Commit 38a31ac

Browse files
authored
Merge pull request #13 from kedder/no-namespaces
Migrate to modern project layout
2 parents 8353575 + 2fa4475 commit 38a31ac

File tree

12 files changed

+140
-447
lines changed

12 files changed

+140
-447
lines changed

.github/workflows/test.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Test
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: ["3.9", "3.10", "3.11"]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install pipenv --upgrade
30+
pipenv --version
31+
pipenv sync --dev
32+
- name: Test
33+
run: |
34+
pipenv run pytest
35+
- name: Mypy
36+
run: |
37+
pipenv run mypy src tests
38+
- name: Black
39+
run: |
40+
pipenv run black --check src tests

Pipfile

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ verify_ssl = true
77
mypy = "*"
88
pytest = "*"
99
black = "*"
10-
exceptiongroup = {markers="python_version < '3.11'"}
10+
exceptiongroup = "*"
11+
build = "*"
12+
tomli = "*"
1113

1214
[packages]
1315
ofxstatement = "*"
1416
ofxstatement-sample = {editable = true,path = "."}
15-
16-
[pipenv]
17-
allow_prereleases = true

Pipfile.lock

+61-395
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ To create your own plugin, follow these steps:
4747
lists plugins you are registering within ofxstatement. Give meaningful
4848
name to the plugin and provide plugin class name
4949
* Replace contents of ``README.rst`` with description of your plugin
50-
* Rename ``ofxstatement/plugins/sample.py`` to match plugin package name
50+
* Rename ``ofxstatement_sample`` to match plugin package name
5151
you have provided in ``entry_points`` parameter.
52-
* Open renamed sample.py and rename ``SamplePlugin`` and ``SampleParser``
52+
* Open the ``plugin.py`` and rename ``SamplePlugin`` and ``SampleParser``
5353
classes to match your plugin class name.
5454
* Now, draw the rest of the owl (c).
5555

pyproject.toml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "ofxstatement-sample"
7+
version = "0.0.1"
8+
authors = [
9+
{ name="Andrey Lebedev", email="[email protected]" },
10+
]
11+
description = "Sample plugin for ofxstatement"
12+
readme = "README.rst"
13+
requires-python = ">=3.9"
14+
classifiers = [
15+
"Development Status :: 3 - Alpha",
16+
"Programming Language :: Python :: 3",
17+
"Natural Language :: English",
18+
"Topic :: Office/Business :: Financial :: Accounting",
19+
"Topic :: Utilities",
20+
"Environment :: Console",
21+
"Operating System :: OS Independent",
22+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
23+
]
24+
keywords = ["ofx", "banking", "statement", "plugin", "ofxstatement"]
25+
dependencies = [
26+
"ofxstatement",
27+
]
28+
29+
[project.urls]
30+
Homepage = "https://github.com/kedder/ofxstatement-sample/"
31+
32+
[project.entry-points."ofxstatement"]
33+
sample = "ofxstatement_sample.plugin:SamplePlugin"

setup.cfg

-2
This file was deleted.

setup.py

-41
This file was deleted.

src/ofxstatement/__init__.py

-1
This file was deleted.

src/ofxstatement/plugins/__init__.py

-1
This file was deleted.

src/ofxstatement_sample/__init__.py

Whitespace-only changes.
File renamed without changes.

tests/test_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from ofxstatement.ui import UI
44

5-
from ofxstatement.plugins.sample import SamplePlugin
5+
from ofxstatement_sample.plugin import SamplePlugin
66

77

88
def test_sample() -> None:

0 commit comments

Comments
 (0)