mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 20:06:19 +00:00
This commit is contained in:
parent
ec1e3a2d61
commit
09011d4259
43
.github/workflows/py-generate2.yml
vendored
Normal file
43
.github/workflows/py-generate2.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
# Copyright 2021 Collate
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Validate Pydantic Models 2
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'catalog-rest-service/src/main/resources/json/**'
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: ingestion-generated
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install Ubuntu related dependencies
|
||||
run: |
|
||||
sudo apt-get install -y libsasl2-dev unixodbc-dev python3-venv
|
||||
- name: Install Python
|
||||
run: |
|
||||
python3 -m venv env
|
||||
- name: Generate models
|
||||
run: |
|
||||
source env/bin/activate
|
||||
make generate
|
15
ingestion-generated/Makefile
Normal file
15
ingestion-generated/Makefile
Normal file
@ -0,0 +1,15 @@
|
||||
generate:
|
||||
mkdir -p src/metadata/generated
|
||||
python3 -m pip install --upgrade pip setuptools
|
||||
python3 -m pip install --upgrade -r requirements-dev.txt
|
||||
datamodel-codegen --input ../catalog-rest-service/src/main/resources/json --input-file-type jsonschema --output src/metadata/generated
|
||||
|
||||
clean:
|
||||
rm -rf src/metadata/generated
|
||||
rm -rf build
|
||||
rm -rf dist
|
||||
|
||||
publish: clean generate
|
||||
python setup.py install sdist bdist_wheel
|
||||
twine check dist/*
|
||||
twine upload dist/*
|
14
ingestion-generated/README.md
Normal file
14
ingestion-generated/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
This guide will help you setup the Ingestion framework and connectors
|
||||
---
|
||||
|
||||

|
||||
|
||||
OpenMetadata Ingesiton is a simple framework to build connectors and ingest metadata of various systems through OpenMetadata APIs. It could be used in an orchestration framework(e.g. Apache Airflow) to ingest metadata.
|
||||
**Prerequisites**
|
||||
|
||||
- Python >= 3.8.x
|
||||
|
||||
### Docs
|
||||
|
||||
Please refer to the documentation here https://docs.open-metadata.org/connectors
|
3
ingestion-generated/requirements-dev.txt
Normal file
3
ingestion-generated/requirements-dev.txt
Normal file
@ -0,0 +1,3 @@
|
||||
datamodel-code-generator==0.11.14
|
||||
twine
|
||||
wheel
|
39
ingestion-generated/setup.py
Normal file
39
ingestion-generated/setup.py
Normal file
@ -0,0 +1,39 @@
|
||||
# Copyright 2021 Collate
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
import os
|
||||
|
||||
from setuptools import setup, find_namespace_packages
|
||||
|
||||
|
||||
def get_long_description():
|
||||
root = os.path.dirname(__file__)
|
||||
with open(os.path.join(root, "README.md")) as f:
|
||||
description = f.read()
|
||||
return description
|
||||
|
||||
|
||||
setup(name="openmetadata-ingestion-generated",
|
||||
version="0.5.0",
|
||||
url="https://open-metadata.org/",
|
||||
author="OpenMetadata Committers",
|
||||
license="Apache License 2.0",
|
||||
description="These are the generated Python classes from JSON Schema",
|
||||
long_description=get_long_description(),
|
||||
long_description_content_type="text/markdown",
|
||||
python_requires=">=3.8",
|
||||
package_dir={"": "src"},
|
||||
zip_safe=False,
|
||||
project_urls={
|
||||
"Documentation": "https://docs.open-metadata.org/",
|
||||
"Source": "https://github.com/open-metadata/OpenMetadata",
|
||||
},
|
||||
packages=find_namespace_packages(where="./src", exclude=["tests*"]),
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user