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

allow package specifications in dependencies.yml #83

Merged
merged 1 commit into from
Jul 19, 2023
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
63 changes: 62 additions & 1 deletion schemas/1.6/dependencies-1.6.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "dependencies",
"required": ["projects"],
"properties": {
"projects": {
"type": "array",
Expand All @@ -16,6 +15,68 @@
},
"additionalProperties": false
}
},
"packages": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"required": ["package", "version"],
"properties": {
"version": {
"title": "Package version",
"type": ["string", "number", "array"],
"description": "A semantic version string or range, such as [\">=1.0.0\", \"<2.0.0\"]"
},
"install-prerelease": {
"title": "Install Prerelease",
"type": "boolean",
"description": "Opt in to prerelease versions of a package"
},
"package": {
"title": "Package identifier",
"type": "string",
"description": "Must be in format `org_name/package_name`. Refer to hub.getdbt.com for installation instructions",
"examples": ["dbt-labs/dbt_utils"],
"pattern": "^[\\w\\-\\.]+/[\\w\\-\\.]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": ["git"],
"properties": {
"git": {
"title": "Git URL",
"type": "string"
},
"revision": {
"title": "Revision",
"type": "string",
"description": "Pin your package to a specific release by specifying a release name"
},
"subdirectory": {
"title": "Subdirectory",
"type": "string",
"description": "Only required if the package is nested in a subdirectory of the git project"
}
},
"additionalProperties": false
},
{
"type": "object",
"properties": {
"local": {
"type": "string"
}
},
"additionalProperties": false
}
]
},
"minItems": 1
}
},
"additionalProperties": false
Expand Down
4 changes: 4 additions & 0 deletions tests/1.6/invalid/dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
projects:
- gnome: my_dbt_project

pancakeages:
- pancake: dbt-labs/dbt-utils
version: 1.0.0
4 changes: 4 additions & 0 deletions tests/1.6/valid/dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
projects:
- name: my_dbt_project

packages:
- package: dbt-labs/dbt-utils
version: 1.0.0