ome / omero-parade

OMERO.web plugin for displaying Dataset thumbnails or Plates in webclient center panel
GNU Affero General Public License v3.0
1 stars 12 forks source link

run NPM before build_py #71

Closed manics closed 4 years ago

manics commented 4 years ago

The npm ... steps weren't being run for all targets, which means it's possible to install this package without having first run npm to build the JS assets. This might or might not fix it...

Testing

Before every test you must reset everything to a clean state:

pip uninstall omero-parade
git clean -dxf

Test cases:

python setup.py sdist
pip install dist/<file>
python setup.py install
python setup.py bdist
pip install dist/<file>
python setup.py bdist_wheel
pip install dist/<file>
pip install .

I haven't tested this properly, but find indicates the js assets are installed:

$ find /venv/lib/python3.6/site-packages/omero_parade* -name \*js\*
/venv/lib/python3.6/site-packages/omero_parade/static/omero_parade/js
/venv/lib/python3.6/site-packages/omero_parade/static/omero_parade/js/bundle.js.map
/venv/lib/python3.6/site-packages/omero_parade/static/omero_parade/js/bundle.js
/venv/lib/python3.6/site-packages/omero_parade/templates/omero_parade/init.js.html
joshmoore commented 4 years ago
Test Script ``` set -e run(){ printf "%4d\t%d :\t" $SECONDS $1 exec 4<&1 exec 5<&1 exec 1>/tmp/$1.out exec 2>/tmp/$1.err pip uninstall -y omero-parade git clean -dxf rm -rf dist/ # Just in case $2 ls dist $3 exec 1<&4 exec 2<&5 find /opt/anaconda/envs/py36/lib/python3.6/site-packages/ -path "*omero_parade*js*" | wc } run 1 "python setup.py sdist" "pip install dist/*.gz" run 2 "mkdir -p dist" "python setup.py install" run 3 "python setup.py bdist_wheel" "pip install dist/*.whl" run 4 "mkdir -p dist" "pip install ." ## Disabled since fails locally ## run 5 "python setup.py bdist" "pip install dist/*.gz" ```

Without this PR

   0    1 :        4       4     393
  46    2 :        4       4     393
  84    3 :        1       1     102
 122    4 :        1       1     102

where the "1" is just:

(py36) /opt/omero-parade $find /opt/anaconda/envs/py36/lib/python3.6/site-packages/ -path "*omero_parade*js*"
/opt/anaconda/envs/py36/lib/python3.6/site-packages//omero_parade/templates/omero_parade/init.js.html

With this PR

   0    1 :        4       4     393
  32    2 :        4       4     393
  64    3 :        4       4     393
  98    4 :        4       4     393
joshmoore commented 4 years ago

Merging based on py3-ci status today. Hopefully @pwalczysko will enjoy merge releases!