You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DM_CONNECTION_STRING=# Optional - if not set, will infer from ENGINE_CONNECTION_STRING. Format: https://ingest-<cluster_name>.<region>.kusto.windows.net
DM_CONNECTION_STRING=<Your ingest cluster URI># Optional - if not set, will infer from ENGINE_CONNECTION_STRING. Format: https://ingest-<cluster_name>.<region>.kusto.windows.net
18
53
TEST_DATABASE=<The name of the database>
19
54
```
20
55
21
-
The E2E tests authenticate with DefaultAzureCredential, and will fall back to interactive login if needed.
56
+
The E2E tests authenticate with [DefaultAzureCredential](https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.defaultazurecredential?view=azure-python).
22
57
58
+
It is recommended to use the [azure cli](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) command `az login` to authenticate with your Azure account to run the tests.
23
59
24
-
For more information on DefaultAzureCredential, see:
To run the optional `token_provider` tests, you will need to set the booleans at the top of the file `test_token_providers.py` and the following environment variables in addition to the previous ones:
28
63
```shell
@@ -43,41 +78,61 @@ USER_PASS=<Your user password>
43
78
USER_AUTH_ID=<Your user auth ID># optional
44
79
```
45
80
46
-
## Requirements
47
81
48
-
In order to work on this project, we recommend using the dev requirements:
82
+
## Development
83
+
84
+
As mentioned before, this project uses `uv` and `poe` to manage the development environment and tasks.
85
+
86
+
To see the tasks available, you can run:
87
+
88
+
```bash
89
+
poe
90
+
```
91
+
92
+
### Setup
93
+
94
+
Setup the project by syncing `uv`:
49
95
50
96
```bash
51
-
pip install -r dev_requirements.txt
97
+
poe sync
52
98
```
53
99
54
-
These including testing related packages as well as styling ([black](https://black.readthedocs.io/en/stable/))
100
+
This will install the dependencies, set up the virtual environment, and install the tools needed for development.
55
101
56
-
##Building and Testing
102
+
###Testing
57
103
58
104
This project uses [pytest](https://docs.pytest.org/en/latest/).
59
105
106
+
To test the project, simply run:
107
+
108
+
```bash
109
+
poe test
110
+
```
60
111
61
-
Since the tests use the package as a third-party, the easiest way to set it up is installing it in edit mode:
This project uses [ruff](https://docs.astral.sh/ruff/) for linting and formatting.
121
+
122
+
Before commiting your changes, make sure the code is properly formatted, or the commit will be rejected.
70
123
71
124
```bash
72
-
pytest ./azure-kusto-data ./azure-kusto-ingest
125
+
poe format # formats the code directly
126
+
poe check-format # returns a diff of what needs to be formatted
73
127
```
74
128
75
-
## Style
76
-
77
-
We use black, and allow for line-length of 160, so please run:
129
+
Also make sure to lint the code:
78
130
79
131
```bash
80
-
black --line-length=160 ./azure-kusto-data ./azure-kusto-ingest
132
+
poe lint
133
+
134
+
# You can auto-fix some issues with:
135
+
poe lint --fix
81
136
```
82
137
83
138
## PRs
@@ -90,7 +145,7 @@ We welcome contributions. In order to make the PR process efficient, please foll
90
145
***Please provide any related information needed to understand the change** - docs, guidelines, use-case, best practices and so on. Opinions are accepted, but have to be backed up.
91
146
***Checks should pass** - these including linting with black and running tests.
92
147
93
-
##Code of Conduct
148
+
# Code of Conduct
94
149
This project's code of conduct can be found in the
0 commit comments