tlpytools 0.2.12__tar.gz → 0.2.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tlpytools-0.2.12 → tlpytools-0.2.13}/.github/copilot-instructions.md +2 -2
- {tlpytools-0.2.12 → tlpytools-0.2.13}/.github/skills/prepare-official-release/SKILL.md +1 -1
- {tlpytools-0.2.12 → tlpytools-0.2.13}/.github/workflows/deploy.yml +1 -1
- {tlpytools-0.2.12 → tlpytools-0.2.13}/CHANGELOG.md +11 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/DEVELOPER_GUIDE.md +2 -2
- {tlpytools-0.2.12 → tlpytools-0.2.13}/ENVIRONMENT_VARIABLES.md +7 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/PKG-INFO +1 -1
- {tlpytools-0.2.12 → tlpytools-0.2.13}/docs/azure_credential_manager.md +1 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/pyproject.toml +1 -1
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/__init__.py +1 -1
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/azure_credential.py +10 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/tests/test_azure_credential.py +22 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/uv.lock +443 -416
- {tlpytools-0.2.12 → tlpytools-0.2.13}/.env.example +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/.github/skills/README.md +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/.github/workflows/code-formatting-pr.yml +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/.github/workflows/code-formatting.yml +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/.github/workflows/test.yml +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/.gitignore +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/.pre-commit-config.yaml +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/.python-version +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/Makefile +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/README.md +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/docs/adls_server.md +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/docs/unified_logging.md +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/requirements.txt +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/examples/batchtask.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/examples/data_files/example.csv +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/examples/mydataproject.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/examples/readwritedata.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/examples/unified_logging.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/adls_server.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/config.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/data.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/data_store.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/env_config.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/log.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/orca/README.md +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/orca/__init__.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/orca/__main__.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/orca/batch_task_runner.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/orca/cli.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/orca/orca_model_config_barebone.yaml +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/orca/orca_model_config_example.yaml +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/orca/orchestrator.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/src/tlpytools/sql_server.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/tests/README.md +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/tests/__init__.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/tests/conftest.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/tests/run_tests.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/tests/test_basic.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/tests/test_core.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/tests/test_orca_cli_batch_options.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/tests/test_orca_integration.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/tests/test_orca_resume_cloud.py +0 -0
- {tlpytools-0.2.12 → tlpytools-0.2.13}/tests/test_orca_unit.py +0 -0
|
@@ -98,8 +98,8 @@ Interpretation for agent PRs:
|
|
|
98
98
|
|
|
99
99
|
Observed result:
|
|
100
100
|
- Build succeeds and produces:
|
|
101
|
-
- `dist/tlpytools-0.2.
|
|
102
|
-
- `dist/tlpytools-0.2.
|
|
101
|
+
- `dist/tlpytools-0.2.13.tar.gz`
|
|
102
|
+
- `dist/tlpytools-0.2.13-py3-none-any.whl`
|
|
103
103
|
|
|
104
104
|
### 5) Run
|
|
105
105
|
- ORCA CLI (module form):
|
|
@@ -443,7 +443,7 @@ Run all tests in sequence (not parallel) to avoid resource conflicts:
|
|
|
443
443
|
**Example 3 - Repository Change:**
|
|
444
444
|
```markdown
|
|
445
445
|
**Update to Repository-Specific Notes:**
|
|
446
|
-
- **Python version:** Updated to >=3.11, <3.14 for the 0.2.
|
|
446
|
+
- **Python version:** Updated to >=3.11, <3.14 for the 0.2.13 release
|
|
447
447
|
- Previous versions used 3.10
|
|
448
448
|
- Update affects CI workflows and local development
|
|
449
449
|
- All dependencies verified compatible with 3.12
|
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to TLPyTools will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.2.13]
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **`OPTION_AZURE_CLI_PROCESS_TIMEOUT` environment variable (default `30`):** seconds allowed for
|
|
9
|
+
each `az account get-access-token` call, passed to `DefaultAzureCredential` as `process_timeout`
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- **Spurious `AzureCliCredential.get_token_info failed: Failed to invoke the Azure CLI` warnings
|
|
13
|
+
during ADLS upload/download:** on slow or heavily loaded machines the `az` call could exceed the
|
|
14
|
+
Azure SDK's 10 second default; the default is now 30 seconds
|
|
15
|
+
|
|
5
16
|
## [0.2.12]
|
|
6
17
|
|
|
7
18
|
### Added
|
|
@@ -200,7 +200,7 @@ make check-all
|
|
|
200
200
|
4. Click **"Run workflow"** button
|
|
201
201
|
5. Fill in the required information:
|
|
202
202
|
- **Branch**: Select `main` (or your release branch)
|
|
203
|
-
- **Version number**: Enter the new version (e.g., `0.2.
|
|
203
|
+
- **Version number**: Enter the new version (e.g., `0.2.13`)
|
|
204
204
|
- **Is this a pre-release?**: Check if this is a pre-release version
|
|
205
205
|
|
|
206
206
|
#### 3. Monitor the Release
|
|
@@ -219,7 +219,7 @@ After the workflow completes:
|
|
|
219
219
|
|
|
220
220
|
```bash
|
|
221
221
|
# Verify the package is available on PyPI
|
|
222
|
-
pip install tlpytools==0.2.
|
|
222
|
+
pip install tlpytools==0.2.13 # Replace with your version
|
|
223
223
|
|
|
224
224
|
# Test installation in a fresh environment
|
|
225
225
|
python -c "import tlpytools; print(tlpytools.__version__)"
|
|
@@ -209,6 +209,13 @@ The Azure Credential Manager uses these environment variables to configure the D
|
|
|
209
209
|
- This option only applies on azure-identity versions that support `exclude_broker_credential`.
|
|
210
210
|
- Useful when you see `BrokerCredential` failures such as `Status_IncorrectConfiguration`.
|
|
211
211
|
|
|
212
|
+
- `OPTION_AZURE_CLI_PROCESS_TIMEOUT`: Seconds allowed for each `az account get-access-token` call
|
|
213
|
+
- Default: `30` (Microsoft default: `10`)
|
|
214
|
+
- Valid values: positive integer
|
|
215
|
+
- Used by: azure_credential.py
|
|
216
|
+
- Notes:
|
|
217
|
+
- Raise it if you see `AzureCliCredential.get_token_info failed: Failed to invoke the Azure CLI` during ADLS upload/download on a slow or heavily loaded machine.
|
|
218
|
+
|
|
212
219
|
**Note**: The Azure Credential Manager provides a centralized authentication system for all Azure services used by tlpytools. It implements a singleton pattern with token caching for improved performance and consistency across modules.
|
|
213
220
|
|
|
214
221
|
## Setting Environment Variables
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: tlpytools
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.13
|
|
4
4
|
Summary: TransLink's Python Tools - A comprehensive toolkit for transportation modeling and forecasting
|
|
5
5
|
Project-URL: Homepage, https://github.com/TransLinkForecasting/tlpytools
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/TransLinkForecasting/tlpytools/issues
|
|
@@ -151,6 +151,7 @@ All authentication control variables accept boolean values: `true/false`, `1/0`,
|
|
|
151
151
|
| `OPTION_EXCLUDE_DEVELOPER_CLI_CREDENTIAL` | `true` | Exclude Azure Developer CLI authentication |
|
|
152
152
|
| `OPTION_EXCLUDE_INTERACTIVE_BROWSER_CREDENTIAL` | `true` | Exclude interactive browser authentication |
|
|
153
153
|
| `OPTION_EXCLUDE_BROKER_CREDENTIAL` | `true` | Exclude broker/WAM authentication |
|
|
154
|
+
| `OPTION_AZURE_CLI_PROCESS_TIMEOUT` | `30` | Seconds allowed per `az account get-access-token` call (Microsoft default is 10). Raise it if you see `AzureCliCredential.get_token_info failed: Failed to invoke the Azure CLI` on slow machines |
|
|
154
155
|
|
|
155
156
|
### Configuration Examples
|
|
156
157
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tlpytools"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.13"
|
|
8
8
|
description = "TransLink's Python Tools - A comprehensive toolkit for transportation modeling and forecasting"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11,<3.14"
|
|
@@ -45,6 +45,8 @@ class AzureCredentialManager:
|
|
|
45
45
|
OPTION_EXCLUDE_DEVELOPER_CLI_CREDENTIAL: Exclude AzureDeveloperCliCredential (tlpytools default: True; Microsoft default: False)
|
|
46
46
|
OPTION_EXCLUDE_INTERACTIVE_BROWSER_CREDENTIAL: Exclude InteractiveBrowserCredential (tlpytools default: True; Microsoft default: True)
|
|
47
47
|
OPTION_EXCLUDE_BROKER_CREDENTIAL: Exclude brokered/WAM authentication (tlpytools default: True; Microsoft default: False)
|
|
48
|
+
OPTION_AZURE_CLI_PROCESS_TIMEOUT: Seconds allowed for each `az account get-access-token`
|
|
49
|
+
call made by the developer-CLI credentials (tlpytools default: 30; Microsoft default: 10)
|
|
48
50
|
|
|
49
51
|
Usage:
|
|
50
52
|
# Get the credential manager instance
|
|
@@ -172,6 +174,12 @@ class AzureCredentialManager:
|
|
|
172
174
|
exclude_broker_credential = get_env_var(
|
|
173
175
|
"OPTION_EXCLUDE_BROKER_CREDENTIAL", default=True
|
|
174
176
|
)
|
|
177
|
+
# Once DefaultAzureCredential has obtained its first token it calls
|
|
178
|
+
# AzureCliCredential directly, outside the credential chain, so a slow `az`
|
|
179
|
+
# spawn (Windows az.cmd under load) that exceeds the SDK's 10s default is logged
|
|
180
|
+
# as a WARNING ("AzureCliCredential.get_token_info failed: Failed to invoke the
|
|
181
|
+
# Azure CLI") even though later requests succeed. A longer timeout avoids that.
|
|
182
|
+
process_timeout = get_env_var("OPTION_AZURE_CLI_PROCESS_TIMEOUT", default=30)
|
|
175
183
|
|
|
176
184
|
# Log the configuration
|
|
177
185
|
self._logger.debug("Azure Credential Configuration:")
|
|
@@ -206,6 +214,7 @@ class AzureCredentialManager:
|
|
|
206
214
|
" Exclude Developer CLI Credential: %s", exclude_developer_cli_credential
|
|
207
215
|
)
|
|
208
216
|
self._logger.debug(" Exclude Broker Credential: %s", exclude_broker_credential)
|
|
217
|
+
self._logger.debug(" Azure CLI Process Timeout: %s", process_timeout)
|
|
209
218
|
|
|
210
219
|
kwargs: dict[str, Any] = {
|
|
211
220
|
"exclude_environment_credential": exclude_environment_credential,
|
|
@@ -218,6 +227,7 @@ class AzureCredentialManager:
|
|
|
218
227
|
"exclude_powershell_credential": exclude_powershell_credential,
|
|
219
228
|
"exclude_developer_cli_credential": exclude_developer_cli_credential,
|
|
220
229
|
"exclude_broker_credential": exclude_broker_credential,
|
|
230
|
+
"process_timeout": process_timeout,
|
|
221
231
|
}
|
|
222
232
|
|
|
223
233
|
# Maintain compatibility across azure-identity versions by only passing
|
|
@@ -185,5 +185,27 @@ def test_environment_variable_configuration():
|
|
|
185
185
|
assert call_kwargs["exclude_broker_credential"] is True
|
|
186
186
|
|
|
187
187
|
|
|
188
|
+
def test_cli_process_timeout_configuration():
|
|
189
|
+
"""The az CLI subprocess timeout defaults to 30s and is overridable via env var"""
|
|
190
|
+
from tlpytools.azure_credential import AzureCredentialManager
|
|
191
|
+
|
|
192
|
+
manager = AzureCredentialManager.get_instance()
|
|
193
|
+
|
|
194
|
+
for value, expected in ((None, 30), ("60", 60)):
|
|
195
|
+
with patch.dict(os.environ):
|
|
196
|
+
os.environ.pop("OPTION_AZURE_CLI_PROCESS_TIMEOUT", None)
|
|
197
|
+
if value is not None:
|
|
198
|
+
os.environ["OPTION_AZURE_CLI_PROCESS_TIMEOUT"] = value
|
|
199
|
+
manager.reset()
|
|
200
|
+
with patch(
|
|
201
|
+
"tlpytools.azure_credential.DefaultAzureCredential"
|
|
202
|
+
) as mock_cred_class:
|
|
203
|
+
mock_cred_class.return_value = Mock()
|
|
204
|
+
manager.get_credential()
|
|
205
|
+
assert mock_cred_class.call_args[1]["process_timeout"] == expected
|
|
206
|
+
|
|
207
|
+
manager.reset()
|
|
208
|
+
|
|
209
|
+
|
|
188
210
|
if __name__ == "__main__":
|
|
189
211
|
pytest.main([__file__, "-v"])
|