-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
142 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,14 +14,6 @@ class GitCfnginPackageSourceDefinitionModel(ConfigProperty): | |
Package source located in a git repository. | ||
Attributes: | ||
branch: Branch name. | ||
commit: Commit hash. | ||
configs: List of CFNgin config paths to execute. | ||
paths: List of paths to append to ``sys.path``. | ||
tag: Git tag. | ||
uri: Remote git repo URI. | ||
""" | ||
|
||
model_config = ConfigDict( | ||
|
@@ -34,27 +26,39 @@ class GitCfnginPackageSourceDefinitionModel(ConfigProperty): | |
validate_default=True, | ||
validate_assignment=True, | ||
) | ||
|
||
branch: Annotated[ | ||
str | None, Field(title="Git Branch", examples=["ENV-dev", "ENV-prod", "master"]) | ||
] = None | ||
"""Branch name.""" | ||
|
||
commit: Annotated[str | None, Field(title="Git Commit Hash")] = None | ||
"""Commit hash.""" | ||
|
||
configs: Annotated[ | ||
list[str], | ||
Field( | ||
description="Array of paths relative to the root of the package source " | ||
"for configuration that should be merged into the current configuration file." | ||
), | ||
] = [] | ||
"""List of CFNgin config paths to execute.""" | ||
|
||
paths: Annotated[ | ||
list[str], | ||
Field( | ||
description="Array of paths relative to the root of the package source to add to $PATH." | ||
), | ||
] = [] | ||
"""List of paths to append to ``sys.path``.""" | ||
|
||
tag: Annotated[str | None, Field(title="Git Tag", examples=["1.0.0", "v1.0.0"])] = None | ||
"""Git tag.""" | ||
|
||
uri: Annotated[ | ||
str, Field(title="Git Repository URI", examples=["[email protected]:onicagroup/runway.git"]) | ||
] | ||
"""Remote git repo URI.""" | ||
|
||
@model_validator(mode="before") | ||
@classmethod | ||
|
@@ -72,11 +76,6 @@ class LocalCfnginPackageSourceDefinitionModel(ConfigProperty): | |
Package source located on a local disk. | ||
Attributes: | ||
configs: List of CFNgin config paths to execute. | ||
paths: List of paths to append to ``sys.path``. | ||
source: Source. | ||
""" | ||
|
||
model_config = ConfigDict( | ||
|
@@ -97,34 +96,31 @@ class LocalCfnginPackageSourceDefinitionModel(ConfigProperty): | |
"for configuration that should be merged into the current configuration file.", | ||
), | ||
] = [] | ||
"""List of CFNgin config paths to execute.""" | ||
|
||
paths: Annotated[ | ||
list[str], | ||
Field( | ||
description="Array of paths relative to the root of the package source to add to $PATH." | ||
), | ||
] = [] | ||
"""List of paths to append to ``sys.path``.""" | ||
|
||
source: Annotated[ | ||
str, | ||
Field( | ||
description="Path relative to the current configuration file that is the " | ||
"root of the local package source." | ||
), | ||
] | ||
"""Source.""" | ||
|
||
|
||
class S3CfnginPackageSourceDefinitionModel(ConfigProperty): | ||
"""Model for a CFNgin S3 package source definition. | ||
Package source located in AWS S3. | ||
Attributes: | ||
bucket: AWS S3 bucket name. | ||
configs: List of CFNgin config paths to execute. | ||
key: Object key. The object should be a zip file. | ||
paths: List of paths to append to ``sys.path``. | ||
requester_pays: AWS S3 requester pays option. | ||
use_latest: Use the latest version of the object. | ||
""" | ||
|
||
model_config = ConfigDict( | ||
|
@@ -140,41 +136,45 @@ class S3CfnginPackageSourceDefinitionModel(ConfigProperty): | |
) | ||
|
||
bucket: Annotated[str, Field(title="AWS S3 Bucket Name")] | ||
"""AWS S3 bucket name.""" | ||
|
||
configs: Annotated[ | ||
list[str], | ||
Field( | ||
description="Array of paths relative to the root of the package source " | ||
"for configuration that should be merged into the current configuration file.", | ||
), | ||
] = [] | ||
"""List of CFNgin config paths to execute.""" | ||
|
||
key: Annotated[str, Field(title="AWS S3 Object Key")] | ||
"""Object key. The object should be a zip file.""" | ||
|
||
paths: Annotated[ | ||
list[str], | ||
Field( | ||
description="Array of paths relative to the root of the package source to add to $PATH." | ||
), | ||
] = [] | ||
"""List of paths to append to ``sys.path``.""" | ||
|
||
requester_pays: Annotated[ | ||
bool, | ||
Field( | ||
description="Confirms that the requester knows that they will be charged for the request." | ||
), | ||
] = False | ||
"""AWS S3 requester pays option.""" | ||
|
||
use_latest: Annotated[ | ||
bool, | ||
Field(description="Update the local copy if the last modified date in AWS S3 changes."), | ||
] = True | ||
"""Use the latest version of the object.""" | ||
|
||
|
||
class CfnginPackageSourcesDefinitionModel(ConfigProperty): | ||
"""Model for a CFNgin package sources definition. | ||
Attributes: | ||
git: Package source located in a git repo. | ||
local: Package source located on a local disk. | ||
s3: Package source located in AWS S3. | ||
""" | ||
"""Model for a CFNgin package sources definition.""" | ||
|
||
model_config = ConfigDict( | ||
extra="forbid", | ||
|
@@ -193,15 +193,20 @@ class CfnginPackageSourcesDefinitionModel(ConfigProperty): | |
description="Information about git repositories that should be included " | ||
"in the processing of this configuration file.", | ||
) | ||
"""Package source located in a git repo.""" | ||
|
||
local: list[LocalCfnginPackageSourceDefinitionModel] = Field( | ||
default=[], | ||
title="CFNgin Local Package Source Definitions", | ||
description="Information about local directories that should be included " | ||
"in the processing of this configuration file.", | ||
) | ||
"""Package source located on a local disk.""" | ||
|
||
s3: list[S3CfnginPackageSourceDefinitionModel] = Field( | ||
default=[], | ||
title="CFNgin S3 Package Source Definitions", | ||
description="Information about a AWS S3 objects that should be " | ||
"downloaded, unzipped, and included in the processing of this configuration file.", | ||
) | ||
"""Package source located in AWS S3.""" |
Oops, something went wrong.