Commit Graph
186 Commits
Author SHA1 Message Date
mvdbeek 69a3cda018 Fix history import when parent_hda not serialized
and make sure we include the parent_hda when exporting histories.
Fixes
https://sentry.galaxyproject.org/share/issue/20ee27f675ef476588bbe8ff273eaee7/:
```
KeyError: '31e7840b5aedca43523bfcc8e2e9e56f'
  File "galaxy/jobs/__init__.py", line 2039, in finish
    task_wrapper = self.tool.exec_after_process(
  File "galaxy/tools/__init__.py", line 3100, in exec_after_process
    JobImportHistoryArchiveWrapper(self.app, job.id).cleanup_after_job()
  File "galaxy/tools/imp_exp/__init__.py", line 81, in cleanup_after_job
    model_store.perform_import(new_history, job=job, new_history=True)
  File "galaxy/model/store/__init__.py", line 416, in perform_import
    self._import_implicit_dataset_conversions(object_import_tracker)
  File "galaxy/model/store/__init__.py", line 1280, in _import_implicit_dataset_conversions
    idc.parent_hda = object_import_tracker.hdas_by_key[idc_attrs["parent_hda"]]
```
2024-09-23 11:07:20 +02:00
John Davis 7f83b903cb Add history pruner + test
Add __init__.py to test.unit.data.model.db
2024-05-02 14:12:35 -04:00
John Davis 1773dca37a Add model fixtures 2024-05-02 14:12:35 -04:00
John Davis 2652ec6510 Add conftest.py for db tests 2024-05-02 14:12:35 -04:00
John Davis 76c8003d4f Drop unused mapping testing utilities and fixtures 2024-05-02 14:12:35 -04:00
mvdbeek 0456ff1cfd Merge branch 'release_24.0' into dev 2024-05-02 11:32:44 +02:00
davelopez b7eda89485 Add test to verify export dataset without hid works 2024-04-25 12:06:28 +02:00
John Davis 09fee6aaad Remove future, autocommit args from session and engine creation 2024-04-05 13:54:39 -04:00
John Davis f52d35bf7f Use NullPool for sqlite engines
This restores the behavior under SQLAlchemy 1.4
(Note that we set the pool for sqlite only if it's not an in-memory db
2024-04-02 10:08:53 -04:00
John Davis 78a77d934a Mypy: typing errors, misc. fixes 2024-04-02 10:08:53 -04:00
mvdbeek 6f08b9fc9c Add unit test for updating output hda copies 2024-03-19 10:41:16 +01:00
Marius van den Beek 5f25655096 Merge pull request #17346 from jmchilton/model_store_fixes
Fix model store exports that include implicit conversions.
2024-02-08 10:59:36 +01:00
Nicola Soranzo e975ca3754 Update to black 2024 stable style 2024-01-30 18:09:51 +00:00
John Chilton 4157042ffa Fix overlapping names in extra files for model stores. 2024-01-25 10:03:44 -05:00
John Chilton 69b01ac0e8 Utilities for higher level composite tests in test_model_store. 2024-01-25 10:03:44 -05:00
John Chilton 3a71150819 Minimal test case demonstrating model stores break on implicit conversions. 2024-01-25 09:32:40 -05:00
John Chilton 936a35d90d More de-duplication in test_model_store.py. 2024-01-25 09:32:35 -05:00
John Chilton 24d215c9e7 Reduce duplication in test_model_store. 2024-01-24 11:11:16 -05:00
John Davis 475f7227c4 Add future=True flag to SA engine 2023-12-12 09:54:08 -05:00
John Davis 95fa80105a Fix "statement is being autocommitted" SA2.0 warning 2023-12-11 16:09:44 -05:00
Michael R. Crusoe 14fb5acc69 importlib_resources is only needed in Python 3.8
Add type hints + fixes
2023-11-27 00:01:54 +00:00
Yakubov, Sergey c30a4c06c2 Replace file_name property with get_file_name function 2023-11-08 17:17:14 -05:00
mvdbeek c62da4aa33 Merge branch 'release_23.1' into dev 2023-08-09 16:06:08 +02:00
mvdbeek 7329575bf4 Unit test fixes 2023-07-31 14:03:32 +02:00
John Davis e54a2ec897 Fix SA2.0 syntax (query->select) in unit tests
Includes multiple upgrades to syntax.
Ref: https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#migration-orm-usage
2023-07-21 13:04:22 -04:00
John Davis 4f2ebe4846 Wrap session.flush in test.unit.data.model 2023-06-09 13:05:26 -04:00
mvdbeek 368dfb3119 Merge branch 'release_23.0' into dev 2023-06-06 15:55:12 +02:00
mvdbeek 7cb93b3d93 Support ro-crate >=0.8.0 and 0.7.0
I guess there's a chance downstream users may run into version conflicts
if we pin ro-cate to 0.7.0, and we also don't really want to bump stable
version dependencies.
2023-06-06 11:55:52 +02:00
John Davis f532069517 Rename helper functions 2023-05-15 13:44:32 -04:00
John Davis 22218b5806 Allow for composite indexes and constraints; add tests 2023-05-15 11:23:01 -04:00
John Davis 98d884e5c5 Drop views 2023-04-13 18:53:44 -04:00
Nicola Soranzo c655360e4e Merge branch 'release_23.0' into dev 2023-04-05 12:39:43 +01:00
Paul De GeestandDavid López 2146f7d1ff Update 2 test/unit/data/model/test_model_store.py
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
2023-03-30 13:33:55 +02:00
Paul De GeestandDavid López 98c71d1c70 Update 1 test/unit/data/model/test_model_store.py
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
2023-03-30 13:33:43 +02:00
pauldg 9105ba3ea5 formatting 2023-03-29 11:32:35 +02:00
pauldg e2882dc54c Changes to tests according to ro-crate
metadata changes
2023-03-29 11:32:34 +02:00
John Davis 63224a626d Drop mapping unit tests 2023-02-28 15:48:14 -05:00
John Davis e6b9da9070 Factor out common code into migrations.base 2023-02-08 14:33:30 -05:00
John Davis df0c6b6292 Move migration exception classes into their own module 2023-02-08 12:12:21 -05:00
John Davis cc55636588 Improve migrations error handling
1. Make message, class name more descriptive, specific
2. Generalize attributes, message, factor out upgrade script
   to be applicable to multiple databases (galaxy, tool shed, etc.)
3. Use more specific errors; do not group together errors caused by an
   outdated version in a database controlled by Alembic and a
   database that doesn't have Alembic setup.
2023-02-08 00:33:48 -05:00
Nicola Soranzo 30f60493c3 Format Python code with black 23.1.0
with manual fixes to 3 files to make them compatible with black 22.12.0 .

We need to keep black pinned at `<23` until we vendorise `packaging`, since
the new version of black depends on `packaging >=22.0` which is the version
where `LegacyVersion` (which we use for tool lineages) was removed.
2023-02-01 23:51:03 +00:00
pauldg 50ef6bcaeb Added asserts for invocation with collections 2023-01-11 09:37:22 +01:00
pauldg 5253992928 added unit test for collections and fixed format 2023-01-11 09:37:22 +01:00
pauldg 7ebc1b3f4e added job params to unit testing 2023-01-11 09:37:22 +01:00
pauldg c49a38ca70 changes to unit tests 2023-01-11 09:37:22 +01:00
davelopez e627c32769 Fix linting + mypy 2023-01-11 09:37:17 +01:00
pauldg e42ca8c442 Fix missing export_files parameter in test
export_files parameters missing in ROCrateArchiveModelExportStore
2023-01-11 09:28:14 +01:00
pauldg 3631d08f68 added additional unit tests for workflow invocation to rocrate export 2023-01-11 09:28:14 +01:00
davelopezandPaul De Geest 1dca3eedfd Add a bit more metadata check to rocrate tests
Co-authored-by: Paul De Geest <pauldegeest1@gmail.com>
2023-01-11 09:28:14 +01:00
John Chilton 2f46f05d48 Typing galaxy.security. 2022-12-12 14:18:28 -05:00