From 5da63c5aed540e93b4e2e362af4325f0ff3a72bf Mon Sep 17 00:00:00 2001 From: Pere Miquel Brull Date: Thu, 10 Aug 2023 07:30:22 +0200 Subject: [PATCH] Fix #12734 - Do not publish .egg to pypi (#12799) * Fix #12734 - Do not publish .egg to pypi * Remove python 3.7 tests support --- .../workflows/py-ingestion-core-publish.yml | 16 ++++++++-------- .github/workflows/py-ingestion-publish.yml | 2 +- Makefile | 18 ------------------ 3 files changed, 9 insertions(+), 27 deletions(-) diff --git a/.github/workflows/py-ingestion-core-publish.yml b/.github/workflows/py-ingestion-core-publish.yml index afaf0740526..9f840e5161f 100644 --- a/.github/workflows/py-ingestion-core-publish.yml +++ b/.github/workflows/py-ingestion-core-publish.yml @@ -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 diff --git a/.github/workflows/py-ingestion-publish.yml b/.github/workflows/py-ingestion-publish.yml index ea9042275aa..dd456746088 100644 --- a/.github/workflows/py-ingestion-publish.yml +++ b/.github/workflows/py-ingestion-publish.yml @@ -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 diff --git a/Makefile b/Makefile index 694cb06cae5..0112b042e71 100644 --- a/Makefile +++ b/Makefile @@ -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