This repo is intended to provide:

  • document uploading (memory storage, s3, swift)

Development guide

System requirements

  • make
  • docker

Running locally

make run

For setup local env, create py.env file:

{
        echo 'SERVICE_PORT=8080'
        echo 'STORAGE_NAME=memory'
        echo 'PYTHONASYNCIODEBUG=1'
        echo 'SWAGGER_DOC=1'
} > py.env

Add new package

To install package add it in Pipfile to package's group:

  • [packages] - for minimally required packages
  • [dev-packages] - for development-only packages (test-requirements)

If you don’t have any specific version requirements for your dependencies, you can use the wildcard character * to tell Pipenv that any version can be installed:

[packages]
numpy = "*"

If you want specify exact versions of requirements:

[packages]
numpy = "==1.14.1"

To specify greater than or equal version requirement:

[packages]
numpy = ">=1.14.1"

After adding package to Pipfile, you should update Pipfile.lock file in appropriate directory:

pipenv lock

You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead with required python version.

PIPENV_IGNORE_VIRTUALENVS=1 pipenv lock --python 3.9

Pipfile.lock file enables deterministic builds by specifying the exact requirements for reproducing an environment. It contains exact versions for packages and hashes to support more secure verification. Do not update this file manually!

There are two sources for packages:

If you’d like a specific package to be installed with a specific package index (e.g. from https://pypi-int.prozorro.sale/), you can do the following:

[packages]
prozorro-tools = {version="==0.14.0", index="prozorro"}

Running tests

For unit tests:

make test-unit

For integration tests:

make test-integration

For more information

Usage guide

  • No labels