From f73a6b9c2afa4f79c312741d9033defca13181e7 Mon Sep 17 00:00:00 2001 From: Charlie Harris Date: Wed, 21 Aug 2024 11:57:07 +0100 Subject: [PATCH 1/3] chore: Update package installation step in tests.yaml --- .github/workflows/tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 63535c1..2a4a79c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -38,8 +38,8 @@ jobs: #- name: Install PyTorch # run: mamba install -c pytorch pytorch==${{matrix.torch}} cpuonly - - name: Install Extras - run: pip install -r requirements.txt + - name: Install package + run: pip install . # - name: Install OpenBabel # run: mamba install -c conda-forge openbabel From cd1bc9afc190cdf242aac55bf622a60de625c358 Mon Sep 17 00:00:00 2001 From: Charlie Harris Date: Wed, 21 Aug 2024 12:12:49 +0100 Subject: [PATCH 2/3] chore: Update .gitignore to ignore build and dist directories --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8b58c66..66185b6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,7 @@ posecheck/utils/__pycache__* */*/__pycache__/ .vscode/* .DS_Store -*.pyc \ No newline at end of file +*.pyc + +build/* +dist/* \ No newline at end of file From 789f995f4509906fade412e840a864c3e7e5980d Mon Sep 17 00:00:00 2001 From: Charlie Harris Date: Wed, 21 Aug 2024 12:19:26 +0100 Subject: [PATCH 3/3] add publish script --- .github/workflows/python-publish.yaml | 45 +++++++++++++++++++++++++++ .gitignore | 3 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/python-publish.yaml diff --git a/.github/workflows/python-publish.yaml b/.github/workflows/python-publish.yaml new file mode 100644 index 0000000..c860ab6 --- /dev/null +++ b/.github/workflows/python-publish.yaml @@ -0,0 +1,45 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + + - name : Install black + run: pip install black + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.POSECHECK_API_TOKEN }} + + diff --git a/.gitignore b/.gitignore index 66185b6..6ca448b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ posecheck/utils/__pycache__* *.pyc build/* -dist/* \ No newline at end of file +dist/* +