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

Tethys 4 dev version is broken #829

Closed
rileyhales opened this issue Jun 29, 2022 · 9 comments
Closed

Tethys 4 dev version is broken #829

rileyhales opened this issue Jun 29, 2022 · 9 comments
Labels
Milestone

Comments

@rileyhales
Copy link
Contributor

The development version of tethys 4 is currently unusable. I tried to install tethys 4 to test geoglows/geoglows-hydroviewer#17 with the suggested sequence of commands

conda create -n tethys4
conda activate tethys4
conda install mamba
mamba install -c tethysplatform/label/dev tethys-platform
tethys db configure
tethys gen portal_config
tethys manage start

When you open http://localhost:8000 you get

TemplateSyntaxError at /
'staticfiles' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_urls
analytical
...

In template /Users/rchales/miniconda3/envs/tethys4/lib/python3.10/site-packages/session_security/templates/session_security/all.html, error at line 11

{% comment %}
This demonstrates how to setup session security client side stuff on your own.
It provides sensible defaults so you could start with just::
 
{% include 'session_security/all.html' %}
 
{% endcomment %}
 
{% load session_security_tags %}
{% load i18n l10n %}
{% load static from staticfiles %}            <<<<<<<<<<< This is where the error originates
 
{# If the user is not authenticated then there is no session to secure ! #}
{% if request.user.is_authenticated %}
 
{# The modal dialog stylesheet, it's pretty light so it should be easy to hack #}
<link rel="stylesheet" type="text/css" href="{% static 'session_security/style.css' %}">
 
{# Include the template that actually contains the modal dialog #}
{% include 'session_security/dialog.html' %}

...

The development version is also incorrectly numbered 3.4.1.dev and should be 4.0.0.dev

@swainn
Copy link
Member

swainn commented Jun 29, 2022

The development version of tethys 4 is currently unusable. I tried to install tethys 4 to test BYU-Hydroinformatics/geoglows-hydroviewer#17 with the suggested sequence of commands

conda create -n tethys4
conda activate tethys4
conda install mamba
mamba install -c tethysplatform/label/dev tethys-platform
tethys db configure
tethys gen portal_config
tethys manage start

Please try including the conda-forge channel as well. Most of our dependencies are on conda-forge:

conda create -n tethys4
conda activate tethys4
conda install mamba
mamba install -c conda-forge -c tethysplatform/label/dev tethys-platform
tethys db configure
tethys gen portal_config
tethys manage start

@swainn
Copy link
Member

swainn commented Jun 29, 2022

When you open http://localhost:8000 you get

TemplateSyntaxError at /
'staticfiles' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_urls
analytical
...

This is a duplicate of issue #793

@swainn
Copy link
Member

swainn commented Jun 29, 2022

The development version is also incorrectly numbered 3.4.1.dev and should be 4.0.0.dev

This is suboptimal, but expected behavior for now. The number after dev indicates the number of commits since the version before dev. This is a shortcoming of the versioning library that we switched to recently.

@swainn swainn added this to the Version 4.0 milestone Jun 29, 2022
@swainn swainn added the bug label Jun 29, 2022
@swainn
Copy link
Member

swainn commented Jun 30, 2022

@rileyhales I've removed unneeded packages from tethysplatform/label/dev, so the order of the conda-forge and tethysplatform/label/dev channels in the conda create command shouldn't matter now (though both channels are still required). I also removed some of the old tethys-platform packages from the dev channel to help with dependency resolution.

TL;DR: Installing the Tethys 4 dev package should work with:

conda create -n tethys4 -c tethysplatform/label/dev -c conda-forge tethys-platform

These changes should also fix the TemplateSyntaxError at / 'staticfiles' is not a registered tag library. error.

Please confirm.

@rileyhales
Copy link
Contributor Author

Yes this fixed the issue. Thanks.

@rileyhales rileyhales reopened this Jul 7, 2022
@rileyhales
Copy link
Contributor Author

I think you might have accidentally deleted too many packages. I just tried to help someone install a fresh tethys 3 environment with

mamba install -c conda-forge -c tethysplatform tethys-platform

which results in

Pinned packages:
  - python 3.10.*


Encountered problems while solving:
  - nothing provides condorpy 0.5.* needed by tethys-platform-3.0.5-py_0

was that a package on the tethysplatform channel?

@swainn
Copy link
Member

swainn commented Jul 7, 2022

Are you trying to install Tethys in an existing environment? I'd recommend creating a dedicated "tethys" environment as suggested in the getting started docs (http://docs.tethysplatform.org/en/stable/installation.html):

conda create -n tethys -c tethysplatform -c conda-forge tethys-platform

Or with mamba:

mamba create -n tethys -c tethysplatform -c conda-forge tethys-platform

I'm also curious why it's trying to install tethys-platform 3.0.5 instead of 3.4.3 that is the latest version.

@swainn
Copy link
Member

swainn commented Jul 19, 2022

@rileyhales I've built a new version of Tethys 3 (3.4.4) that addresses the condorpy pin issue. Please try installing Tethys 3 again and let me know if this addresses your issue.

@swainn
Copy link
Member

swainn commented Jul 26, 2022

The issue with condorpy was resolved with 3.4.4. There is another issue with the Tethys 3 install that is being caused by conda not resolving the correct package. There is a workaround for this issue documented here: #838

@swainn swainn closed this as completed Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants