Skip to content

Commit

Permalink
Create a standalone package
Browse files Browse the repository at this point in the history
Do not use ofxstatement namespace packages anymore, because they provide
no benenfits anymore, but create some problems (e.g. VS Code can't
resolve objects, imported from ofxstatement).

Makes it simpler to create plugins using popular tools.
  • Loading branch information
kedder committed Jan 17, 2024
1 parent 36638cc commit ba2b501
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 7 deletions.
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
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
],
packages=find_packages("src"),
package_dir={"": "src"},
namespace_packages=["ofxstatement", "ofxstatement.plugins"],
entry_points={
"ofxstatement": ["sample = ofxstatement.plugins.sample:SamplePlugin"]
"ofxstatement": ["sample = ofxstatement_sample.plugin:SamplePlugin"]
},
install_requires=["ofxstatement"],
include_package_data=True,
Expand Down
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 ba2b501

Please sign in to comment.