Skip to content

Commit

Permalink
Merge pull request #13 from kedder/no-namespaces
Browse files Browse the repository at this point in the history
Migrate to modern project layout
  • Loading branch information
kedder authored Feb 5, 2024
2 parents 8353575 + 2fa4475 commit 38a31ac
Show file tree
Hide file tree
Showing 12 changed files with 140 additions and 447 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv --upgrade
pipenv --version
pipenv sync --dev
- name: Test
run: |
pipenv run pytest
- name: Mypy
run: |
pipenv run mypy src tests
- name: Black
run: |
pipenv run black --check src tests
7 changes: 3 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ verify_ssl = true
mypy = "*"
pytest = "*"
black = "*"
exceptiongroup = {markers="python_version < '3.11'"}
exceptiongroup = "*"
build = "*"
tomli = "*"

[packages]
ofxstatement = "*"
ofxstatement-sample = {editable = true,path = "."}

[pipenv]
allow_prereleases = true
456 changes: 61 additions & 395 deletions Pipfile.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ To create your own plugin, follow these steps:
lists plugins you are registering within ofxstatement. Give meaningful
name to the plugin and provide plugin class name
* Replace contents of ``README.rst`` with description of your plugin
* Rename ``ofxstatement/plugins/sample.py`` to match plugin package name
* Rename ``ofxstatement_sample`` to match plugin package name
you have provided in ``entry_points`` parameter.
* Open renamed sample.py and rename ``SamplePlugin`` and ``SampleParser``
* Open the ``plugin.py`` and rename ``SamplePlugin`` and ``SampleParser``
classes to match your plugin class name.
* Now, draw the rest of the owl (c).

Expand Down
33 changes: 33 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "ofxstatement-sample"
version = "0.0.1"
authors = [
{ name="Andrey Lebedev", email="[email protected]" },
]
description = "Sample plugin for ofxstatement"
readme = "README.rst"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Natural Language :: English",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Utilities",
"Environment :: Console",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
]
keywords = ["ofx", "banking", "statement", "plugin", "ofxstatement"]
dependencies = [
"ofxstatement",
]

[project.urls]
Homepage = "https://github.com/kedder/ofxstatement-sample/"

[project.entry-points."ofxstatement"]
sample = "ofxstatement_sample.plugin:SamplePlugin"
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

41 changes: 0 additions & 41 deletions setup.py

This file was deleted.

1 change: 0 additions & 1 deletion src/ofxstatement/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion src/ofxstatement/plugins/__init__.py

This file was deleted.

Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from ofxstatement.ui import UI

from ofxstatement.plugins.sample import SamplePlugin
from ofxstatement_sample.plugin import SamplePlugin


def test_sample() -> None:
Expand Down

0 comments on commit 38a31ac

Please sign in to comment.