Fix #12734 - Do not publish .egg to pypi (#12799)

* Fix #12734 - Do not publish .egg to pypi

* Remove python 3.7 tests support
This commit is contained in:
Pere Miquel Brull 2023-08-10 07:30:22 +02:00 committed by GitHub
parent a60af7c019
commit 5da63c5aed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 27 deletions

View File

@ -17,13 +17,7 @@
name: Publish openmetadata-ingestion-core packages
on:
push:
branches:
- main
- '0.[0-9]+.[0-9]+'
paths:
- 'openmetadata-service/src/main/resources/json/schema/**'
- 'ingestion-core/src/metadata/_version.py'
workflow_dispatch:
concurrency:
group: py-ingestion-core-publish-${{ github.head_ref || github.run_id }}
@ -45,5 +39,11 @@ jobs:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME_TEST }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD_TEST }}
run: |
python3 -m venv env
source env/bin/activate
sudo make install_antlr_cli
make core_publish
make install_dev generate install
cd ingestion-core; \
python setup.py build sdist bdist_wheel; \
twine check dist/*; \
twine upload dist/* --verbose

View File

@ -37,6 +37,6 @@ jobs:
sudo make install_antlr_cli
make install_dev generate install
cd ingestion; \
python setup.py install sdist bdist_wheel; \
python setup.py build sdist bdist_wheel; \
twine check dist/*; \
twine upload dist/* --verbose

View File

@ -104,15 +104,6 @@ coverage_apis: ## Run the python tests on openmetadata-airflow-apis
coverage xml --rcfile openmetadata-airflow-apis/.coveragerc -o openmetadata-airflow-apis/coverage.xml
sed -e "s/$(shell python -c "import site; import os; from pathlib import Path; print(os.path.relpath(site.getsitepackages()[0], str(Path.cwd())).replace('/','\/'))")\///g" openmetadata-airflow-apis/coverage.xml >> openmetadata-airflow-apis/ci-coverage.xml
## Ingestion publish
.PHONY: publish
publish: ## Publish the ingestion module to PyPI
$(MAKE) install_dev generate
cd ingestion; \
python setup.py install sdist bdist_wheel; \
twine check dist/*; \
twine upload dist/*
## Yarn
.PHONY: yarn_install_cache
yarn_install_cache: ## Use Yarn to install UI dependencies
@ -152,15 +143,6 @@ core_bump_version_dev: ## Bump a `dev` version to the ingestion-core module. To
. venv/bin/activate; \
python -m incremental.update metadata --dev
.PHONY: core_publish
core_publish: ## Install, generate and publish the ingestion-core module to Test PyPI
$(MAKE) core_clean core_generate
cd ingestion-core; \
. venv/bin/activate; \
python setup.py install sdist bdist_wheel; \
twine check dist/*; \
twine upload -r testpypi dist/*
.PHONY: core_py_antlr
core_py_antlr: ## Generate the Python core code for parsing FQNs under ingestion-core
antlr4 -Dlanguage=Python3 -o ingestion-core/src/metadata/generated/antlr ${PWD}/openmetadata-spec/src/main/antlr4/org/openmetadata/schema/*.g4