Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 18 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest
environment: build

strategy:
fail-fast: false
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]
env:
PYTHON: ${{ matrix.python-version }}

Expand All @@ -31,44 +30,39 @@ jobs:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip --user
pip install -r dev_requirements.txt --user
pip install pytest-cov --user
pip install ./azure-kusto-data[aio,pandas] ./azure-kusto-ingest[aio,pandas] --user
pip freeze
# We have to use an old version of this plugin, as the new one assumes python 3.8
- uses: psf/black@c8f1a5542c257491e1e093b1404481ece7f7e02c
with:
options: "--check --diff --line-length 160"
version: "23.3.0"
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: EtoE Test with pytest
env:
TEST_DATABASE: ${{ secrets.TEST_DATABASE }}
TEST_BLOB: ${{ secrets.TEST_BLOB }}
ENGINE_CONNECTION_STRING: ${{ secrets.ENGINE_CONNECTION_STRING }}
APPLICATION_INSIGHTS_ENGINE_CONNECTION_STRING: https://ade.applicationinsights.io/subscriptions/12534eb3-8109-4d84-83ad-576c0d5e1d06/resourcegroups/clients_e2e_test/providers/microsoft.insights/components/kusto-e2e-app-insights
APPLICATION_INSIGHTS_TEST_DATABASE: kusto-e2e-app-insights
run: |
pytest -v . --junit-xml pytest.xml --cov=/home/runner/.local/lib/python${{ matrix.python-version }}/site-packages/azure/kusto --cov-report=xml:coverage2.xml
run: uv run pytest --junit-xml pytest.xml

# todo: re-enable on a different PR
# - name: "Run Ruff Formatter"
# id: ruff-formatter
# uses: astral-sh/ruff-action@v3
# with:
# args: "format --diff"
#
# - name: "Run Ruff Linter"
# run: ruff check --diff

- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: Unit Test Results (Python ${{ matrix.python-version }})
path: pytest*.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: PYTHON


publish-test-results:
name: "Publish Unit Tests Results"
needs: build
Expand Down
33 changes: 10 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,20 @@ jobs:
environment: release
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build azure-kusto-data
working-directory: ./azure-kusto-data
run: |
python setup.py sdist bdist_wheel
- name: Build azure-kusto-ingest
working-directory: ./azure-kusto-ingest
run: |
python setup.py sdist bdist_wheel
- name: Publish azure-kusto-data
uses: pypa/gh-action-pypi-publish@release/v1
python-version: '3.9'
enable-cache: true
- name: Build
run: uv build --all
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1.12
with:
packages-dir: azure-kusto-data/dist
- name: Publish azure-kusto-ingest
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: azure-kusto-ingest/dist
packages-dir: dist
- name: Release
uses: docker://antonyurchenko/git-release:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: azure-kusto-data/dist/*.tar.gz azure-kusto-ingest/dist/*.tar.gz azure-kusto-data/dist/*.whl azure-kusto-ingest/dist/*.whl
args: dist/*.tar.gz dist/*.whl
3 changes: 0 additions & 3 deletions .pylintrc

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To install via the Python Package Index (PyPI), type:
### Option 2: Source Via Git
To get the source code of the SDK via git just type:

```python
```bash
git clone https://github.com/Azure/azure-kusto-python
cd ./azure-kusto-python/azure-kusto-data
python3 setup.py install
Expand All @@ -35,7 +35,7 @@ Download a zip of the code via GitHub or PyPi. Then follow the same instructions
* `pip install azure-kusto-ingest[pandas]`

## Minimum Requirements
* Python 3.5 and above
* Python 3.9 and above
* See setup.py for dependencies

## Authentication methods:
Expand Down
5 changes: 0 additions & 5 deletions azure-kusto-data/MANIFEST.in

This file was deleted.

10 changes: 2 additions & 8 deletions azure-kusto-data/azure-kusto-data.iml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/azure" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/azure/kusto/data" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/azure_kusto_data.egg-info" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PackageRequirementsSettings">
<option name="requirementsPath" value="" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="py.test" />
</component>
</module>
4 changes: 0 additions & 4 deletions azure-kusto-data/azure/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions azure-kusto-data/azure/kusto/__init__.py

This file was deleted.

4 changes: 3 additions & 1 deletion azure-kusto-data/azure/kusto/data/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License
VERSION = "5.0.5"
import importlib.metadata

VERSION = importlib.metadata.version("azure-kusto-data")
40 changes: 40 additions & 0 deletions azure-kusto-data/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[project]
name = "azure-kusto-data"
version = "5.0.5"
description = "Kusto Data Client"
authors = [
{ name = "Microsoft Corporation", email = "[email protected]" },
]
license = "MIT"
readme = "README.rst"
urls = { "Repository" = "https://github.com/Azure/azure-kusto-python" }

dependencies = [
"python-dateutil>=2.9.0",
"requests>=2.32.4",
"azure-identity>=1.24.0,<2",
"msal>=1.34.0b1,<2",
"ijson~=3.4.0",
"azure-core>=1.35.0,<2"
]
requires-python = ">= 3.9"

[project.optional-dependencies]
pandas = [
"pandas>=2.3.1",
]
async = [
"aiohttp>=3.12.15",
"asgiref>=3.9.1",
]

[tool.uv]
package = true

[build-system]
requires = ["uv_build>=0.8.9,<0.9.0"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-name = "azure.kusto.data"
module-root = ""
12 changes: 0 additions & 12 deletions azure-kusto-data/setup.cfg

This file was deleted.

54 changes: 0 additions & 54 deletions azure-kusto-data/setup.py

This file was deleted.

8 changes: 0 additions & 8 deletions azure-kusto-data/tox.ini

This file was deleted.

2 changes: 0 additions & 2 deletions azure-kusto-ingest/MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion azure-kusto-ingest/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Microsoft Azure Kusto Ingest Library for Python

blob_descriptor = BlobDescriptor("https://{path_to_blob}.csv.gz?sas", 51200) # in this example, the raw (uncompressed) size of the data is 50KB (52100 bytes)
client.ingest_from_blob(blob_descriptor, ingestion_properties=ingestion_props)


Overview
--------
Expand Down
9 changes: 1 addition & 8 deletions azure-kusto-ingest/azure-kusto-ingest.iml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,11 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/azure" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/azure_kusto_ingest.egg-info" />
<sourceFolder url="file://$MODULE_DIR$/azure/kusto/ingest" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="azure-kusto-data" />
</component>
<component name="PackageRequirementsSettings">
<option name="requirementsPath" value="" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="py.test" />
</component>
</module>
4 changes: 0 additions & 4 deletions azure-kusto-ingest/azure/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions azure-kusto-ingest/azure/kusto/__init__.py

This file was deleted.

4 changes: 3 additions & 1 deletion azure-kusto-ingest/azure/kusto/ingest/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License
VERSION = "5.0.5"
import importlib.metadata

VERSION = importlib.metadata.version("azure-kusto-ingest")
Loading
Loading