Commit Graph
468 Commits
Author SHA1 Message Date
John Davis 16e18d404e Merge pull request #19395 from mvdbeek/alternative_format_source_fix
Alternative `format_source` fix
2025-01-23 10:54:03 -05:00
Nicola Soranzo aa49793ecf Make CompressedFile a context manager
to ensure that the archive is closed.
2025-01-18 14:40:30 +00:00
mvdbeek 7566674baa Fix type annotation resulting from annotating HDCA.collection 2025-01-10 23:37:10 +02:00
Nicola Soranzo 944450aa38 Uniform use of tmp_path in ro-crate tests 2025-01-10 15:12:17 +00:00
mvdbeek 40388b4dab Merge branch 'release_24.2' into dev 2024-11-26 16:47:33 +01:00
Marius van den Beek 71f87d8d05 Merge pull request #18951 from kostrykin/image-metadata/dev
Extend image metadata
2024-11-25 13:12:08 +01:00
Nicola Soranzo 26a4e146e0 Fix UP031 errors
reported by ruff 0.8.0 .
2024-11-24 21:35:23 +00:00
Leonid Kostrykin 9a8d944fbc Remove im_corrupted.tif test case 2024-11-21 17:04:07 +01:00
John Davis 16f7700ea4 Move method out of managers into model
To accommodate package unit testing
2024-11-20 16:52:23 -05:00
John Davis b3e57cb9a2 Cleanup sharing roles on user purge, refactor, test
1. Update sharing role name removing purged user email
2. If sharing role has only one user association, delete it.
3. Factor out cleanup, add test.

Note: this will not work if user email has been udpated after the sharing
role was created.
2024-11-20 16:52:23 -05:00
Marius van den Beek 6463f86e6f Merge pull request #18966 from jdavcs/dev_private_roles2
Decouple user email from role name
2024-11-19 16:51:45 +01:00
M Bernt 2d4d88300c Merge pull request #19104 from tStehling/vtu-datatype
Add XML based `vtk` datatype
2024-11-17 10:00:38 +01:00
Leonid Kostrykin 88831b1499 Fix typehint issue 2024-11-14 15:53:56 +01:00
Matthias Bernt 887b1aab11 try to fix typing 2024-11-14 13:21:52 +01:00
Matthias Bernt edddce7f3d fix formatting 2024-11-13 22:40:22 +01:00
Thorben b5b48fa609 fix and test metadata setting 2024-11-13 16:31:49 +01:00
Leonid Kostrykin 02cb43bbeb Merge branch 'dev' into image-metadata/dev 2024-11-12 22:34:05 +01:00
Leonid Kostrykin 48d88eae4a Suppress mypy error (#2) 2024-11-12 19:11:50 +01:00
Leonid Kostrykin 553c06f2f1 Add unit test for image files that cannot be read by Pillow or tifffile 2024-11-12 18:33:34 +01:00
Leonid Kostrykin 6e7efb9399 Translate functional tests into unit tests 2024-11-12 18:16:25 +01:00
Nicola Soranzo f7c5769ca5 Always validate hashes when provided
Currently when uploading datasets with associated hashes, this were
only validated if `validate_hashes=True` was also passed in the
request.

This commit drops `validate_hashes` completely and always validates
hashes when they were provided.
2024-11-05 23:21:51 +00:00
John Davis 4be1eaf692 Update unit test w/new method name 2024-10-31 09:28:49 -04:00
John DavisandDavid López 4a7eb0a6ec Fix typo
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
2024-10-31 09:25:48 -04:00
John Davis 16f1d3f0e3 Fix error in select, add test
We must use a union because when we retrieve roles with a query, we
check against:
1) role name
2) email of associated user for private roles

We factor out this select into a helper method, which we then test
extensively.
2024-10-30 15:28:47 -04:00
John Davis f8c751a788 Do not use user's email in private role name, description
Reason: decouple user email from private role naming: emails can be
changed or redacted; user id in user-role-association + role type is
sufficient to tie a user to a private role.

