diff --git a/bayer/views.py b/bayer/views.py index 7a88d109..b3eb3b64 100644 --- a/bayer/views.py +++ b/bayer/views.py @@ -118,6 +118,9 @@ def fetch_pes(request, pes_url) -> dict: from epauth.views import get_access_token_from_request token = get_access_token_from_request(request) + if token is None: + token = pes_url.split('/')[-1] == 'dummy' + if token: for k, v in s.PES_API_MAPPING.items(): if pes_url.startswith(k): diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index ae477081..ba605cb7 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -28,17 +28,6 @@ services: image: git.envipath.com/envipath/biotransformer3:1.0 container_name: epbiotransformer3 -# web: -# image: envipath/envipy-bayer:1.0 -# container_name: epdjango -# ports: -# - "127.0.0.1:8000:8000" -# env_file: -# - .env -# command: gunicorn envipath.wsgi:application --bind 0.0.0.0:8000 --workers 3 -# volumes: -# - ep_bayer_data:/opt/enviPy/ - celery_worker: image: git.envipath.com/envipath/envipy-bayer:1.0 container_name: epcelery diff --git a/epdb/models.py b/epdb/models.py index f4ccbc07..305be1df 100644 --- a/epdb/models.py +++ b/epdb/models.py @@ -576,6 +576,10 @@ class ReactionIdentifierMixin(ExternalIdentifierMixin): def get_uniprot_identifiers(self): return self.get_external_identifier("UniProt") + def contains_pes(self): + from bayer.models import PESStructure + return any([isinstance(o, PESStructure) for o in self.educts.all()]) or any( + [isinstance(o, PESStructure) for o in self.products.all()]) ############## # EP Objects # diff --git a/templates/objects/edge.html b/templates/objects/edge.html index f9d93d04..956a468a 100644 --- a/templates/objects/edge.html +++ b/templates/objects/edge.html @@ -82,6 +82,9 @@
{{ edge.edge_label.as_svg|safe }}
+ {% if edge.edge_label.contains_pes %} + The reaction contains a partially elucidated structure!
For visualization the representative structure is used. The pathway itself will show the actual partially elucidated structure.
+ {% endif %} @@ -92,7 +95,7 @@
{% for educt in edge.start_nodes.all %} {{ educt.name }}{{ educt.get_name }} {% endfor %} {% for product in edge.end_nodes.all %} {{ product.name }}{{ product.get_name }} {% endfor %}
diff --git a/templates/objects/reaction.html b/templates/objects/reaction.html index 7a92b461..1ed43b16 100644 --- a/templates/objects/reaction.html +++ b/templates/objects/reaction.html @@ -79,6 +79,9 @@
{{ reaction.as_svg|safe }}
+ {% if reaction.contains_pes %} + The reaction contains a partially elucidated structure!
For visualization the representative structure is used. The pathway itself will show the actual partially elucidated structure.
+ {% endif %} diff --git a/uv.lock b/uv.lock index 32b161e0..06bcf2a8 100644 --- a/uv.lock +++ b/uv.lock @@ -894,7 +894,7 @@ provides-extras = ["ms-login", "dev", "pepper-plugin"] [[package]] name = "envipy-additional-information" version = "0.4.2" -source = { git = "ssh://git@git.envipath.com/enviPath/enviPy-additional-information.git?branch=develop#f2f251e0214f016760348730c45e56183d961201" } +source = { git = "ssh://git@git.envipath.com/enviPath/enviPy-additional-information.git?branch=develop#ad825570480bbe2f1a35c04923fede756c450751" } dependencies = [ { name = "pydantic" }, ]