From 6e9ec6f494d868c442784b463dc7bc84c9091a82 Mon Sep 17 00:00:00 2001 From: liav-certora <114004726+liav-certora@users.noreply.github.com> Date: Mon, 6 Jan 2025 12:16:07 +0200 Subject: [PATCH] Liav/cert 7927 uploading pypi (#65) * . * . * . * add templates to build --- .github/workflows/publish-pypi.yml | 26 +++++++++++++++++++++ .gitignore | 2 ++ MANIFEST.in | 5 ++++ pyproject.toml | 37 ++++++++++++++++++++++++++++++ setup.py | 28 ---------------------- version | 2 +- 6 files changed, 71 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/publish-pypi.yml create mode 100644 MANIFEST.in create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml new file mode 100644 index 0000000..f84bdc4 --- /dev/null +++ b/.github/workflows/publish-pypi.yml @@ -0,0 +1,26 @@ +name: publish-pypi + +on: + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + env: + TWINE_USERNAME: ${{ secrets.PYPI_USER }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install requirements for publishing + run: pip3 install build twine + + - name: Build distros + run: python3 -m build + + - name: Upload to PyPi + run: python3 -m twine upload dist/* --verbose diff --git a/.gitignore b/.gitignore index eff8387..c2f4a25 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,10 @@ **/.vscode **/local* build/ +dist/ *.egg-info CustomerClones/ **cache** **.DS_Store !**cached_llm.py +quorum_project/ \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..1bfe9b7 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,5 @@ +include LICENSE +include version +include requirements.txt +include Quorum/templates/* +recursive-include Quorum *.j2 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e1530a3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,37 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "Quorum" +description = "Quorum: A tool for managing proposals and reports" +authors = [ + {name = "Niv Vaknin", email = "niv@certora.com"}, + {name = "Liav Katry", email = "liav@certora.com"} +] +readme = "README.md" +license = {file = "LICENSE"} +keywords = ["Quorum", "Proposals", "Reports"] +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] +dynamic = ["version", "dependencies"] + +[tool.setuptools.dynamic] +dependencies = {file = ["requirements.txt"]} +version = {file = ["version"]} + +[project.urls] +Homepage = "https://github.com/Certora/Quorum" +Source = "https://github.com/Certora/Quorum" + +[project.scripts] +CheckProposal = "Quorum.entry_points.check_proposal:main" +IPFSValidator = "Quorum.entry_points.ipfs_validator:main" +CreateReport = "Quorum.entry_points.create_report:main" +SetupQuorum = "Quorum.entry_points.setup_quorum:main" + +[tool.setuptools] +include-package-data = true diff --git a/setup.py b/setup.py deleted file mode 100644 index d0732b5..0000000 --- a/setup.py +++ /dev/null @@ -1,28 +0,0 @@ -from setuptools import setup, find_packages - -def read_requirements(): - with open('requirements.txt') as f: - return f.read().splitlines() - -def read_version() -> str: - with open('version') as f: - return f.read() - -setup( - name="Quorum", - version=read_version(), - packages=find_packages(), - install_requires=read_requirements(), - include_package_data=True, - package_data={ - '': ['.env.example', 'ground_truth.json', 'execution.json', 'README.md', "*j2"], - }, - entry_points={ - "console_scripts": [ - "CheckProposal=Quorum.entry_points.check_proposal:main", - "IPFSValidator=Quorum.entry_points.ipfs_validator:main", - "CreateReport=Quorum.entry_points.create_report:main", - "SetupQuorum=Quorum.entry_points.setup_quorum:main", - ], - }, -) diff --git a/version b/version index d8f13c1..68e5e28 100644 --- a/version +++ b/version @@ -1 +1 @@ -20250105.192006.194722 +20250106.115650.963355