* refactor: Return full Requirements object instead of [name, specifier]
* feat: Filter out requirements that apply to the current environment
* feat: Add a log message when a requirement is skipped
* small update covering a couple extra usages of parse_require
---------
Co-authored-by: Scott Beddall <scbedd@microsoft.com>
* chore: Add pf-azure extra as dev dependency
* tests: Copy tests verbatim from Microsoft/promptflow
* tests: Re-sync tests
* chore: Re-sync tests again
* fix: Change imports from "promptflow.evals" to "azure.ai.evaluation"
* tests,refactor: Replace promptflow-recording.{is_live,is_record,...} with az-for-python equivalents
* tests,refactor: Make SanitizedValues enum
* tests: Replace "vcr_recording" with azp equivalent
* tests,refactor: Move test data from `recordings/` -> `test_configs`
* tests, fix: Explicitly set expected caplog level
Some unittests inspect the log messages captured by the caplog
pytest fixture.
Explicitly setting the caplog level resolves test failures
when the `log_level` config value is changed from the default.
* tests,refactor: Remove setup_recording_injection_if_enabled
* style: Run isort
* tests,refactor: Remove RecordStorage
RecordStorage appears to be a caching mechanism to accelerate
recordings that involve flows.
* tests,refactor: Remove variable_recorder fixture
This shadows the implementation used by the azure-sdk-for-python
infrastructure.
* tests,refactor: Make a dev_connections fixture
* style: Run isort + black
* tests,chore: Move tests up a directory
* chore: Remove tests/e2etests/README.md
* ci: Re-enable tests in ci
* chore: Mock dev_connections when not live
* tests,fix: Don't hardcode azure_deployment
* tests,feat: Add support for recording openai requests
* fix: response.status -> response.status_code
* fix: Don't await response.text()
* tests,fix: Redirect traffic from AsyncioRequestsTransport to test proxy
Currently, the azure-sdk-for-python infra:
* Only patches a single async transport (AsyncioTransport)
* Only patches the async transport when the test itself is async
This fixture gets requested unconditionally, and patches the
default transport the SDK uses.
Ideally this would be part of the azure-sdk-for-python
test infra.
* tests: Request "recorded_test" for more e2e tests
* test,refactor: Update mock config values
* tests,refactor: Remove redundant mock project_scope
* tests: Add some sanitizers
Were taken from promptflow-recording
* chore: Add assets.json
* tests,fix: Use a FakeTokenCredential when not live
* ci,fix: Exclude tests from packages so verify_sdist finds py.typed
* tests: Add sanitizers for stainless headers and x-cv
* tests: Add a sanitizer for values from connections.json
* tests: Add return type to get_cred
* chore: Update assets.json
* tests,fix: late import NISTTokenizer
nltk does not bundle all the data it uses in its pip install, and
instead requires that the user manually installs them
(`nltk.download`).
nltk will error on the import of any class the depends on some external
resource to work.
The azure-sdk-for-python team's test proxy uses it's own certificate
bundle to enable https connections to the test proxy, but this
seems to cause `nltk.download` to fail.
late importing NISTTokenizer allows tests to run in CI without
immediately crashing on the import
* fix: Fix broken IndirectAttackEvaluator imports
* fix: Fix broken EvaluationMetrics import
* chore: Update assets.json
* docs: Fix docstring for IndirectAttackEvaluator
* tests,fix: Coerce string enum values to string
Otherwise the string in the dict is the qualified name of the enum
value.
* chore: Update assets.json
* tests: Temp skip tests
* chore: Add a minimum bound to azure-identity dependency
* chore: Bump minimum bound of numpy
1.26.4 fixes a bug that prevented numpy from installing on
python3.12
* chore: Bump nltk lower bound
* 3.8.1 crashes on python3.12
* 3.9.0 can't be imported (`import nltk`) without downloading
"wordnet"
* ci: Temporarily disable windows tests
* ci: Temp disable python3.12 test
* chore: Bump numpy minimum bound
On Python 3.11, pandas depends on numpy>=1.23.2
* ci: Run pypy39 on ubuntu
* Remove Optional type annotation from get() methods
* Remove duplicate overloads
* Include xpia in handled_metrics for evaluation aggregation
* Remove jailbreak_type param from logging attributes
* Rename xpia_simulator.py to indirect_attack_simulator.py'
* Remove old commits
python_requires must follow the specification defined in:
https://packaging.python.org/en/latest/specifications/version-specifiers/#id5
In the event that a package version specifies a `python_requires`
that does not match that spec, execution terminates with
an InvalidSpecifier exception.
This commit makes it so that we catch and log the exception,
ignoring the version that has the invalid python version specifier.
An alternative solution could have been to attempt to correct
the version specifier (e.g. '>= 3.5.*' is invalid, but it'd be
trivial to correct it to '>=3.5'). But that would potentially invite
a complexity that costs more than it's worth.
* Add service connection to the test pipeline and code owner to the repository.
* Remove inactive user from code owners.
* Removed myself from owners as pylinter is not reading my membership
* Removed codeowner changes will submit in another pull request