# Tabular Preview
A plugin to preview tabular files (CSV, Excel ...) using [tabular-api](https://github.com/etalab/api-tabular)
## Usage
Install the plugin package in you udata environement:
```bash
pip install udata-tabular-preview
```
Then activate it in your `udata.cfg`:
```python
PLUGINS = ['tabular']
```
## Configuration
You can control this plugin behavior with the following `udata.cfg` parameters:
- **`TABULAR_API_URL`**: The URL to your `tabular-api` instance (without trailing slash). **ex:** `https://my.tabular.api`
- **`TABULAR_EXPLORE_URL`**: The URL to your `explore` instance (without trailing slash). **ex:** `https://my.explore`
- **`TABULAR_ALLOW_REMOTE`**: Whether or not to allow remote resources preview. Default value is `True`
- **`TABULAR_PAGE_SIZE`**: fetched data page size. Default to `5`
## Development
### JS dependencies
Install JS dependencies with:
```shell
npm install
```
Then you can package these assets with:
```shell
inv assets-watch
```
(You might need to relaunch these commands when you pull upstream changes).
You can build a production-ready version of JS and CSS assets with:
```shell
inv assets-build
```
You should extract the vue-i18n language files after modifying this plugin with :
```shell
inv i18n
```
### Python dependencies
Assuming you are in an active virtualenv with `udata` installed and in the current project cloned repository directory, install all dependencies using:
```shell
pip install -e requirements/develop.pip
```
(You might need to relaunch this command when you pull upstream changes).
### Testing
Tests are located into the `tests` folder and be run with:
```shell
inv test
```
### Quality
Code must pass Flake 8 validation and README should be compatible with `PyPI`.
You can check both with:
```shell
inv qa
```
# Changelog
## 4.0.1 (2024-10-03)
- Remove useless max size setting [#41](https://github.com/opendatateam/udata-tabular-preview/pull/41)
- Improve explore button logic [#43](https://github.com/opendatateam/udata-tabular-preview/pull/43)
## 4.0.0 (2024-05-06)
- :warning: Plug udata-tabular-preview to tabular api and decomission of csvapi [#33](https://github.com/opendatateam/udata-tabular-preview/pull/33)
- Migrate to Python 3.11 following `udata` dependencies upgrade [#35](https://github.com/opendatateam/udata-tabular-preview/pull/35)
- Don't show preview if parsing has failed [#36](https://github.com/opendatateam/udata-tabular-preview/pull/36)
- Display the latest date of the preview [#37](https://github.com/opendatateam/udata-tabular-preview/pull/37)
- Set long description content type to markdown in dist [#39](https://github.com/opendatateam/udata-tabular-preview/pull/39)
- Publish .dev version on pypi [#40](https://github.com/opendatateam/udata-tabular-preview/pull/40)
## 4.0.0 (2024-03-22)
- Connect preview with hydra and remove csvapi + styles for preview [#32](https://github.com/opendatateam/udata-tabular-preview/pull/33)
Current (in progress)
- Use pagination from package `@etalab/data.gouv.fr-components` [#34](https://github.com/opendatateam/udata-tabular-preview/pull/34)
## 3.1.0 (2024-01-23)
- Use either of analysis or header check mime [#32](https://github.com/opendatateam/udata-tabular-preview/pull/32)
## 3.0.4 (2024-01-09)
- Update mongoDB in CI [#25](https://github.com/opendatateam/udata-tabular-preview/pull/25)
- Use analysis extras on top of check:headers [#30](https://github.com/opendatateam/udata-tabular-preview/pull/30)
## 3.0.3 (2023-03-07)
- Specify version in static [#27](https://github.com/opendatateam/udata-tabular-preview/pull/27)
- Add python translations logic [#26](https://github.com/opendatateam/udata-tabular-preview/pull/26)
## 3.0.2 (2023-03-02)
- Add data structure component and explore button for hook `dataset.display.explore-button` [#19](https://github.com/opendatateam/udata-tabular-preview/pull/19)
## 3.0.1 (2023-02-06)
- Add sort to exploration preview component [#20](https://github.com/opendatateam/udata-tabular-preview/pull/20)
- Fix setuptools version used in CI [#23](https://github.com/opendatateam/udata-tabular-preview/pull/23)
- Add pagination to exploration preview component [#21](https://github.com/opendatateam/udata-tabular-preview/pull/21)
## 3.0.0 (2023-01-18)
- :warning: **Breaking change** Change preview behaviour [#14](https://github.com/opendatateam/udata-tabular-preview/pull/14)
- remove `preview` route
- add exploration preview Vue component
- add explorable_ressources metadata
- Replace mongo legacy image in CI [#13](https://github.com/opendatateam/udata-tabular-preview/pull/13)
- Update json5 to fix CVE-2022-46175 [#16](https://github.com/opendatateam/udata-tabular-preview/pull/16)
## 2.0.3 (2022-07-11)
- Remove legacy manifest logic and dataexplorer integration [#12](https://github.com/opendatateam/udata-tabular-preview/pull/12)
## 2.0.2 (2020-10-16)
- Add a setting for SUPPORTED_MIME_TYPES [#9](https://github.com/opendatateam/udata-tabular-preview/pull/9)
## 2.0.1 (2020-06-17)
- Use extras attributes to enable preview [#8](https://github.com/opendatateam/udata-tabular-preview/pull/8)
## 2.0.0 (2020-03-11)
- Migrate to Python3 [#5](https://github.com/opendatateam/udata-tabular-preview/pull/5)
## 1.0.0 (2018-10-02)
Initial release
Raw data
{
"_id": null,
"home_page": "https://github.com/opendatateam/udata-tabular-preview",
"name": "udata-tabular-preview",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "udata, harvester, Tabular Preview",
"author": "Open Data Team",
"author_email": "contact@opendata.team",
"download_url": null,
"platform": null,
"description": "# Tabular Preview\n\nA plugin to preview tabular files (CSV, Excel ...) using [tabular-api](https://github.com/etalab/api-tabular)\n\n## Usage\n\nInstall the plugin package in you udata environement:\n\n```bash\npip install udata-tabular-preview\n```\n\nThen activate it in your `udata.cfg`:\n\n```python\nPLUGINS = ['tabular']\n```\n\n## Configuration\n\nYou can control this plugin behavior with the following `udata.cfg` parameters:\n\n- **`TABULAR_API_URL`**: The URL to your `tabular-api` instance (without trailing slash). **ex:** `https://my.tabular.api`\n- **`TABULAR_EXPLORE_URL`**: The URL to your `explore` instance (without trailing slash). **ex:** `https://my.explore`\n- **`TABULAR_ALLOW_REMOTE`**: Whether or not to allow remote resources preview. Default value is `True`\n- **`TABULAR_PAGE_SIZE`**: fetched data page size. Default to `5`\n\n\n## Development\n\n### JS dependencies\n\nInstall JS dependencies with:\n\n```shell\nnpm install\n```\n\nThen you can package these assets with:\n\n```shell\ninv assets-watch\n```\n\n(You might need to relaunch these commands when you pull upstream changes).\n\nYou can build a production-ready version of JS and CSS assets with:\n\n```shell\ninv assets-build\n```\n\nYou should extract the vue-i18n language files after modifying this plugin with :\n\n```shell\ninv i18n\n```\n\n### Python dependencies\n\nAssuming you are in an active virtualenv with `udata` installed and in the current project cloned repository directory, install all dependencies using:\n\n```shell\npip install -e requirements/develop.pip\n```\n\n(You might need to relaunch this command when you pull upstream changes).\n\n### Testing\n\nTests are located into the `tests` folder and be run with:\n\n```shell\ninv test\n```\n\n### Quality\n\nCode must pass Flake 8 validation and README should be compatible with `PyPI`.\nYou can check both with:\n\n```shell\ninv qa\n```\n\n# Changelog\n\n## 4.0.1 (2024-10-03)\n\n- Remove useless max size setting [#41](https://github.com/opendatateam/udata-tabular-preview/pull/41)\n- Improve explore button logic [#43](https://github.com/opendatateam/udata-tabular-preview/pull/43)\n\n## 4.0.0 (2024-05-06)\n\n- :warning: Plug udata-tabular-preview to tabular api and decomission of csvapi [#33](https://github.com/opendatateam/udata-tabular-preview/pull/33)\n- Migrate to Python 3.11 following `udata` dependencies upgrade [#35](https://github.com/opendatateam/udata-tabular-preview/pull/35)\n- Don't show preview if parsing has failed [#36](https://github.com/opendatateam/udata-tabular-preview/pull/36)\n- Display the latest date of the preview [#37](https://github.com/opendatateam/udata-tabular-preview/pull/37)\n- Set long description content type to markdown in dist [#39](https://github.com/opendatateam/udata-tabular-preview/pull/39)\n- Publish .dev version on pypi [#40](https://github.com/opendatateam/udata-tabular-preview/pull/40)\n\n## 4.0.0 (2024-03-22)\n\n- Connect preview with hydra and remove csvapi + styles for preview [#32](https://github.com/opendatateam/udata-tabular-preview/pull/33)\n Current (in progress)\n- Use pagination from package `@etalab/data.gouv.fr-components` [#34](https://github.com/opendatateam/udata-tabular-preview/pull/34)\n\n## 3.1.0 (2024-01-23)\n\n- Use either of analysis or header check mime [#32](https://github.com/opendatateam/udata-tabular-preview/pull/32)\n\n## 3.0.4 (2024-01-09)\n\n- Update mongoDB in CI [#25](https://github.com/opendatateam/udata-tabular-preview/pull/25)\n- Use analysis extras on top of check:headers [#30](https://github.com/opendatateam/udata-tabular-preview/pull/30)\n\n## 3.0.3 (2023-03-07)\n\n- Specify version in static [#27](https://github.com/opendatateam/udata-tabular-preview/pull/27)\n- Add python translations logic [#26](https://github.com/opendatateam/udata-tabular-preview/pull/26)\n\n## 3.0.2 (2023-03-02)\n\n- Add data structure component and explore button for hook `dataset.display.explore-button` [#19](https://github.com/opendatateam/udata-tabular-preview/pull/19)\n\n## 3.0.1 (2023-02-06)\n\n- Add sort to exploration preview component [#20](https://github.com/opendatateam/udata-tabular-preview/pull/20)\n- Fix setuptools version used in CI [#23](https://github.com/opendatateam/udata-tabular-preview/pull/23)\n- Add pagination to exploration preview component [#21](https://github.com/opendatateam/udata-tabular-preview/pull/21)\n\n## 3.0.0 (2023-01-18)\n\n- :warning: **Breaking change** Change preview behaviour [#14](https://github.com/opendatateam/udata-tabular-preview/pull/14)\n - remove `preview` route\n - add exploration preview Vue component\n - add explorable_ressources metadata\n- Replace mongo legacy image in CI [#13](https://github.com/opendatateam/udata-tabular-preview/pull/13)\n- Update json5 to fix CVE-2022-46175 [#16](https://github.com/opendatateam/udata-tabular-preview/pull/16)\n\n## 2.0.3 (2022-07-11)\n\n- Remove legacy manifest logic and dataexplorer integration [#12](https://github.com/opendatateam/udata-tabular-preview/pull/12)\n\n## 2.0.2 (2020-10-16)\n\n- Add a setting for SUPPORTED_MIME_TYPES [#9](https://github.com/opendatateam/udata-tabular-preview/pull/9)\n\n## 2.0.1 (2020-06-17)\n\n- Use extras attributes to enable preview [#8](https://github.com/opendatateam/udata-tabular-preview/pull/8)\n\n## 2.0.0 (2020-03-11)\n\n- Migrate to Python3 [#5](https://github.com/opendatateam/udata-tabular-preview/pull/5)\n\n## 1.0.0 (2018-10-02)\n\nInitial release\n\n",
"bugtrack_url": null,
"license": "AGPL",
"summary": "A plugin to preview tabular files (CSV, Excel, ...) using tabular api",
"version": "4.0.1",
"project_urls": {
"Homepage": "https://github.com/opendatateam/udata-tabular-preview"
},
"split_keywords": [
"udata",
" harvester",
" tabular preview"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "97ebbe402cc59cda8f0ee41bc67950023f2e32021a6de2a85e4e10b1bbf667b5",
"md5": "e7846a3985eb0bf707f06787c2e29fc5",
"sha256": "f578f7b3bf48275739a6863994132fe8fb7abc44a1b669fafe887b1399051e83"
},
"downloads": -1,
"filename": "udata_tabular_preview-4.0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "e7846a3985eb0bf707f06787c2e29fc5",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.7",
"size": 246478,
"upload_time": "2024-10-03T12:38:26",
"upload_time_iso_8601": "2024-10-03T12:38:26.722216Z",
"url": "https://files.pythonhosted.org/packages/97/eb/be402cc59cda8f0ee41bc67950023f2e32021a6de2a85e4e10b1bbf667b5/udata_tabular_preview-4.0.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-03 12:38:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "opendatateam",
"github_project": "udata-tabular-preview",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"circle": true,
"lcname": "udata-tabular-preview"
}