Skip to content

Update to Python=3.9 and update Django #298

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

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Update to Python=3.9 and update Django #298

wants to merge 17 commits into from

Conversation

jonwzheng
Copy link
Contributor

This PR seeks to update RMG-website to be compatible with Python 3.9 so that it can leverage the newest version of RMG-Py and other packages.

To do this, a number of things need to be updated simultaneously (avoid dependency hell):

  • Either update solprop using the py3.9 compatible version, or turn it into an API service so that it can be queried separately. Updating solprop would for now be the most straightforward option. Although an API service would be the best solution technologically, it would take the most technical load to learn and implement sustainably. Another way is to call it via a subprocess in its own separate conda or docker environment, which would also require some rewriting of the backend. Key concern is whether it's fast enough. In the future, probably we want to move toward one of the two latter options, especially if we want to deploy more ML models on the site.
  • Update Django from 2.2 and then see what breaks; then fix those errors in the codebase.
  • See if any new package versions break existing code

There's also an opportunity to make the conda environment leaner (which should make solving for it more straightforward in general).

@jonwzheng
Copy link
Contributor Author

Roel has very kindly released a binary of solprop that is compatible with this environment, so we can proceed with using that for now.

@jonwzheng
Copy link
Contributor Author

jonwzheng commented Jul 3, 2025

To-fix:

  • SoluteML not working
  • 'ifequal', expected 'endblock' in html rendering of thermo+kinetic database entries.
  • get_solvation_data_temp_dep too many values to unpack (expected 2)
  • Solubility models: Need to refactor to work with SolubilityData. Also the trained logS model is not present, so the binary doesn't work.
  • Test tools
    • NOT NULL constraint failed: rmg_fluxdiagram.java for Generate Flux Diagram. Make migration.
    • Populate Reactions has some error with chemkin
      • somehow fixed after making migrations
  • Test P-dep network
  • Try graphviz again
  • Django3.2
    • Update django.db.models.AutoField wherever it appears. I think fixed in migration?
  • Environment
    • Pin to django=4.2

@jonwzheng
Copy link
Contributor Author

Unrelated note, but the entryEdit functionality seems kind of suspicious and maybe we shouldn't allow users to actually use those (I don't think anyone is, and they don't even work on the main site.) We may want to just remove it.

@jonwzheng
Copy link
Contributor Author

jonwzheng commented Jul 4, 2025

Some Solute (tdep, soluteML) functionalities may be present in SolProp and thereby maybe we don't need chemprop_solvation.

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.

Group additivity graphs fail to be drawn Flux diagram not working Update to Django 4.2
1 participant