Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 2.84 KB

contributing.md

File metadata and controls

72 lines (47 loc) · 2.84 KB

Contributing to Fingerprint Pro Server API SDK

Structure

Most files in the project are autogenerated by swagger-codegen with urllib3 library for python (default).

Code generation

You need swagger-codegen to run code generation. There are many ways described in the readme. In the project we use local jar file swagger-codegen-cli.jar.

You can just run ./generate.sh script and it will do all the work.

To download fresh OpenAPI schema run ./sync.sh

Configuration

Project configuration is described in config.json file. To read about available parameters run the command below:

java -jar ./bin/swagger-codegen-cli.jar config-help -l python

Testing the local source code of the SDK

To make requests using the local source code of the SDK:

  1. Define your Secret API key, Visitor ID, Request ID and Region by creating a .env file at the root of the repository. (See example))
  2. Run the following commands:
pip install -r requirements.txt
python run_checks.py

Test environment

You need to install python and pip. Then you can run:

pip install -r requirements.txt
pip install -r test-requirements.txt

Running tests

pytest

How to publish

The library is automatically released and published to PyPi on every push to the main branch if there are relevant changes using semantic-release with following plugins:

The workflow must be approved by one of the maintainers, first.

Pre-release flow

Pre-release will be created after merging pr to the dev branch and running the release workflow.

Python uses PEP 440 for versions format, so we convert a pre-release version from semver to PEP 440 in the ./generate.sh.