Skip to content

Commit

Permalink
allow package specifications in dependencies.yml (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-connors-3 authored Jul 19, 2023
1 parent 3fc62c3 commit 6195f9d
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 1 deletion.
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

0 comments on commit 6195f9d

Please sign in to comment.