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

feat(integration/prefect): DataHub Prefect Emitter #1

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
215a9a2
Initial commit: project generated by prefect-collection-template
shubhamjagtap639 May 30, 2023
aa508d9
datahub emitter code modified
shubhamjagtap639 May 31, 2023
3ae5046
Emit workspace added
shubhamjagtap639 Jun 2, 2023
8d05960
dataflow, datajob and data process instance properties added
shubhamjagtap639 Jun 2, 2023
e5da5a7
datahub emitter file reformatted
shubhamjagtap639 Jun 2, 2023
0cae683
test cases for emit task, flow, and workspaces added
shubhamjagtap639 Jun 7, 2023
7633391
Constants.py added and file reformatted
shubhamjagtap639 Jun 9, 2023
c141aa0
Code change as per PR review comment
shubhamjagtap639 Jun 13, 2023
9404be1
Test cases modified
shubhamjagtap639 Jun 13, 2023
3cbae6d
code formatted
shubhamjagtap639 Jun 13, 2023
d37ea71
test case modified
shubhamjagtap639 Jun 13, 2023
29ebd0e
Code formatted
shubhamjagtap639 Jun 13, 2023
5103243
Workspacekey test case removed
shubhamjagtap639 Jun 13, 2023
88d0551
Testcase for workspace key added
shubhamjagtap639 Jun 13, 2023
6cda94b
Code formatted
shubhamjagtap639 Jun 13, 2023
3bfc4c1
Test case added
shubhamjagtap639 Jun 13, 2023
b61076f
Emit workspace code removed
shubhamjagtap639 Jun 13, 2023
cfed858
dataprocess instance id modified
shubhamjagtap639 Jun 13, 2023
f8bbf49
Code formatted
shubhamjagtap639 Jun 13, 2023
089add5
Code chnages as per review comment
shubhamjagtap639 Jun 13, 2023
63181ba
datajob tags test case added
shubhamjagtap639 Jun 13, 2023
c3cf561
temprarory change to check if PR checks getting passed or not
shubhamjagtap639 Jun 13, 2023
c3bb799
temp changes
shubhamjagtap639 Jun 13, 2023
63fb530
temp change
shubhamjagtap639 Jun 13, 2023
4684ae1
Code formated
shubhamjagtap639 Jun 13, 2023
f42b603
Temporary changes reverted
shubhamjagtap639 Jun 14, 2023
a3a86f1
Concept mapping doc added and code change as per review comment
shubhamjagtap639 Jun 14, 2023
06a1de5
Author name modified
shubhamjagtap639 Jun 15, 2023
54891a7
doc update
siddiquebagwan-gslab Jun 16, 2023
b96bd03
code formatted and changes as per review comment
shubhamjagtap639 Jun 19, 2023
054ac15
Error handling added
shubhamjagtap639 Jun 20, 2023
7fc633b
remove unwanted if condition
siddiquebagwan-gslab Jun 20, 2023
026c8fd
Remove urn and possible value cols from concepts mapping table
shubhamjagtap639 Jun 20, 2023
f712a38
resolve merge conflict
siddiquebagwan-gslab Jun 21, 2023
b44a9a3
file reformatted
shubhamjagtap639 Jun 27, 2023
2af3209
Code changes to support python3.7
shubhamjagtap639 Jun 27, 2023
44e877d
Code formatted
shubhamjagtap639 Jun 27, 2023
6128cd5
python-resources package added
shubhamjagtap639 Jun 27, 2023
a497abd
Remove unused python-resource package
shubhamjagtap639 Jun 27, 2023
3777f4e
Merge branch 'prefect-datahub-emitter' into main+prefect-datahub-emitter
siddiquebagwan-gslab Jun 28, 2023
52d7f82
Prefect version changed to fixed 2.10.16
shubhamjagtap639 Jun 28, 2023
9633a10
Merge branch 'prefect-datahub-emitter' into main+prefect-datahub-emitter
siddiquebagwan-gslab Jun 28, 2023
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
20 changes: 20 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"template": "https://github.com/PrefectHQ/prefect-collection-template",
"commit": "e11a3be195f24f60ed3f564dfccb40170ee7c3fa",
"checkout": null,
"context": {
"cookiecutter": {
"full_name": "Arcyl Data",
"email": "[email protected]",
"github_organization": "PrefectHQ",
"collection_name": "prefect-datahub",
"collection_slug": "prefect_datahub",
"collection_short_description": "Metadata emitter for datahub",
"_copy_without_render": [
".github/workflows/*.yml"
],
"_template": "https://github.com/PrefectHQ/prefect-collection-template"
}
},
"directory": null
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
prefect_datahub/_version.py export-subst
Empty file added .github/CODEOWNERS
Empty file.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- Thanks for submitting an issue! Please describe the issue. -->

# Expectation / Proposal

# Traceback / Example

