Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Py2 #2

Merged
merged 11 commits into from
Aug 27, 2019
Merged

Py2 #2

merged 11 commits into from
Aug 27, 2019

Conversation

joshmoore
Copy link
Member

Following the style of ome/omero-py#1, this PR looks to make this extracted ome/openmicroscopy:components/tools/OmeroWeb directory pip-installable with Python 2.7 before work starts on upgrading to Python 3. From there, the main directory will be removed from ome/openmicroscopy and all development should occur on this repo.

An extra difficulty is the https://github.com/ome/omero-py/blob/master/src/omero/plugins/web.py script which has hard-coded assumptions about where manage.py lives.

Once OMERO.web is starting, propose to tag and release this to PyPI as 5.5.dev1.

(Replaces gh-1 due to force-push)

@joshmoore
Copy link
Member Author

joshmoore commented Aug 15, 2019

Currently testing via:

[jamoore@idr1-slot2 omero-web-docker]$ git diff
diff --git a/Dockerfile b/Dockerfile
index 410ee0b..5a23f58 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -31,3 +31,11 @@ EXPOSE 4080
 VOLUME ["/opt/omero/web/OMERO.web/var"]

 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
+
+USER root
+RUN rm -vrf /opt/omero/web/OMERO.web/lib/python/omeroweb
+RUN /opt/omero/web/venv/bin/pip install https://github.com/joshmoore/omero-py/archive/web.py.zip
+RUN /opt/omero/web/venv/bin/pip install https://github.com/joshmoore/omero-web/archive/py2.zip
+ENV OMERODIR /opt/omero/web/OMERO.web
+ENV OMERO_HOME /opt/omero/web/OMERO.web
+USER omero-web

Edit: Please see https://github.com/ome/omero-web-docker/pull/33/files#diff-3254677a7917c6c01f55212f86c57fbf now.

@joshmoore
Copy link
Member Author

Re-opening to activate travis.

@joshmoore joshmoore closed this Aug 23, 2019
@joshmoore joshmoore reopened this Aug 23, 2019
@joshmoore
Copy link
Member Author

And again...

@joshmoore joshmoore closed this Aug 23, 2019
@joshmoore joshmoore reopened this Aug 23, 2019
@joshmoore
Copy link
Member Author

Propose to get this merged and released as 5.5.dev1, before bumping both omero-web and omero-py to 5.5.1.

@will-moore
Copy link
Member

Tested locally with:

rm -rf dist/lib/python
pip install https://github.com/snoopycrimecop/omero-py/archive/merge_ci.zip
pip install https://github.com/joshmoore/omero-web/archive/py2.zip
echo $OMERODIR 
/Users/willadmin/Desktop/OMERO/openmicroscopy/dist
$OMERO_HOME

cd dist
bin/omero web start

Web running fine, without needing to set $OMERO_HOME and with omero-marshal already installed.

@joshmoore
Copy link
Member Author

Thanks, @will-moore. Getting this out as dev1 then to verify the pypi-part of the workflow.

@joshmoore joshmoore merged commit 36d03d5 into ome:master Aug 27, 2019
manics added a commit to manics-archive/omero-web that referenced this pull request Nov 11, 2019
$ curl -sSL https://patch-diff.githubusercontent.com/raw/ome/openmicroscopy/pull/5994.diff | sed -e 's%/components/tools/OmeroPy/%/%g' -e 's%/components/tools/OmeroWeb/%/%g' -e 's%etc/templates/web/%omeroweb/templates/%g' -e 's%/test/unit/clitest/%/test/unit/%g' -e 's%/src/%/%g' | git apply --reject

Checking patch omero/plugins/web.py...
error: while searching for:

import traceback
from datetime import datetime
from omero.cli import DiagnosticsControl
from omero.cli import CLI
import platform

error: patch failed: omero/plugins/web.py:10
Hunk ome#2 succeeded at 276 (offset 1 line).
error: while searching for:
                         "Web template configuration requires"
                         "wsgi or wsgi-tcp.")

        template_file = "%s.conf.template" % server
        c = file(self._get_web_templates_dir() / template_file).read()
        self.ctx.out(c % d)

    def syncmedia(self, args):
        self.collectstatic()

error: patch failed: omero/plugins/web.py:301
Checking patch test/unit/reference_templates/nginx-development-withoptions.conf...
Checking patch test/unit/reference_templates/nginx-development.conf...
Checking patch test/unit/reference_templates/nginx-location-withoptions.conf...
Checking patch test/unit/reference_templates/nginx-location.conf...
Checking patch test/unit/reference_templates/nginx-withoptions.conf...
Checking patch test/unit/reference_templates/nginx.conf...
Checking patch omeroweb/templates/nginx-development.conf.template...
Checking patch omeroweb/templates/nginx-location.conf.template...
Checking patch omeroweb/templates/nginx.conf.j2...
Checking patch omeroweb/templates/nginx.conf.template...
Applying patch omero/plugins/web.py with 2 rejects...
Rejected hunk ome#1.
Hunk ome#2 applied cleanly.
Rejected hunk ome#3.
Applied patch test/unit/reference_templates/nginx-development-withoptions.conf cleanly.
Applied patch test/unit/reference_templates/nginx-development.conf cleanly.
Applied patch test/unit/reference_templates/nginx-location-withoptions.conf cleanly.
Applied patch test/unit/reference_templates/nginx-location.conf cleanly.
Applied patch test/unit/reference_templates/nginx-withoptions.conf cleanly.
Applied patch test/unit/reference_templates/nginx.conf cleanly.
Applied patch omeroweb/templates/nginx-development.conf.template cleanly.
Applied patch omeroweb/templates/nginx-location.conf.template cleanly.
Applied patch omeroweb/templates/nginx.conf.j2 cleanly.
Applied patch omeroweb/templates/nginx.conf.template cleanly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants