diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..89fa0cc --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,10 @@ +# Microsoft Open Source Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). + +Resources: + +- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) +- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support) \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..3ee9c9f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,32 @@ +# 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.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 (for example, label or comment). +Simply follow the instructions provided by the bot. You will only need to do this once +across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +## Reporting security issues + +Please do not report security vulnerabilities through public GitHub issues. Follow the instructions in [SECURITY.md](SECURITY.md). + +## Development workflow + +Before opening a pull request, run the checks relevant to your change: + +```bash +source .venv/bin/activate +maturin develop +cargo clippy --all-targets +pytest -v +``` + +After Rust source changes (`src/*.rs`), re-run `maturin develop` before running Python tests. \ No newline at end of file diff --git a/README.md b/README.md index f70f8ea..676c663 100644 --- a/README.md +++ b/README.md @@ -295,6 +295,26 @@ See [CHANGELOG.md](https://github.com/microsoft/duroxide-python/blob/main/CHANGE - [User Guide](https://github.com/microsoft/duroxide-python/blob/main/docs/user-guide.md) — orchestration patterns, activities, providers, tracing, determinism rules - [Architecture](https://github.com/microsoft/duroxide-python/blob/main/docs/architecture.md) — PyO3 interop, GIL deadlock fix, generator driver, tracing internals +## Support + +Use GitHub Issues for bug reports and feature requests. Do not report security vulnerabilities through public GitHub issues; follow the instructions in [SECURITY.md](SECURITY.md) instead. + +## Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or comments. + +## Security + +Microsoft takes the security of our software products and services seriously. Please do not report security vulnerabilities through public GitHub issues. See [SECURITY.md](SECURITY.md) for security reporting instructions. + +## Privacy and Telemetry + +duroxide-python does not send telemetry to Microsoft. Applications may configure their own logging or metrics exporters; those signals are controlled by the application owner. + +## 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 [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 is subject to those third-party policies. + ## License -MIT +MIT License - see [LICENSE](LICENSE) for details. diff --git a/ci/smoke/run-local.ps1 b/ci/smoke/run-local.ps1 index 7054cc9..fc7d058 100644 --- a/ci/smoke/run-local.ps1 +++ b/ci/smoke/run-local.ps1 @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Pre-publish smoke for Windows. See run-local.sh for details. $ErrorActionPreference = 'Stop' diff --git a/ci/smoke/run-local.sh b/ci/smoke/run-local.sh index 9ba44f5..f4daac5 100755 --- a/ci/smoke/run-local.sh +++ b/ci/smoke/run-local.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Pre-publish smoke: install the duroxide wheel for the current platform into # a fresh venv OUTSIDE the repo, then run smoke.py. # diff --git a/ci/smoke/run-registry.ps1 b/ci/smoke/run-registry.ps1 index 8207629..2885e20 100644 --- a/ci/smoke/run-registry.ps1 +++ b/ci/smoke/run-registry.ps1 @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Post-publish smoke for Windows. See run-registry.sh for details. $ErrorActionPreference = 'Stop' diff --git a/ci/smoke/run-registry.sh b/ci/smoke/run-registry.sh index e3f3eee..d4ac975 100755 --- a/ci/smoke/run-registry.sh +++ b/ci/smoke/run-registry.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Post-publish smoke: install `duroxide==` from PyPI into a fresh # venv and run smoke.py. # diff --git a/ci/smoke/smoke.py b/ci/smoke/smoke.py index 24174f0..332b94b 100644 --- a/ci/smoke/smoke.py +++ b/ci/smoke/smoke.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ Cross-platform packaging smoke test for the `duroxide` PyPI wheel. diff --git a/python/duroxide/__init__.py b/python/duroxide/__init__.py index 32a677c..c5fe570 100644 --- a/python/duroxide/__init__.py +++ b/python/duroxide/__init__.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ duroxide - Python SDK for the Duroxide durable execution runtime. diff --git a/python/duroxide/context.py b/python/duroxide/context.py index e21b065..1ff8915 100644 --- a/python/duroxide/context.py +++ b/python/duroxide/context.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ OrchestrationContext and ActivityContext for duroxide Python SDK. diff --git a/python/duroxide/driver.py b/python/duroxide/driver.py index 502f252..5751a02 100644 --- a/python/duroxide/driver.py +++ b/python/duroxide/driver.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ Generator driver for duroxide Python SDK. diff --git a/src/client.rs b/src/client.rs index 0b34b71..90910fc 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use pyo3::prelude::*; use std::sync::Arc; use std::time::Duration; diff --git a/src/handlers.rs b/src/handlers.rs index 304ce8c..7387edb 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use parking_lot::Mutex; use pyo3::prelude::*; use std::collections::HashMap; diff --git a/src/lib.rs b/src/lib.rs index e42a184..1514f8a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + mod client; mod handlers; mod pg_provider; diff --git a/src/pg_provider.rs b/src/pg_provider.rs index f2b52b0..bc663c9 100644 --- a/src/pg_provider.rs +++ b/src/pg_provider.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use pyo3::prelude::*; use std::sync::Arc; use std::time::Duration; diff --git a/src/provider.rs b/src/provider.rs index f1b1f6b..d38ef7e 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use pyo3::prelude::*; use std::sync::Arc; diff --git a/src/runtime.rs b/src/runtime.rs index 4b2ee4b..887c2e4 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use pyo3::prelude::*; use std::sync::Arc; use std::time::Duration; diff --git a/src/types.rs b/src/types.rs index 9cd0a3e..14651b6 100644 --- a/src/types.rs +++ b/src/types.rs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + use pyo3::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/tests/scenarios/__init__.py b/tests/scenarios/__init__.py index e69de29..59e481e 100644 --- a/tests/scenarios/__init__.py +++ b/tests/scenarios/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. diff --git a/tests/scenarios/test_toygres.py b/tests/scenarios/test_toygres.py index 01cfede..9cf98d9 100644 --- a/tests/scenarios/test_toygres.py +++ b/tests/scenarios/test_toygres.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ Toygres Scenario Tests — duroxide Python SDK diff --git a/tests/test_admin_api.py b/tests/test_admin_api.py index 1181d78..49d59fa 100644 --- a/tests/test_admin_api.py +++ b/tests/test_admin_api.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ Management / Admin API tests for duroxide Python SDK — PostgreSQL backend. diff --git a/tests/test_advanced_features.py b/tests/test_advanced_features.py index 1c98d38..7cc6bae 100644 --- a/tests/test_advanced_features.py +++ b/tests/test_advanced_features.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ Advanced feature tests covering typed registration, retry, cancellation, timers, custom status, event queues, CAN, versioning, errors, and nondeterminism. diff --git a/tests/test_async_blocks.py b/tests/test_async_blocks.py index 1e9ce39..4ed3c89 100644 --- a/tests/test_async_blocks.py +++ b/tests/test_async_blocks.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ Tests for async blocks using sub-orchestrations with all() and race(). diff --git a/tests/test_copilot_chat.py b/tests/test_copilot_chat.py index ad31a8e..9deac2b 100644 --- a/tests/test_copilot_chat.py +++ b/tests/test_copilot_chat.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ Copilot Chat scenario — exercises event queues, custom status, continue-as-new, and wait_for_status_change in a multi-turn conversational pattern. diff --git a/tests/test_e2e.py b/tests/test_e2e.py index 7120444..c89109e 100644 --- a/tests/test_e2e.py +++ b/tests/test_e2e.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ End-to-end tests for duroxide Python SDK — PostgreSQL backend. Ported from duroxide-node/__tests__/e2e.test.js diff --git a/tests/test_init_tracing.py b/tests/test_init_tracing.py index 9764df5..9c98ac2 100644 --- a/tests/test_init_tracing.py +++ b/tests/test_init_tracing.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ Tests for init_tracing function. """ diff --git a/tests/test_kv_store.py b/tests/test_kv_store.py index 45ce488..94bd408 100644 --- a/tests/test_kv_store.py +++ b/tests/test_kv_store.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """End-to-end KV store tests for the duroxide Python SDK.""" import time diff --git a/tests/test_races.py b/tests/test_races.py index 71200e0..b66254b 100644 --- a/tests/test_races.py +++ b/tests/test_races.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ Tests for ctx.all() (join) and ctx.race() (select) with mixed task types, including activity cooperative cancellation via is_cancelled(). diff --git a/tests/test_sessions.py b/tests/test_sessions.py index 97b845d..e48f15e 100644 --- a/tests/test_sessions.py +++ b/tests/test_sessions.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ End-to-end tests for activity session affinity in duroxide Python SDK. diff --git a/tests/test_tags.py b/tests/test_tags.py index 1c063aa..d83b96f 100644 --- a/tests/test_tags.py +++ b/tests/test_tags.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ Activity tag routing tests for duroxide Python SDK. diff --git a/tests/test_typed_apis.py b/tests/test_typed_apis.py index 6ab9e91..28a1c6f 100644 --- a/tests/test_typed_apis.py +++ b/tests/test_typed_apis.py @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + """ Tests for typed convenience API methods in duroxide Python SDK.