- [ ] I would like to [help contribute](https://shubhamjagtap639.github.io/prefect-datahub/#contributing) a pull request to resolve this!
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!-- Thanks for contributing 🎉! Please ensure the title neatly summarizes the proposed changes. -->

<!-- Overview -->

Closes

### Example
<!-- A code blurb is best. Changes to features should include an example that is executable by a new user. -->

### Screenshots
<!--
Any relevant screenshots
- The updated docs page from `mkdocs serve`.
- Output from running the example.
- Service integration test results.
-->

### Checklist
<!-- These boxes may be checked after opening the pull request. -->

- [ ] References any related issue by including "Closes #<Issue Number>" or "Closes <Issue URL>".
- If no issue exists and your change is not a small fix, please [create an issue](https://github.com/shubhamjagtap639/prefect-datahub/issues/new/choose) first.
- [ ] Includes tests or only affects documentation.
- [ ] Passes `pre-commit` checks.
- Run `pre-commit install && pre-commit run --all` locally for formatting and linting.
- [ ] Includes screenshots of documentation updates.
- Run `mkdocs serve` view documentation locally.
- [ ] Summarizes PR's changes in [CHANGELOG.md](https://github.com/shubhamjagtap639/prefect-datahub/blob/main/CHANGELOG.md)
4 changes: 4 additions & 0 deletions .github/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
paths-ignore:
- tests/**/test_*.py
- versioneer.py
- prefect_datahub/_version.py
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
24 changes: 24 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Add issues to integrations board

on:
issues:
types:
- opened

jobs:

add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: tibdex/github-app-token@v1
id: generate-token
name: Generate GitHub token
with:
app_id: ${{ secrets.SYNC_APP_ID }}
private_key: ${{ secrets.SYNC_APP_PRIVATE_KEY }}

- uses: actions/[email protected]
with:
project-url: ${{ secrets.ADD_TO_PROJECT_URL }}
github-token: ${{ steps.generate-token.outputs.token }}
35 changes: 35 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CodeQL

on:
push:
branches:
- main

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language:
- python

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql-config.yml
queries: security-and-quality

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
38 changes: 38 additions & 0 deletions .github/workflows/nightly-dev-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Nightly tests against Prefect's main branch
on:
schedule:
- cron: "0 6 * * *"
workflow_dispatch:

jobs:
submit-update-pr:
name: Run tests against Prefect's main branch
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
fail-fast: false
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: requirements*.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade --upgrade-strategy eager -e ".[dev]" "prefect @ git+https://github.com/PrefectHQ/prefect.git@main"

- name: Run tests
env:
PREFECT_API_DATABASE_CONNECTION_URL: "sqlite+aiosqlite:///./collection-tests.db"
run: |
pytest tests -vv
31 changes: 31 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish docs

on:
workflow_dispatch

jobs:
build-and-publish-docs:
name: Build and publish docs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
cache-dependency-path: requirements*.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade --upgrade-strategy eager -e ".[dev]"
mkdocs build

- name: Publish docs
uses: JamesIves/[email protected]
with:
branch: docs
folder: site
79 changes: 79 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build & Release

on:
push:
tags:
- "v*"

jobs:
build-release:
name: Build Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Install packages
run: |
python -m pip install --upgrade pip build
python -m pip install --upgrade --upgrade-strategy eager -e .[dev]

- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel --outdir dist/

- name: Publish build artifacts
uses: actions/upload-artifact@v3
with:
name: built-package
path: "./dist"

publish-release:
name: Publish release to PyPI
needs: [build-release]
environment: "prod"
runs-on: ubuntu-latest

steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: built-package
path: "./dist"

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true

build-and-publish-docs:
name: Build and publish docs
needs: [build-release, publish-release]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
cache-dependency-path: requirements*.txt

- name: Build docs
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade --upgrade-strategy eager -e .[dev]
mkdocs build

- name: Publish docs
uses: JamesIves/[email protected]
with:
branch: docs
folder: site
27 changes: 27 additions & 0 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Static analysis

on: [pull_request]

jobs:
pre-commit-checks:
name: Pre-commit checks
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install pre-commit
run: |
python -m pip install --upgrade pip
pip install pre-commit

- name: Run pre-commit
run: |
pre-commit run --show-diff-on-failure --color=always --all-files
46 changes: 46 additions & 0 deletions .github/workflows/template-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Template Synchronization
on:
schedule:
- cron: "0 6 * * *"
workflow_dispatch:

jobs:
submit-update-pr:
name: Submit update PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install cruft
run: pip install "cookiecutter>=1.7.3,<2.0.0" cruft

- name: Perform updates
run: cruft update -y

- uses: tibdex/github-app-token@v1
id: generate-token
name: Generate GitHub token
with:
app_id: ${{ secrets.SYNC_APP_ID }}
private_key: ${{ secrets.SYNC_APP_PRIVATE_KEY }}

- name: Submit PR
uses: peter-evans/create-pull-request@v4
with:
commit-message: Updating collection with changes to prefect-collection-template
token: ${{ steps.generate-token.outputs.token }}
branch: sync-with-template
delete-branch: true
title: Sync Collection with changes to prefect-collection-template
body: |
Automated PR created to propagate changes from prefect-collection-template to this collection

Feel free to make any necessary changes to this PR before merging.
labels: |
template sync
automated pr
Loading