The description (i.e., "this is a private role for a user" is inferrable
from the role name ("private role"), which is assigned by default.
2024-10-30 15:28:47 -04:00
John Davis 0e51a52272 Move test fixture to conftest 2024-10-30 15:28:47 -04:00
John Davis e255a384cd Modify make_role fixture to accommodate downgrading in migration tests 2024-10-30 15:28:47 -04:00
John Davis f623ee851f Adjust unit test: role name == user's current email 2024-10-30 15:28:47 -04:00
John Chilton 7f7710d392 Implement recovering normalized workflow request from invocation. 2024-10-15 09:12:05 -04:00
John Davis 00bebee7c7 Add test exposing bug
After user's email has been modified, we can't retrieve sharing roles
for that user
2024-10-04 14:44:41 -04:00
Marius van den Beek 2ead0c41e9 Merge pull request #18807 from jmchilton/landing 2024-10-01 21:44:50 +02:00
Nicola Soranzo 136747e766 Type annotations and fixes
- Use `galaxy.util.path.StrPath` everywhere
2024-09-30 21:33:44 +01:00
John Chilton 93f2af6a44 Allow dataset and source checksum validation during materialization. 2024-09-30 13:25:02 -04:00
John Chilton 80aaff8d23 Plumbing for dereferencing URLs into datasets. 2024-09-30 13:25:02 -04:00
John Chilton 813ed02d53 Merge pull request #18886 from jdavcs/dev_db_test_update
Refactor migration testing setup code
2024-09-25 10:49:27 -04:00
Matthias Bernt 7dd606a6b2 Merge branch 'release_24.1' into dev
# Conflicts:
#	lib/galaxy/version.py
#	packages/app/HISTORY.rst
#	packages/app/setup.cfg
#	packages/auth/HISTORY.rst
#	packages/auth/setup.cfg
#	packages/config/HISTORY.rst
#	packages/config/setup.cfg
#	packages/data/HISTORY.rst
#	packages/data/setup.cfg
#	packages/files/HISTORY.rst
#	packages/files/setup.cfg
#	packages/job_execution/HISTORY.rst
#	packages/job_execution/setup.cfg
#	packages/job_metrics/HISTORY.rst
#	packages/job_metrics/setup.cfg
#	packages/navigation/HISTORY.rst
#	packages/navigation/setup.cfg
#	packages/objectstore/HISTORY.rst
#	packages/objectstore/setup.cfg
#	packages/schema/HISTORY.rst
#	packages/schema/setup.cfg
#	packages/selenium/HISTORY.rst
#	packages/selenium/setup.cfg
#	packages/test_api/HISTORY.rst
#	packages/test_api/setup.cfg
#	packages/test_base/HISTORY.rst
#	packages/test_base/setup.cfg
#	packages/test_driver/HISTORY.rst
#	packages/test_driver/setup.cfg
#	packages/tool_shed/HISTORY.rst
#	packages/tool_shed/setup.cfg
#	packages/tool_util/HISTORY.rst
#	packages/tool_util/setup.cfg
#	packages/tours/HISTORY.rst
#	packages/tours/setup.cfg
#	packages/util/HISTORY.rst
#	packages/util/setup.cfg
#	packages/web_apps/HISTORY.rst
#	packages/web_apps/setup.cfg
#	packages/web_framework/HISTORY.rst
#	packages/web_framework/setup.cfg
#	packages/web_stack/HISTORY.rst
#	packages/web_stack/setup.cfg
2024-09-25 14:29:37 +02:00
John Davis b57ec18991 Refactor migration testing setup code
- Do not explicitly import fixtures (a little duplication is safer/cleaner)
- Move dangerous fixture into module to prevent accidental usage from other modules
- Ensure only one database is used for all tests in module
2024-09-24 20:47:09 -04:00
John Davis 03641a98fa Fix migration data fixes tests
When upgrading back to a valid revision, upgrade to head, not the
revision under test: we need the latest version of the model definition
in the database for the test to cleanup correctly.
2024-09-24 16:16:05 -04:00
John Davis 5524ea77a7 Add tests for migration fixes 2024-09-23 23:52:05 -04:00
John Davis 2fc21f9962 Do not pass unnecessary arguments 2024-09-23 17:05:15 -04:00
John Davis 6c4ddeb91d Test that private roles are not assignable 2024-09-23 17:05:15 -04:00
John Davis 8c4a90010a Add tests for user and history default permissions 2024-09-23 17:05:15 -04:00
John Davis 19d76e9580 Fix mypy: statements are reachable 2024-09-23 17:05:15 -04:00
John Davis 4fb1c704d6 Rename verify_items helper to have_same_elements
Improves readability of test code
2024-09-23 15:49:01 -04:00
John Davis 004d46c7a4 Fix test database handling for db tests 2024-09-23 14:22:59 -04:00
John Davis 7739134485 Add unit tests for user/group/role associations 2024-09-23 14:22:59 -04:00
John Davis bef3888683 Refactor for testability: pass only session
We don't need a ModelMapping instance here; without it we can
easily write unit tests.
2024-09-23 14:22:59 -04:00
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 87573ee617 Add tests for migration data fixes 2024-09-21 00:18:02 -04:00
John Davis 4471c6a851 Refactor tests to reduce duplication 2024-09-21 00:17:20 -04:00