Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build plugin on Pull Request
on:
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Free Disk Space (Ubuntu only)
uses: jlumbroso/free-disk-space@main

- name: Set up MPI
uses: mpi4py/setup-mpi@master

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y wget gcc-10 g++-10 make

- name: Install Miniconda
uses: conda-incubator/setup-miniconda@main
with:
miniconda-version: "latest"
auto-update-conda: true
auto-activate-base: true
activate-environment: scipion3
python-version: "3.8"

- name: Install Scipion
working-directory: ${{ github.workspace }}/../
run: |
pip cache purge
pip install --user scipion-installer
python3 -m scipioninstaller -conda -noXmipp -noAsk scipion

# Installing scipion-chem
# Checkout to Pull Request branch if exists, by default stays in devel
- name: Install scipion-chem (in branch ${{ github.head_ref }} if exists)
working-directory: ${{ github.workspace }}/../
env:
REPO_NAME: scipion-chem
BRANCH_NAME: ${{ github.head_ref }}
run: |
git clone https://github.com/scipion-chem/$REPO_NAME.git
if [ $(git ls-remote --heads https://github.com/scipion-chem/$REPO_NAME.git $BRANCH_NAME | wc -l) -eq 1 ]; then
cd $REPO_NAME && git checkout $BRANCH_NAME && cd -
fi
scipion/scipion3 installp -p $REPO_NAME --devel

- name: Checkout repository
uses: actions/checkout@main
with:
ref: ${{ github.head_ref }}

- name: Install plugin from pull request
working-directory: ${{ github.workspace }}
run: |
pip cache purge
../scipion/scipion3 installp -p . --devel
53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Generate release (Pypi, tag, & GitHub Release)
on: workflow_dispatch

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@main

- name: Set up MPI
uses: mpi4py/setup-mpi@master

- name: Set up Python
uses: actions/setup-python@main
with:
python-version: '3.10'

- name: Install dependencies
run: |
pip install setuptools wheel twine
pip install -r requirements.txt

- name: Get tag name
id: variables
env:
FOLDER_WITH_VERSION: ${{ vars.FOLDER_WITH_VERSION }}
run: |
VERSION=$(python -c "import $FOLDER_WITH_VERSION; print('VERSION', 'v'+$FOLDER_WITH_VERSION.__version__)" | grep VERSION | sed "s/VERSION //g") || (echo "Could not import version, check that variables are correctly set!" && exit 1)
echo "TAG_NAME=${VERSION#v}" >> $GITHUB_OUTPUT
echo "TAG NAME (must not contain version prefix): ${VERSION#v}"

- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist
twine upload dist/* -c "${{ secrets.PYPI_COMMENT }}"

- name: Generate tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.variables.outputs.TAG_NAME }}

- name: Create a GitHub release
uses: ncipollo/release-action@main
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.variables.outputs.TAG_NAME }}
3 changes: 0 additions & 3 deletions protox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,3 @@ def getPluginH(cls, path=""):
@classmethod
def getScriptsPath(cls):
return cls.getPluginH('scripts/')



2 changes: 0 additions & 2 deletions protox/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@
# Version constants
V1_0 = '1.0'
PLUGIN_VERSION = '0.1'

# Package dictionaries
15 changes: 0 additions & 15 deletions protox/protocols/protocol_protox.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import os
from urllib.request import urlopen


# Specific imports
from pyworkflow.protocol.params import PointerParam, EnumParam
from pwem.protocols import EMProtocol
Expand All @@ -15,7 +14,6 @@
import pandas as pd
from pwchem.constants import RDKIT_DIC


class ProtChemProtox(EMProtocol):

"""Toxicity prediction of small ligands with Protox"""
Expand Down Expand Up @@ -157,16 +155,3 @@ def getMainNameFromCID(self,cid):
main_name = None

return main_name













2 changes: 0 additions & 2 deletions protox/viewers/viewers_protox.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,3 @@ def save_html_file(self, html_content):
f.write(html_content)

webbrowser.open('file://' + os.path.realpath(html_path))


1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
scipion-pyworkflow
scipion-em
scipion-chem