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 f1494f1
Show file tree
Hide file tree
Showing 6 changed files with 307 additions and 195 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
python3-dev
python3-setuptools
python3-numpy
python3-pil
python3-pytest
python3-pip
- name: Install collada2gltf
Expand All @@ -45,13 +43,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 +73,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 msgpack-python pip python-build
- name: Conda info
shell: cmd
Expand All @@ -94,13 +93,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 +117,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 msgpack-python pip python-build
conda info
- name: Get additional sources
Expand All @@ -131,9 +131,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 f1494f1

Please sign in to comment.