Skip to content

Commit

Permalink
Merge branch 'release_23.2' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Mar 4, 2024
2 parents 3f0f789 + de1bb85 commit 516ecfa
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/galaxy/datatypes/molecules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,9 @@ def sniff_prefix(self, file_prefix: FilePrefix) -> bool:
>>> fname = get_test_fname('1.star')
>>> CIF().sniff(fname)
False
>>> fname = get_test_fname('LaMnO3.cif')
>>> CIF().sniff(fname)
True
"""

# check for optional CIF version marker '#\#CIF_<version>' at start of file
Expand All @@ -1020,7 +1023,7 @@ def sniff_prefix(self, file_prefix: FilePrefix) -> bool:
# first non-comment line must begin with 'data_'
# and '_atom_site_fract_(x|y|z)' must be specified somewhere in the file
for line in file_prefix.line_iterator():
if not line:
if not line.rstrip():
continue
elif line[0] == "#": # comment so skip
continue
Expand Down
3 changes: 3 additions & 0 deletions lib/galaxy/datatypes/sniff.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,9 @@ def guess_ext(fname_or_file_prefix: Union[str, "FilePrefix"], sniff_order, is_bi
>>> fname = get_test_fname('Si.cif')
>>> guess_ext(fname, sniff_order)
'cif'
>>> fname = get_test_fname('LaMnO3.cif')
>>> guess_ext(fname, sniff_order)
'cif'
>>> fname = get_test_fname('Si.xyz')
>>> guess_ext(fname, sniff_order)
'xyz'
Expand Down
66 changes: 66 additions & 0 deletions lib/galaxy/datatypes/test/LaMnO3.cif
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#######################################################################
#
# This file contains crystal structure data downloaded from the
# Cambridge Structural Database (CSD) hosted by the Cambridge
# Crystallographic Data Centre (CCDC) in cooperation with FIZ Karlsruhe.
#
# Please note that these data are only for research purposes or private use.
# For detailed information please see under Terms & Conditions.
# Full information about CCDC and FIZ Karlsruhe data access policies and
# citation guidelines are available at http://www.ccdc.cam.ac.uk/access/V1
#
# Audit and citation data items may have been added by FIZ Karlsruhe.
# Please retain this information to preserve the provenance of
# this file and to allow appropriate attribution of the data.
#
#######################################################################

data_150259-ICSD
_database_code_depnum_ccdc_archive 'CCDC 1667441'
loop_
_citation_id
_citation_doi
_citation_year
1 10.1006/jssc.2001.9440 2002
_audit_update_record
;
2018-02-27 deposited with the CCDC. 2024-01-08 downloaded from the CCDC.
;
_database_code_ICSD 150259
_chemical_name_systematic 'Lanthanum Manganate'
_chemical_formula_sum 'La1 Mn1 O3'
_cell_length_a 5.486
_cell_length_b 7.761
_cell_length_c 5.487
_cell_angle_alpha 90
_cell_angle_beta 90
_cell_angle_gamma 90.01
_cell_volume 233.62
_cell_formula_units_Z 4
_symmetry_space_group_name_H-M 'I 1 1 2/b'
_symmetry_Int_Tables_number 15
_symmetry_cell_setting monoclinic
_refine_ls_R_factor_all 0.03
loop_
_symmetry_equiv_pos_site_id
_symmetry_equiv_pos_as_xyz
1 '-x, -y+1/2, z'
2 'x, y+1/2, -z'
3 '-x, -y, -z'
4 'x, y, z'
5 '-x+1/2, -y, z+1/2'
6 'x+1/2, y, -z+1/2'
7 '-x+1/2, -y+1/2, -z+1/2'
8 'x+1/2, y+1/2, z+1/2'
loop_
_atom_site_label
_atom_site_type_symbol
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
La1 La3+ 0 0.25 0.5052
Mn1 Mn3+ 0 0 0
O1 O2- 0 0.25 0.0015
O2 O2- 0.2682 0.0015 0.2427

#End of data_150259-ICSD
1 change: 1 addition & 0 deletions lib/galaxy/webapps/base/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ def _ensure_valid_session(self, session_cookie: str, create: bool = True) -> Non
galaxy_session = self.__create_new_session(prev_galaxy_session, user_for_new_session)
galaxy_session_requires_flush = True
self.galaxy_session = galaxy_session
self.get_or_create_default_history()
self.__update_session_cookie(name=session_cookie)
else:
self.galaxy_session = galaxy_session
Expand Down

0 comments on commit 516ecfa

Please sign in to comment.