This is the Symphony BDK for Python to help develop bots and interact with the Symphony REST APIs.
Symphony BDK for Python provides tools for building bots and integrating with Symphony APIs. This document outlines its usage, installation, and contribution guidelines.
- Python 3.9 or higher
- Poetry
- Install dependencies:
poetry install
- Build the package:
poetry build
- Run tests:
poetry run pytest
- Perform a lint scan locally:
poetry run ruff check .
- Format code locally:
poetry run ruff format .
- Generate documentation locally:
cd docsrc && make html
This project uses pre-commit
with ruff
to automatically format and lint code. This is the recommended setup for contributors to ensure code style consistency.
- Install development dependencies (this will also install
pre--commit
andruff
):poetry install
- Install the git hooks:
poetry run pre-commit install
Now, ruff
will automatically run on every commit, formatting your code and checking for linting errors.
Verify the successful installation by running any of the following commands:
poetry --version
Refer to the following for additional guidance:
The next milestone is the 2.5.x, focused on delivering improvements and bug fixes.
To contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/fooBar
- Read the Contribution Guidelines and Community Code of Conduct
- Commit changes:
git commit -am 'Add some fooBar'
- Push changes:
git push origin feature/fooBar
- Open a Pull Request.
NOTE: Ensure you have an active Individual Contributor License Agreement (ICLA) or Corporate Contribution License Agreement (CCLA) with FINOS.
For further inquiries, email [email protected].
Python BDK uses OpenAPITools/openapi-generator to generate code. To update the generated code, follow these steps:
- Checkout the latest branch of the fork (e.g., sym-python-5.5.0).
- Update the fork source code, review, and merge it.
- Generate the JAR file in
openapi-generatormodules/openapi-generator-cli/target/openapi-generator-cli.jar
:- Use Maven:
mvn clean install -Dmaven.test.skip=true && mvn clean package -Dmaven.test.skip=true
- Alternatively, use IntelliJ's build button to build the project and generate the JAR file.
- Use Maven:
- Copy the JAR file to the Python BDK repository:
symphony-api-client-python/api_client_generation/openapi-generator-cli.jar
. - Execute the generation script:
./generate.sh
- Commit and push the newly generated code along with the updated JAR file.
Copyright 2021 Symphony LLC
Distributed under the Apache License, Version 2.0.
SPDX-License-Identifier: Apache-2.0.