File handler utilizing TUS and MinIO with DRS-Filer integration.
- Synopsis
- Basic Usage
- Installation
- Development
- Environment Variables
- Contributing
- Code of Conduct
- Versioning
- License
- Contact
This application provides endpoints for uploading, downloading, and listing files in a MinIO bucket, with TUS protocol support for uploads, and CORS enabled for cross-origin requests.
This Flask application requires a running instance of MinIO.
Run the MinIO instance by executing the following command in the location where MinIO is installed:
minio server /data --console-address ":9001"
-
Clone the Repository
To get started, first, clone the repository using the following command:
git clone https://github.com/elixir-cloud-aai/cloud-storage-handler.git
-
Navigate to the package folder
Navigate to the folder
cloud-storage-handler
:cd cloud-storage-handler
-
Install Poetry
If you haven't already, install Poetry by following the instructions on the Poetry website.
-
Create and Activate a Virtual Environment (optional)
Poetry automatically creates and manages a virtual environment for your project. You can activate it using:
poetry shell
-
Install Dependencies
Run the following command to install the dependencies defined in the
pyproject.toml
file:poetry install
For ease of use, certain scripts have been abbreviated in Makefile
, make sure
that you have installed the dependencies before running the commands.
Note:
make
commands are only available for Unix-based systems.
To view the commands available, run:
make
Here are certain commands that you might find useful:
- Make a virtual environment
make v
- Install all dependencies including optional dependencies
make i
Note: This project uses optional dependency groups such as
types
,code_quality
,docs
,vulnerability
,test
, andmisc
. To install stubs or types for the dependencies, you must use the following command:poetry add types-foo --group typesReplace
types-foo
with the name of the package for the types. All runtime dependencies should be added to thedefault
group. For example, to installrequests
and its type stubs, run:poetry add requests poetry add types-requests --group typesThis ensures that the type checker functions correctly.
Note: Since the dependencies are segregated into groups, if you add a new group make sure to add it in
make install
command in Makefile.
- Run tests
make t
- Run linter, formatter and spell checker
make fl
- Build the documentation
make d
Note: If you make changes to the code, make sure to generate and push the documentation using above command, else the documentation check CI will fail. Do NOT edit auto-generated documentation manually.
- Run type checker
make tc
- Run all pre-commit checks
make pc
- Update the cookiecutter template
make u
Note: This is not the complete list of commands, run
make
to find out if more have been added.
| Environment Variable | Description | Usage | Error Handling |
|--|--|--|--| | CSH_FOCA_CONFIG_PATH
| Specifies the path to the configuration
file for the FOCA app. | The FOCA app uses this environment variable to locate
the configuration file. If not set, it defaults to dev
. | If the configuration
file is not found at the specified or default path, a FileNotFoundError
will
be raised. |
This project is a community effort and lives off your contributions, be it in the form of bug reports, feature requests, discussions, fixes or any other form of contribution!
Please refer to the guidelines available at CONTRIBUTING.md
if
you are interested in contributing.
We kindly request all contributors to abide by our organization's Code of Conduct. Please also refer to this document if you want to report an incident with respect to conduct in our community. Thank you for your cooperation.
The project adopts the semantic versioning scheme for versioning. Currently the software is in a pre-release stage, so changes to the API, including breaking changes, may occur at any time without further notice.
This project is distributed under the Apache License 2.0, a
copy of which is also available in LICENSE
.
The project is maintained by ELIXIR Cloud & AAI, a Driver Project of the Global Alliance for Genomics and Health (GA4GH), under the umbrella of the ELIXIR Compute Platform.
To get in touch with us, please use one of the following routes:
- For filing bug reports, feature requests or other code-related issues, please make use of the project's issue tracker.
- For private/personal issues, more involved communication, or if you would like to join our team as a regular contributor, you can either join our chat board or email the community leaders.