forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdk): move version info to dedicated file (datahub-project#12456)
- Loading branch information
Showing
45 changed files
with
277 additions
and
211 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
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.envrc | ||
src/datahub_airflow_plugin/__init__.py.bak | ||
.vscode/ | ||
output | ||
pvenv36/ | ||
|
25 changes: 15 additions & 10 deletions
25
metadata-ingestion-modules/airflow-plugin/scripts/release.sh
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 |
---|---|---|
@@ -1,26 +1,31 @@ | ||
#!/bin/bash | ||
# Auto-generated by python-build/generate_release_scripts.py. Do not edit manually. | ||
|
||
set -euxo pipefail | ||
|
||
ROOT=../.. | ||
MODULE=datahub_airflow_plugin | ||
|
||
if [[ ! ${RELEASE_SKIP_TEST:-} ]] && [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then | ||
../../gradlew build # also runs tests | ||
${ROOT}/gradlew build # also runs tests | ||
elif [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then | ||
../../gradlew install | ||
${ROOT}/gradlew install | ||
fi | ||
|
||
MODULE=datahub_airflow_plugin | ||
|
||
# Check packaging constraint. | ||
python -c 'import setuptools; where="./src"; assert setuptools.find_packages(where) == setuptools.find_namespace_packages(where), "you seem to be missing or have extra __init__.py files"' | ||
if [[ ${RELEASE_VERSION:-} ]]; then | ||
# Replace version with RELEASE_VERSION env variable | ||
sed -i.bak "s/__version__ = \"1\!0.0.0.dev0\"/__version__ = \"$(echo $RELEASE_VERSION|sed s/-/+/)\"/" src/${MODULE}/__init__.py | ||
else | ||
vim src/${MODULE}/__init__.py | ||
|
||
# Update the release version. | ||
if [[ ! ${RELEASE_VERSION:-} ]]; then | ||
echo "RELEASE_VERSION is not set" | ||
exit 1 | ||
fi | ||
sed -i.bak "s/__version__ = .*$/__version__ = \"$(echo $RELEASE_VERSION|sed s/-/+/)\"/" src/${MODULE}/_version.py | ||
|
||
# Build and upload the release. | ||
rm -rf build dist || true | ||
python -m build | ||
if [[ ! ${RELEASE_SKIP_UPLOAD:-} ]]; then | ||
python -m twine upload 'dist/*' | ||
fi | ||
mv src/${MODULE}/__init__.py.bak src/${MODULE}/__init__.py | ||
mv src/${MODULE}/_version.py.bak src/${MODULE}/_version.py |
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
19 changes: 4 additions & 15 deletions
19
metadata-ingestion-modules/airflow-plugin/src/datahub_airflow_plugin/__init__.py
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
3 changes: 3 additions & 0 deletions
3
metadata-ingestion-modules/airflow-plugin/src/datahub_airflow_plugin/_version.py
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Published at https://pypi.org/project/acryl-datahub-airflow-plugin/. | ||
__package_name__ = "acryl-datahub-airflow-plugin" | ||
__version__ = "1!0.0.0.dev0" |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.envrc | ||
src/datahub_dagster_plugin/__init__.py.bak | ||
.vscode/ | ||
output | ||
pvenv36/ | ||
|
25 changes: 15 additions & 10 deletions
25
metadata-ingestion-modules/dagster-plugin/scripts/release.sh
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 |
---|---|---|
@@ -1,26 +1,31 @@ | ||
#!/bin/bash | ||
# Auto-generated by python-build/generate_release_scripts.py. Do not edit manually. | ||
|
||
set -euxo pipefail | ||
|
||
ROOT=../.. | ||
MODULE=datahub_dagster_plugin | ||
|
||
if [[ ! ${RELEASE_SKIP_TEST:-} ]] && [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then | ||
../../gradlew build # also runs tests | ||
${ROOT}/gradlew build # also runs tests | ||
elif [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then | ||
../../gradlew install | ||
${ROOT}/gradlew install | ||
fi | ||
|
||
MODULE=datahub_dagster_plugin | ||
|
||
# Check packaging constraint. | ||
python -c 'import setuptools; where="./src"; assert setuptools.find_packages(where) == setuptools.find_namespace_packages(where), "you seem to be missing or have extra __init__.py files"' | ||
if [[ ${RELEASE_VERSION:-} ]]; then | ||
# Replace version with RELEASE_VERSION env variable | ||
sed -i.bak "s/__version__ = \"1\!0.0.0.dev0\"/__version__ = \"$(echo $RELEASE_VERSION|sed s/-/+/)\"/" src/${MODULE}/__init__.py | ||
else | ||
vim src/${MODULE}/__init__.py | ||
|
||
# Update the release version. | ||
if [[ ! ${RELEASE_VERSION:-} ]]; then | ||
echo "RELEASE_VERSION is not set" | ||
exit 1 | ||
fi | ||
sed -i.bak "s/__version__ = .*$/__version__ = \"$(echo $RELEASE_VERSION|sed s/-/+/)\"/" src/${MODULE}/_version.py | ||
|
||
# Build and upload the release. | ||
rm -rf build dist || true | ||
python -m build | ||
if [[ ! ${RELEASE_SKIP_UPLOAD:-} ]]; then | ||
python -m twine upload 'dist/*' | ||
fi | ||
mv src/${MODULE}/__init__.py.bak src/${MODULE}/__init__.py | ||
mv src/${MODULE}/_version.py.bak src/${MODULE}/_version.py |
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
22 changes: 1 addition & 21 deletions
22
metadata-ingestion-modules/dagster-plugin/src/datahub_dagster_plugin/__init__.py
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 |
---|---|---|
@@ -1,21 +1 @@ | ||
# Published at https://pypi.org/project/acryl-datahub/. | ||
__package_name__ = "acryl-datahub-dagster-plugin" | ||
__version__ = "1!0.0.0.dev0" | ||
|
||
|
||
def is_dev_mode() -> bool: | ||
return __version__.endswith("dev0") | ||
|
||
|
||
def nice_version_name() -> str: | ||
if is_dev_mode(): | ||
return "unavailable (installed in develop mode)" | ||
return __version__ | ||
|
||
|
||
def get_provider_info(): | ||
return { | ||
"package-name": f"{__package_name__}", | ||
"name": f"{__package_name__}", | ||
"description": "Datahub metadata collector plugin", | ||
} | ||
from datahub_dagster_plugin._version import __package_name__, __version__ |
3 changes: 3 additions & 0 deletions
3
metadata-ingestion-modules/dagster-plugin/src/datahub_dagster_plugin/_version.py
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Published at https://pypi.org/project/acryl-datahub-dagster-plugin/. | ||
__package_name__ = "acryl-datahub-dagster-plugin" | ||
__version__ = "1!0.0.0.dev0" |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.envrc | ||
src/datahub_gx_plugin/__init__.py.bak | ||
.vscode/ | ||
output | ||
pvenv36/ | ||
|
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 |
---|---|---|
@@ -1,26 +1,31 @@ | ||
#!/bin/bash | ||
# Auto-generated by python-build/generate_release_scripts.py. Do not edit manually. | ||
|
||
set -euxo pipefail | ||
|
||
ROOT=../.. | ||
MODULE=datahub_gx_plugin | ||
|
||
if [[ ! ${RELEASE_SKIP_TEST:-} ]] && [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then | ||
../../gradlew build # also runs tests | ||
${ROOT}/gradlew build # also runs tests | ||
elif [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then | ||
../../gradlew install | ||
${ROOT}/gradlew install | ||
fi | ||
|
||
MODULE=datahub_gx_plugin | ||
|
||
# Check packaging constraint. | ||
python -c 'import setuptools; where="./src"; assert setuptools.find_packages(where) == setuptools.find_namespace_packages(where), "you seem to be missing or have extra __init__.py files"' | ||
if [[ ${RELEASE_VERSION:-} ]]; then | ||
# Replace version with RELEASE_VERSION env variable | ||
sed -i.bak "s/__version__ = \"1\!0.0.0.dev0\"/__version__ = \"$(echo $RELEASE_VERSION|sed s/-/+/)\"/" src/${MODULE}/__init__.py | ||
else | ||
vim src/${MODULE}/__init__.py | ||
|
||
# Update the release version. | ||
if [[ ! ${RELEASE_VERSION:-} ]]; then | ||
echo "RELEASE_VERSION is not set" | ||
exit 1 | ||
fi | ||
sed -i.bak "s/__version__ = .*$/__version__ = \"$(echo $RELEASE_VERSION|sed s/-/+/)\"/" src/${MODULE}/_version.py | ||
|
||
# Build and upload the release. | ||
rm -rf build dist || true | ||
python -m build | ||
if [[ ! ${RELEASE_SKIP_UPLOAD:-} ]]; then | ||
python -m twine upload 'dist/*' | ||
fi | ||
mv src/${MODULE}/__init__.py.bak src/${MODULE}/__init__.py | ||
mv src/${MODULE}/_version.py.bak src/${MODULE}/_version.py |
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
22 changes: 1 addition & 21 deletions
22
metadata-ingestion-modules/gx-plugin/src/datahub_gx_plugin/__init__.py
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 |
---|---|---|
@@ -1,21 +1 @@ | ||
# Published at https://pypi.org/project/acryl-datahub/. | ||
__package_name__ = "acryl-datahub-gx-plugin" | ||
__version__ = "1!0.0.0.dev0" | ||
|
||
|
||
def is_dev_mode() -> bool: | ||
return __version__.endswith("dev0") | ||
|
||
|
||
def nice_version_name() -> str: | ||
if is_dev_mode(): | ||
return "unavailable (installed in develop mode)" | ||
return __version__ | ||
|
||
|
||
def get_provider_info(): | ||
return { | ||
"package-name": f"{__package_name__}", | ||
"name": f"{__package_name__}", | ||
"description": "Datahub metadata collector plugin", | ||
} | ||
from datahub_gx_plugin._version import __package_name__, __version__ |
3 changes: 3 additions & 0 deletions
3
metadata-ingestion-modules/gx-plugin/src/datahub_gx_plugin/_version.py
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Published at https://pypi.org/project/acryl-datahub-gx-plugin/. | ||
__package_name__ = "acryl-datahub-gx-plugin" | ||
__version__ = "1!0.0.0.dev0" |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.envrc | ||
src/prefect_datahub/__init__.py.bak | ||
.vscode/ | ||
output | ||
pvenv36/ | ||
|
25 changes: 15 additions & 10 deletions
25
metadata-ingestion-modules/prefect-plugin/scripts/release.sh
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 |
---|---|---|
@@ -1,26 +1,31 @@ | ||
#!/bin/bash | ||
# Auto-generated by python-build/generate_release_scripts.py. Do not edit manually. | ||
|
||
set -euxo pipefail | ||
|
||
ROOT=../.. | ||
MODULE=prefect_datahub | ||
|
||
if [[ ! ${RELEASE_SKIP_TEST:-} ]] && [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then | ||
../../gradlew build # also runs tests | ||
${ROOT}/gradlew build # also runs tests | ||
elif [[ ! ${RELEASE_SKIP_INSTALL:-} ]]; then | ||
../../gradlew install | ||
${ROOT}/gradlew install | ||
fi | ||
|
||
MODULE=prefect_datahub | ||
|
||
# Check packaging constraint. | ||
python -c 'import setuptools; where="./src"; assert setuptools.find_packages(where) == setuptools.find_namespace_packages(where), "you seem to be missing or have extra __init__.py files"' | ||
if [[ ${RELEASE_VERSION:-} ]]; then | ||
# Replace version with RELEASE_VERSION env variable | ||
sed -i.bak "s/__version__ = \"1\!0.0.0.dev0\"/__version__ = \"$(echo $RELEASE_VERSION|sed s/-/+/)\"/" src/${MODULE}/__init__.py | ||
else | ||
vim src/${MODULE}/__init__.py | ||
|
||
# Update the release version. | ||
if [[ ! ${RELEASE_VERSION:-} ]]; then | ||
echo "RELEASE_VERSION is not set" | ||
exit 1 | ||
fi | ||
sed -i.bak "s/__version__ = .*$/__version__ = \"$(echo $RELEASE_VERSION|sed s/-/+/)\"/" src/${MODULE}/_version.py | ||
|
||
# Build and upload the release. | ||
rm -rf build dist || true | ||
python -m build | ||
if [[ ! ${RELEASE_SKIP_UPLOAD:-} ]]; then | ||
python -m twine upload 'dist/*' | ||
fi | ||
mv src/${MODULE}/__init__.py.bak src/${MODULE}/__init__.py | ||
mv src/${MODULE}/_version.py.bak src/${MODULE}/_version.py |
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
Oops, something went wrong.