Skip to content

Commit

Permalink
refactoring shortcut.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ye11owSub committed Aug 17, 2024
1 parent 0a41392 commit 05e67e4
Show file tree
Hide file tree
Showing 6 changed files with 291 additions and 194 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
python3-setuptools
python3-numpy
python3-pil
python3-pytest
python3-pip
- name: Install collada2gltf
Expand All @@ -45,13 +44,14 @@ jobs:
- name: Build
run: |
pip install --upgrade pip
pip install -v --config-settings testing=True .
pip install -v --config-settings testing=True .[dev]
env:
DEBUG: 1

- name: Test
run: |
pymol -ckqy testing/testing.py --run all
python -m pytest tests -vv
build-Windows:

Expand All @@ -74,7 +74,7 @@ jobs:
shell: cmd
run: |-
CALL %CONDA_ROOT%\\Scripts\\activate.bat
conda install -y -c conda-forge -c schrodinger python cmake libpng freetype pyside6 glew libxml2 numpy=1.26.4 catch2=2.13.3 glm libnetcdf collada2gltf biopython pillow msgpack-python pytest pip python-build
conda install -y -c conda-forge -c schrodinger python cmake libpng freetype pyside6 glew libxml2 numpy=1.26.4 catch2=2.13.3 glm libnetcdf collada2gltf biopython pillow msgpack-python pip python-build
- name: Conda info
shell: cmd
Expand All @@ -94,13 +94,14 @@ jobs:
shell: cmd
run: |
CALL %CONDA_ROOT%\\Scripts\\activate.bat
pip install -v --config-settings testing=True .
pip install -v --config-settings testing=True .[dev]
- name: Test
shell: cmd
run: |
CALL %CONDA_ROOT%\\Scripts\\activate.bat
pymol -ckqy testing\\testing.py --run all
python -m pytest tests -vv
build-MacOS:

Expand All @@ -117,7 +118,7 @@ jobs:
bash $CONDA_ROOT.sh -b -p $CONDA_ROOT
export PATH="$CONDA_ROOT/bin:$PATH"
conda config --set quiet yes
conda install -y -c conda-forge -c schrodinger python cmake libpng freetype pyside6 glew libxml2 numpy=1.26.4 catch2=2.13.3 glm libnetcdf collada2gltf biopython pillow msgpack-python pytest pip python-build
conda install -y -c conda-forge -c schrodinger python cmake libpng freetype pyside6 glew libxml2 numpy=1.26.4 catch2=2.13.3 glm libnetcdf collada2gltf biopython pillow msgpack-python pip python-build
conda info
- name: Get additional sources
Expand All @@ -131,9 +132,10 @@ jobs:
run: |-
export MACOSX_DEPLOYMENT_TARGET=12.0
export PATH="$CONDA_ROOT/bin:$PATH"
pip install -v --config-settings testing=True .
pip install -v --config-settings testing=True .[dev]
- name: Test
run: |-
export PATH="$CONDA_ROOT/bin:$PATH"
pymol -ckqy testing/testing.py --run all
python -m pytest tests -vv
4 changes: 2 additions & 2 deletions modules/pymol/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#
# In rare cases, certain nonserious error or warning output should
# also be suppressed. Set "quiet" to 2 for this behavior.
from pymol.shortcut import Shortcut

def _deferred_init_pymol_internals(_pymol):
# set up some global session tasks
Expand All @@ -54,7 +55,7 @@ def _deferred_init_pymol_internals(_pymol):

# take care of some deferred initialization

_pymol._view_dict_sc = Shortcut({})
_pymol._view_dict_sc = Shortcut()

#
if True:
Expand All @@ -78,7 +79,6 @@ def _deferred_init_pymol_internals(_pymol):

_pymol = pymol

from .shortcut import Shortcut

from chempy import io

Expand Down
Loading

0 comments on commit 05e67e4

Please sign in to comment.