Metadata-Version: 2.4
Name: fastpluggy-crud-tools
Version: 0.2.24
Summary: CRUD Tools plugin for Fastpluggy
Author: FastPluggy Team
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: FastPluggy>=0.4.9
Requires-Dist: jinja2
Provides-Extra: tests
Requires-Dist: pytest>=7.0; extra == "tests"
Requires-Dist: pytest-cov>=4.0; extra == "tests"
Requires-Dist: pytest-asyncio>=0.23; extra == "tests"
Provides-Extra: dev
Requires-Dist: fastpluggy-crud-tools[tests]; extra == "dev"
Provides-Extra: e2e
Requires-Dist: fastpluggy-cli; extra == "e2e"

# Fix for Plugin Import Path Issue

![CRUD Tools](https://img.shields.io/badge/FastPluggy-CRUD%20Tools-blue)
[![Release](https://gitlab.ggcorp.fr/open/fastpluggy/plugins/crud_tools/-/badges/release.svg)](https://gitlab.ggcorp.fr/open/fastpluggy/plugins/crud_tools/-/releases)
[![Pipeline Status](https://gitlab.ggcorp.fr/open/fastpluggy/plugins/crud_tools/badges/main/pipeline.svg?key_text=CI)](https://gitlab.ggcorp.fr/open/fastpluggy/plugins/crud_tools/-/pipelines?ignore_skipped=true)
[![Coverage](https://gitlab.ggcorp.fr/open/fastpluggy/plugins/crud_tools/badges/main/coverage.svg)](https://gitlab.ggcorp.fr/open/fastpluggy/plugins/crud_tools/-/pipelines)

## Issue Description
There was an issue with the import path for the CrudToolsModule in the crud_tools plugin. The entry point in the package metadata specified the import path as `fastpluggy_plugin.crud_tools.plugin:CrudToolsModule`, but in the source code, the file was at `fastpluggy_plugin/crud_tools/src/plugin.py`. This caused the following import to fail:

```python
import fastpluggy_plugin.crud_tools.plugin
```

While this import worked:

```python
import fastpluggy_plugin.crud_tools.src.plugin
```

## Solution
A new `plugin.py` file was created in the `fastpluggy_plugin/crud_tools` directory that imports and re-exports the CrudToolsModule from `fastpluggy_plugin.crud_tools.src.plugin`. This allows both import paths to work:

- `import fastpluggy_plugin.crud_tools.plugin` (the expected path after installation)
- `import fastpluggy_plugin.crud_tools.src.plugin` (the path in the source code)

## Testing
A test script `test_import.py` was created to verify that both import paths work. You can run it with:

```bash
cd /home/jerome/PycharmProjects/fastpluggy/fastpluggy_plugin/crud_tools
python test_import.py
```

If the fix works, you should see output indicating that both imports were successful and that they refer to the same class.

## Next Steps
After verifying that the fix works, you should rebuild and reinstall the package to ensure that the fix is included in the installed package.
