-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #329 from microsoft/feature/kiota-python
Merge sources into one repo
- Loading branch information
Showing
310 changed files
with
24,857 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"packages/abstractions": "1.3.4", | ||
"packages/authentication/azure": "1.3.4", | ||
"packages/http/httpx": "1.3.4", | ||
"packages/serialization/json": "1.3.4", | ||
"packages/serialization/form": "1.3.4", | ||
"packages/serialization/text": "1.3.4", | ||
"packages/serialization/multipart": "1.3.4" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
|
||
# Contributing to Kiota Java | ||
|
||
Kiota Python is a mono-repo containing source code for the following packages: | ||
|
||
- 'microsoft-kiota-abstractions' | ||
- 'microsoft-kiota-authentication-azure' | ||
- 'microsoft-kiota-http' | ||
- 'microsoft-kiota-serialization-form' | ||
- 'microsoft-kiota-serialization-json' | ||
- 'microsoft-kiota-serialization-text' | ||
- 'microsoft-kiota-serialization-multipart' | ||
|
||
Kiota Python is open to contributions. There are a couple of different recommended paths to get contributions into the released version of this library. | ||
|
||
__NOTE__ A signed a contribution license agreement is required for all contributions, and is checked automatically on new pull requests. Please read and sign [the agreement](https://cla.microsoft.com/) before starting any work for this repository. | ||
|
||
## File issues | ||
|
||
The best way to get started with a contribution is to start a dialog with the owners of this repository. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution. Discussions on bugs and potential fixes could point you to the write change to make. | ||
|
||
## Submit pull requests for bug fixes and features | ||
|
||
Feel free to submit a pull request with a linked issue against the __main__ branch. The main branch will be updated frequently. | ||
|
||
## Commit message format | ||
|
||
To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) | ||
format. | ||
Each commit message consists of a __header__, an optional __body__ and an optional __footer__. The header is the first line of the commit and | ||
MUST have a __type__ (see below for a list of types) and a __description__. An optional __scope__ can be added to the header to give extra context. | ||
|
||
``` | ||
<type>[optional scope]: <short description> | ||
<BLANK LINE> | ||
<optional body> | ||
<BLANK LINE> | ||
<optional footer(s)> | ||
``` | ||
|
||
The recommended commit types used are: | ||
|
||
- __feat__ for feature updates (increments the _minor_ version) | ||
- __fix__ for bug fixes (increments the _patch_ version) | ||
- __perf__ for performance related changes e.g. optimizing an algorithm | ||
- __refactor__ for code refactoring changes | ||
- __test__ for test suite updates e.g. adding a test or fixing a test | ||
- __style__ for changes that don't affect the meaning of code. e.g. formatting changes | ||
- __docs__ for documentation updates e.g. ReadMe update or code documentation updates | ||
- __build__ for build system changes (gradle updates, external dependency updates) | ||
- __ci__ for CI configuration file changes e.g. updating a pipeline | ||
- __chore__ for miscallaneous non-sdk changesin the repo e.g. removing an unused file | ||
Adding a an exclamation mark after the commit type (`feat!`) or footer with the prefix __BREAKING CHANGE:__ will cause an increment of the _major_ version. | ||
|
||
## Working with source locally | ||
|
||
To support the mono-repo structure and release processes, the individual projects leverage [poetry](https://python-poetry.org/) for package management. | ||
|
||
Therefore, to validate,lint and manage packages, you would need to install poetry for easier management of the source. | ||
|
||
```shell | ||
python -m pip install --upgrade poetry | ||
``` | ||
|
||
### Running validations in individual projects | ||
|
||
To install dependencies, run the command below in the directory of the project you are working on. | ||
|
||
```shell | ||
poetry install | ||
``` | ||
|
||
To fix the code format to align to linting rules setup using `yapf`, run the command below in the directory of the project you are working on. | ||
|
||
```shell | ||
poetry run yapf -ir {projectName} | ||
``` | ||
|
||
To check the code format to align to linting rules setup using `yapf`, run the command below in the directory of the project you are working on. | ||
|
||
```shell | ||
poetry run yapf -dr {projectName} | ||
``` | ||
|
||
To lint the code using `pylint`, run the command below in the directory of the project you are working on. | ||
|
||
```shell | ||
poetry run pylint {projectName} --disable=W --rcfile=.pylintrc | ||
``` | ||
|
||
To run the tests using `pytest`, run the command below in the directory of the project you are working on. | ||
|
||
```shell | ||
poetry run pylint pytest | ||
``` | ||
|
||
To run type checking using `mypy` , run the command below in the directory of the project you are working on. | ||
|
||
```shell | ||
poetry run mypy {projectName} | ||
``` | ||
|
||
### Running validations across all projects | ||
|
||
To help with validation of validations across all projects, you can leverage the [powershell script](./kiota-python.ps1) at the root of repository. The script will handle the above scenarios by changing directories and running the relevant command across all the projects in the mono repo. | ||
|
||
To install dependencies across all projects, run the following in a powershell shell from the repository root. | ||
|
||
```shell | ||
.\kiota-python.ps1 install-deps | ||
``` | ||
|
||
To fix the code format to align to linting rules setup using `yapf` across all projects, run the following in a powershell shell from the repository root. | ||
|
||
```shell | ||
.\kiota-python.ps1 format | ||
``` | ||
|
||
To check the code format to align to linting rules setup using `yapf` across all projects, run the following in a powershell shell from the repository root. | ||
|
||
```shell | ||
.\kiota-python.ps1 check-format | ||
``` | ||
|
||
To lint the code using `pylint` across all projects, run the following in a powershell shell from the repository root. | ||
|
||
```shell | ||
.\kiota-python.ps1 lint | ||
``` | ||
|
||
To run the tests using `pytest` across all projects, run the following in a powershell shell from the repository root. | ||
|
||
```shell | ||
.\kiota-python.ps1 test | ||
``` | ||
|
||
To run type checking using `mypy` across all projects, run the following in a powershell shell from the repository root. | ||
|
||
```shell | ||
.\kiota-python.ps1 check-types | ||
``` | ||
|
||
__TIP__ Running `.\kiota-python.ps1 test` should give a hint of all available commands you can pass to the script to run across projects which can be configured this in [this file](.\projects-config.json). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
# Microsoft Kiota Abstractions Library for Python | ||
[![PyPI version](https://badge.fury.io/py/microsoft-kiota-abstractions.svg)](https://badge.fury.io/py/microsoft-kiota-abstractions) | ||
[![CI Actions Status](https://github.com/microsoft/kiota-abstractions-python/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/microsoft/kiota-abstractions-python/actions) | ||
[![Downloads](https://pepy.tech/badge/microsoft-kiota-abstractions)](https://pepy.tech/project/microsoft-kiota-abstractions) | ||
# Kiota Libraries for python | ||
|
||
The Microsoft Kiota abstractions library for Python is the python package defining the basic constructs Kiota projects need once an SDK has been generated from an OpenAPI definition. | ||
The Kiota libraries define the basic constructs for Kiota projects needed once an SDK has been generated from an OpenAPI definition and provide default implementations. | ||
|
||
A [Kiota](https://github.com/microsoft/kiota) generated project will need a reference to the abstraction package to build and run. | ||
A [Kiota](https://github.com/microsoft/kiota) generated project will need a reference to the libraries to build and execute by providing default implementations for serialization, authentication and http transport. | ||
|
||
Read more about Kiota [here](https://github.com/microsoft/kiota/blob/main/README.md). | ||
|
||
## Using the Abstractions Library | ||
## Build Status | ||
|
||
In order to use this library, install the package by running: | ||
[![CI Actions Status](https://github.com/microsoft/kiota-python/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/microsoft/kiota-python/actions) | ||
|
||
```cmd | ||
pip install microsoft-kiota-abstractions | ||
``` | ||
## Libraries | ||
|
||
| Library | Pypi Release | Changelog | | ||
|---------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------| | ||
| [Abstractions](./packages/abstractions/README.md) | [![PyPI version](https://badge.fury.io/py/microsoft-kiota-abstractions.svg)](https://badge.fury.io/py/microsoft-kiota-abstractions) | [Changelog](./packages/abstractions/CHANGELOG.md) | | ||
| [Authentication - Azure](./packages/authentication/azure/README.md) | [![PyPI version](https://badge.fury.io/py/microsoft-kiota-authentication-azure.svg)](https://badge.fury.io/py/microsoft-kiota-authentication-azure) | [Changelog](./packages/authentication/azure/CHANGELOG.md) | | ||
| [Http - HttpClientLibrary](./packages/http/httpx/README.md) | [![PyPI version](https://badge.fury.io/py/microsoft-kiota-http.svg)](https://badge.fury.io/py/microsoft-kiota-http) | [Changelog](./packages/http/httpx/CHANGELOG.md) | | ||
| [Serialization - JSON](./packages/serialization/json/README.md) | [![PyPI version](https://badge.fury.io/py/microsoft-kiota-serialization-json.svg)](https://badge.fury.io/py/microsoft-kiota-serialization-json) | [Changelog](./packages/serialization/json/CHANGELOG.md) | | ||
| [Serialization - FORM](./packages/serialization/form/README.md) | [![PyPI version](https://badge.fury.io/py/microsoft-kiota-serialization-form.svg)](https://badge.fury.io/pymicrosoft-kiota-serialization-form) | [Changelog](./packages/serialization/form/CHANGELOG.md) | | ||
| [Serialization - TEXT](./packages/serialization/text/README.md) | [![PyPI version](https://badge.fury.io/py/microsoft-kiota-serialization-text.svg)](https://badge.fury.io/py/microsoft-kiota-serialization-text) | [Changelog](./packages/serialization/text/CHANGELOG.md) | | ||
| [Serialization - MULTIPART](./packages/serialization/multipart/README.md) | [![PyPI version](https://badge.fury.io/py/microsoft-kiota-serialization-multipart.svg)](https://badge.fury.io/py/microsoft-kiota-multipart) | [Changelog](./packages/serialization/multipart/CHANGELOG.md) | | ||
|
||
## Contributing | ||
|
||
This project welcomes contributions and suggestions. Most contributions require you to agree to a | ||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us | ||
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. | ||
the rights to use your contribution. For details, visit <https://cla.opensource.microsoft.com>. | ||
|
||
When you submit a pull request, a CLA bot will automatically determine whether you need to provide | ||
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions | ||
|
@@ -33,8 +38,8 @@ contact [[email protected]](mailto:[email protected]) with any additio | |
|
||
## Trademarks | ||
|
||
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft | ||
trademarks or logos is subject to and must follow | ||
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft | ||
trademarks or logos is subject to and must follow | ||
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). | ||
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. | ||
Any use of third-party trademarks or logos are subject to those third-party's policies. |
Oops, something went wrong.