Name | fixtup-minio-s3 JSON |
Version |
0.0.1a0
JSON |
| download |
home_page | |
Summary | fixtup plugin to load a fixture into a minio bucket and run s3 tests |
upload_time | 2024-02-18 17:16:39 |
maintainer | |
docs_url | None |
author | Fabien Arcellier |
requires_python | >=3.10,<4.0 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
## fixtup-minio-s3
[![ci](https://github.com/FabienArcellier/fixtup-minio-s3/actions/workflows/main.yml/badge.svg)](https://github.com/FabienArcellier/fixtup-minio-s3/actions/workflows/main.yml)
> NOT READY YET, WORK IN PROGRESS !!!
The `fixtup-minio-s3` plugin allows you to download the files of a fixture into an s3 bucket managed by minio
and run the integration tests on an s3 bucket.
The plugin also allows you to manage the life cycle of the bucket on which the files are loaded by recreating
it between each test or by emptying it between each test.
``tests/integrations/test_s3_sdk.py``
```python
import fixtup
with fixtup.up('minio'), \
fixtup.up('s3_content'):
# the files are loaded into the s3 bucket
# the integration tests are running
```
Once the plugin is installed and activated in fixtup, we declare the `minio.yml` manifest in a fixture so
that it loads the files into an s3 bucket when launched.
`tests/fixtures/s3_content/minio.yml`
```yaml
minio_endpoint: http://localhost:9000 # [optional], default : http://localhost:9000
authentification: minioadmin:minioadmin # [optional], default : minioadmin:minioadmin
bucket: bucket # [optional], default : bucket
setup_data_bucket_policy: new_bucket | clear_bucket | none # [optional], default : new_bucket
copy_ignore: [] # [optional], default : []
```
it is possible to exclude files from copying to the s3 bucket using the `copy_ignore` parameter
```yaml
copy_ignore:
- 'file.svg'
- '**/*.svg'
```
# Links
* Documentation : https://fixtup-minio-s3.readthedocs.io/en/latest
* PyPI Release : https://pypi.org/project/fixtup-minio-s3
* Source code: https://github.com/FabienArcellier/fixtup-minio-s3
* Chat: https://discord.gg/nMn9YPRGSY
## The latest version
You can find the latest version to ...
```bash
git clone https://github.com/FabienArcellier/fixtup-minio-s3.git
```
## Usage
The `minio` fixture starts a minio server using docker-compose. The `s3_content` fixture creates the bucket
if it is absent and copies the fixture files into the bucket.
```python
import fixtup
with fixtup.up('minio'), \
fixtup.up('s3_content'):
# the files are loaded into the s3 bucket
# the integration tests are running
pass
```
`test/fixtures/minio/docker-compose.yml`
```yaml
version: '3.8'
services:
database:
image: quay.io/minio/minio
command: server /data
ports:
- 9000:9000
- 9001:9001
```
`test/fixtures/s3_content/minio.yml`
```yaml
minio_endpoint: http://localhost:9000 # [optional], default : http://localhost:9000
authentification: minioadmin:minioadmin # [optional], default : minioadmin:minioadmin
bucket: bucket # [optional], default : bucket
setup_data_bucket_policy: new_bucket | clear_bucket | none # [optional], default : new_bucket
copy_ignore: [] # [optional], default : []
```
### Publish the library on pypi
The publication use a tag-based workflow to run the publication on github action. First, a developper tag a commit using `alfred publish`, then github action publish the library on pypi.
The `alfred publish` take the version number from pyproject.toml. The command will raise an error if the current branch is not master, if changes are in progress, or if the tag already exists, if the branch is not synchronized with remote branch
```bash
alfred publish
```
### Develop with gitpod
[gitpod](https://www.gitpod.io/) can be used as an IDE. You can load the code inside to try the code.
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/FabienArcellier/fixtup-minio-s3)
## Developper guideline
### Add a dependency
``bash
poetry add requests
``
### Install development environment
Use make to instanciate a python virtual environment in ./venv and install the
python dependencies.
```bash
poetry install
```
### Update release dependencies
Use make to instanciate a python virtual environment in ./venv and freeze
dependencies version
```bash
poetry update update
```
### Activate the python environment
When you setup the requirements, a `venv` directory on python 3 is created.
To activate the venv, you have to execute :
```bash
poetry shell
```
### Run the continuous integration process
Before commit or send a pull request, you have to execute `pylint` to check the syntax
of your code and run the unit tests to validate the behavior.
```bash
$ poetry run alfred ci
```
## Contributors
* Fabien Arcellier
## License
MIT License
Copyright (c) 2024-2024 Fabien Arcellier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Raw data
{
"_id": null,
"home_page": "",
"name": "fixtup-minio-s3",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Fabien Arcellier",
"author_email": "fabien.arcellier@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/64/53/b35f0b514a0f58a4817b2d059df55718cdf230dbb3c9b82770555c63fd59/fixtup_minio_s3-0.0.1a0.tar.gz",
"platform": null,
"description": "## fixtup-minio-s3\n\n[![ci](https://github.com/FabienArcellier/fixtup-minio-s3/actions/workflows/main.yml/badge.svg)](https://github.com/FabienArcellier/fixtup-minio-s3/actions/workflows/main.yml)\n\n> NOT READY YET, WORK IN PROGRESS !!!\n\nThe `fixtup-minio-s3` plugin allows you to download the files of a fixture into an s3 bucket managed by minio \nand run the integration tests on an s3 bucket.\n\nThe plugin also allows you to manage the life cycle of the bucket on which the files are loaded by recreating \nit between each test or by emptying it between each test.\n\n``tests/integrations/test_s3_sdk.py``\n```python\nimport fixtup\n\nwith fixtup.up('minio'), \\\n fixtup.up('s3_content'):\n # the files are loaded into the s3 bucket\n # the integration tests are running\n```\n\nOnce the plugin is installed and activated in fixtup, we declare the `minio.yml` manifest in a fixture so \nthat it loads the files into an s3 bucket when launched.\n\n`tests/fixtures/s3_content/minio.yml`\n```yaml\nminio_endpoint: http://localhost:9000 # [optional], default : http://localhost:9000\nauthentification: minioadmin:minioadmin # [optional], default : minioadmin:minioadmin\nbucket: bucket # [optional], default : bucket\nsetup_data_bucket_policy: new_bucket | clear_bucket | none # [optional], default : new_bucket\ncopy_ignore: [] # [optional], default : []\n```\n\nit is possible to exclude files from copying to the s3 bucket using the `copy_ignore` parameter\n\n```yaml\ncopy_ignore:\n - 'file.svg'\n - '**/*.svg'\n```\n\n# Links\n\n* Documentation : https://fixtup-minio-s3.readthedocs.io/en/latest\n* PyPI Release : https://pypi.org/project/fixtup-minio-s3\n* Source code: https://github.com/FabienArcellier/fixtup-minio-s3\n* Chat: https://discord.gg/nMn9YPRGSY\n\n## The latest version\n\nYou can find the latest version to ...\n\n```bash\ngit clone https://github.com/FabienArcellier/fixtup-minio-s3.git\n```\n\n## Usage\n\nThe `minio` fixture starts a minio server using docker-compose. The `s3_content` fixture creates the bucket \nif it is absent and copies the fixture files into the bucket.\n\n```python\nimport fixtup\n\nwith fixtup.up('minio'), \\\n fixtup.up('s3_content'):\n # the files are loaded into the s3 bucket\n # the integration tests are running\n pass\n```\n\n`test/fixtures/minio/docker-compose.yml`\n```yaml\nversion: '3.8'\nservices:\n database:\n image: quay.io/minio/minio\n command: server /data\n ports:\n - 9000:9000\n - 9001:9001\n```\n\n`test/fixtures/s3_content/minio.yml`\n```yaml\nminio_endpoint: http://localhost:9000 # [optional], default : http://localhost:9000\nauthentification: minioadmin:minioadmin # [optional], default : minioadmin:minioadmin\nbucket: bucket # [optional], default : bucket\nsetup_data_bucket_policy: new_bucket | clear_bucket | none # [optional], default : new_bucket\ncopy_ignore: [] # [optional], default : []\n```\n\n### Publish the library on pypi\n\nThe publication use a tag-based workflow to run the publication on github action. First, a developper tag a commit using `alfred publish`, then github action publish the library on pypi.\n\nThe `alfred publish` take the version number from pyproject.toml. The command will raise an error if the current branch is not master, if changes are in progress, or if the tag already exists, if the branch is not synchronized with remote branch\n\n```bash\nalfred publish\n```\n\n### Develop with gitpod\n\n[gitpod](https://www.gitpod.io/) can be used as an IDE. You can load the code inside to try the code.\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/FabienArcellier/fixtup-minio-s3)\n\n## Developper guideline\n\n### Add a dependency\n\n``bash\npoetry add requests\n``\n### Install development environment\n\nUse make to instanciate a python virtual environment in ./venv and install the\npython dependencies.\n\n```bash\npoetry install\n```\n\n### Update release dependencies\n\nUse make to instanciate a python virtual environment in ./venv and freeze\ndependencies version\n\n```bash\npoetry update update\n```\n\n### Activate the python environment\n\nWhen you setup the requirements, a `venv` directory on python 3 is created.\nTo activate the venv, you have to execute :\n\n```bash\npoetry shell\n```\n\n### Run the continuous integration process\n\nBefore commit or send a pull request, you have to execute `pylint` to check the syntax\nof your code and run the unit tests to validate the behavior.\n\n```bash\n$ poetry run alfred ci\n```\n\n## Contributors\n\n* Fabien Arcellier\n\n## License\n\nMIT License\n\nCopyright (c) 2024-2024 Fabien Arcellier\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "fixtup plugin to load a fixture into a minio bucket and run s3 tests",
"version": "0.0.1a0",
"project_urls": {
"Chat": "https://discord.gg/nMn9YPRGSY",
"Documentation": "https://fixtup-minio-s3.readthedocs.io/en/latest/",
"Issue Tracker": "https://github.com/FabienArcellier/fixtup-minio-s3/issues",
"Source code": "https://github.com/FabienArcellier/fixtup-minio-s3"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4e89407007b45fce321d25e85d964104e09e2b1e91a2dce686bc42bce3376430",
"md5": "8b21af96b6801bc53d34bbd95a4f2f7a",
"sha256": "a02bbf6721bff03ec8d305800e8a24faa480deadccffc9b646889060bd31003a"
},
"downloads": -1,
"filename": "fixtup_minio_s3-0.0.1a0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8b21af96b6801bc53d34bbd95a4f2f7a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 4610,
"upload_time": "2024-02-18T17:16:37",
"upload_time_iso_8601": "2024-02-18T17:16:37.719423Z",
"url": "https://files.pythonhosted.org/packages/4e/89/407007b45fce321d25e85d964104e09e2b1e91a2dce686bc42bce3376430/fixtup_minio_s3-0.0.1a0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6453b35f0b514a0f58a4817b2d059df55718cdf230dbb3c9b82770555c63fd59",
"md5": "b43796e664cafc73ee3de00c9b93d17c",
"sha256": "f2b6fcbf71a3a54edd069fe05261fd12f97893c4a2f44a778174dd2baa4bf6a2"
},
"downloads": -1,
"filename": "fixtup_minio_s3-0.0.1a0.tar.gz",
"has_sig": false,
"md5_digest": "b43796e664cafc73ee3de00c9b93d17c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 3531,
"upload_time": "2024-02-18T17:16:39",
"upload_time_iso_8601": "2024-02-18T17:16:39.018456Z",
"url": "https://files.pythonhosted.org/packages/64/53/b35f0b514a0f58a4817b2d059df55718cdf230dbb3c9b82770555c63fd59/fixtup_minio_s3-0.0.1a0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-18 17:16:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "FabienArcellier",
"github_project": "fixtup-minio-s3",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fixtup-minio-s3"
}