Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split the unconditional runtime dependencies into extras #52

Merged
merged 1 commit into from
Nov 6, 2024
Merged
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
1 change: 1 addition & 0 deletions .pip-tools.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tool.pip-tools]
allow-unsafe = true # weird outdated default
all-extras = true # so that all optional dependencies are considered
generate-hashes = false # pip bug https://github.com/pypa/pip/issues/9243
resolver = "backtracking" # modern depresolver
strip-extras = true # so that output files are true pip constraints
108 changes: 91 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ dependencies = [ # runtime deps # https://packaging.python.org/en/latest/guide
# GUIDANCE: only add things that this project imports directly
# GUIDANCE: only set lower version bounds
# "awx_plugins.base_interface.api", # keep `__init__.py` empty
"awx_plugins.interfaces", # standard interface declarations for AWX plugins
"PyYAML", # credentials.injectors, inventory.plugins
"azure-identity", # credentials.azure_kv
"azure-keyvault", # credentials.azure_kv
"boto3", # credentials.awx_secretsmanager
"msrestazure", # credentials.azure_kv
"python-dsv-sdk >= 1.0.4", # credentials.thycotic_dsv
"python-tss-sdk >= 1.2.1", # credentials.thycotic_tss
"requests", # credentials.aim, credentials.centrify_vault, credentials.conjur, credentials.hashivault
]
classifiers = [ # Allowlist: https://pypi.org/classifiers/
"Development Status :: 1 - Planning",
Expand Down Expand Up @@ -105,14 +96,97 @@ file = "LICENSE"
# name = ""
# email = "@"

# [project.optional-dependencies]
# # These are additional runtime dependencies used as feature-flags.
# # The end-users will be able to reference them in their
# # dependencies. Do not abuse as "test" / "dev" deps.
# # Treat as public API.
# a-feature = [
# "a-dependency"
# ]
[project.optional-dependencies]
# These are additional runtime dependencies used as feature-flags.
# The end-users will be able to reference them in their
# dependencies. Do not abuse as "test" / "dev" deps.
# Treat as public API.
credentials-conjur = [
"awx_plugins.interfaces",
"requests",
]
credentials-hashivault-kv = [
"awx_plugins.interfaces",
"requests",
]
credentials-hashivault-ssh = [
"awx_plugins.interfaces",
"requests",
]
credentials-azure-kv = [
"awx_plugins.interfaces",
"azure-identity",
"azure-keyvault",
"msrestazure",
]
credentials-aim = [
"awx_plugins.interfaces",
"requests",
]
credentials-centrify-vault-kv = [
"awx_plugins.interfaces",
"requests",
]
credentials-thycotic-dsv = [
"awx_plugins.interfaces",
"python-dsv-sdk >= 1.0.4",
]
credentials-thycotic-tss = [
"awx_plugins.interfaces",
"python-tss-sdk >= 1.2.1",
]
credentials-aws-secretsmanager-credential = [
"awx_plugins.interfaces",
"boto3",
]
inventory-azure-rm = [
"awx_plugins.interfaces",
"PyYAML",
]
inventory-ec2 = [
"awx_plugins.interfaces",
"PyYAML",
]
inventory-gce = [
"awx_plugins.interfaces",
"PyYAML",
]
inventory-vmware = [
"awx_plugins.interfaces",
"PyYAML",
]
inventory-openstack = [
"awx_plugins.interfaces",
"PyYAML",
]
inventory-rhv = [
"awx_plugins.interfaces",
"PyYAML",
]
inventory-satellite6 = [
"awx_plugins.interfaces",
"PyYAML",
]
inventory-terraform = [
"awx_plugins.interfaces",
"PyYAML",
]
inventory-controller = [
"awx_plugins.interfaces",
"PyYAML",
]
inventory-insights = [
"awx_plugins.interfaces",
"PyYAML",
]
inventory-openshift-virtualization = [
"awx_plugins.interfaces",
"PyYAML",
]
inventory-constructed = [
"awx_plugins.interfaces",
"PyYAML",
]

[project.readme]
file = "README.md"
Expand Down
22 changes: 22 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@ warnings-to-errors = -Werror
[testenv]
description = Run pytest under {envpython}
deps = -rdependencies{/}direct{/}py.in
extras =
credentials-conjur
credentials-hashivault-kv
credentials-hashivault-ssh
credentials-azure-kv
credentials-aim
credentials-centrify-vault-kv
credentials-thycotic-dsv
credentials-thycotic-tss
credentials-aws-secretsmanager-credential
inventory-azure-rm
inventory-ec2
inventory-gce
inventory-vmware
inventory-openstack
inventory-rhv
inventory-satellite6
inventory-terraform
inventory-controller
inventory-insights
inventory-openshift-virtualization
inventory-constructed
install_command =
{envpython} \
{[python-cli-options]byte-errors} \
Expand Down