Skip to content

Commit

Permalink
Merge pull request #52 from jessicamack/split-requirements
Browse files Browse the repository at this point in the history
Split the unconditional runtime dependencies into extras
  • Loading branch information
webknjaz authored Nov 6, 2024
2 parents cfcafa5 + 3cd6520 commit 678ea69
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 17 deletions.
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

0 comments on commit 678ea69

Please sign in to comment.