[Misc] Performance improvements, SMIRKS Coverage, Minor Bugfixes (#132)

Bump Python Version to 3.12
Make use of "epauth" optional
Cache `srs` property of rules to speed up apply
Adjust view names for use of `reverse()`
Fix Views for Scenario Attachments
Added Simply Compare View/Template to identify differences between rdkit and ambit
Make migrations consistent with tests + compare
Fixes #76
Set default year for Scenario Modal
Fix html tags for package description
Added Tests for Pathway / Rule
Added remove stereo for apply

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#132
This commit is contained in:
2025-09-26 19:33:03 +12:00
parent b5c759d74e
commit b757a07f91
23 changed files with 671 additions and 463 deletions

View File

@ -870,7 +870,7 @@ def package(request, package_uuid):
object_to_copy = request.POST.get('object_to_copy')
if not object_to_copy:
return error(request, 'Invalid target package.', 'Please select a target package.')
return error(request, 'No object to copy', 'There was no object to copy.')
copied_object = copy_object(current_user, current_package, object_to_copy)
return JsonResponse({'success': copied_object.url})
@ -1019,7 +1019,7 @@ def package_compound(request, package_uuid, compound_uuid):
selected_scenarios = request.POST.getlist('selected-scenarios')
if selected_scenarios:
if selected_scenarios is not None:
set_scenarios(current_user, current_compound, selected_scenarios)
return redirect(current_compound.url)
@ -1128,7 +1128,7 @@ def package_compound_structure(request, package_uuid, compound_uuid, structure_u
selected_scenarios = request.POST.getlist('selected-scenarios')
if selected_scenarios:
if selected_scenarios is not None:
set_scenarios(current_user, current_structure, selected_scenarios)
return redirect(current_structure.url)
@ -1255,7 +1255,7 @@ def package_rule(request, package_uuid, rule_uuid):
selected_scenarios = request.POST.getlist('selected-scenarios')
if selected_scenarios:
if selected_scenarios is not None:
set_scenarios(current_user, current_rule, selected_scenarios)
return redirect(current_rule.url)
@ -1358,7 +1358,7 @@ def package_reaction(request, package_uuid, reaction_uuid):
selected_scenarios = request.POST.getlist('selected-scenarios')
if selected_scenarios:
if selected_scenarios is not None:
set_scenarios(current_user, current_reaction, selected_scenarios)
return redirect(current_reaction.url)
@ -1545,7 +1545,7 @@ def package_pathway(request, package_uuid, pathway_uuid):
selected_scenarios = request.POST.getlist('selected-scenarios')
if selected_scenarios:
if selected_scenarios is not None:
set_scenarios(current_user, current_pathway, selected_scenarios)
return redirect(current_pathway.url)
@ -1691,7 +1691,7 @@ def package_pathway_node(request, package_uuid, pathway_uuid, node_uuid):
selected_scenarios = request.POST.getlist('selected-scenarios')
if selected_scenarios:
if selected_scenarios is not None:
set_scenarios(current_user, current_node, selected_scenarios)
return redirect(current_node.url)
@ -1800,7 +1800,7 @@ def package_pathway_edge(request, package_uuid, pathway_uuid, edge_uuid):
selected_scenarios = request.POST.getlist('selected-scenarios')
if selected_scenarios:
if selected_scenarios is not None:
set_scenarios(current_user, current_edge, selected_scenarios)
return redirect(current_edge.url)