Commit Graph
376 Commits
Author SHA1 Message Date
Marius van den Beek 4a46ea1509 Merge pull request #11779 from natefoo/installable
Fixes for installed Galaxy
2021-04-06 16:45:40 +02:00
Nate Coraor 698d95e52d Move all galaxy.util.* modules to the galaxy-util package. 2021-04-05 12:06:48 -04:00
Nate Coraor f6fdc66e23 Move all galaxy.datatypes.* modules to the galaxy-data package. 2021-04-05 12:02:08 -04:00
Nate Coraor a857929af5 Move all galaxy.model.* modules to the galaxy-data package. 2021-04-05 11:48:14 -04:00
Nate Coraor d8aa5a3804 Add fastapi-utils to galaxy-webapps package requirements. 2021-04-02 16:01:34 -04:00
Nate Coraor a0ecf74e1c Include galaxy.job_execution.ports in galaxy-job-execution package. 2021-04-02 16:01:01 -04:00
Nate Coraor c6cde5f5fa Relocate display application configs and include display application
configs in galaxy-webapps package.
2021-04-02 15:42:36 -04:00
Nate Coraor ca712beff8 Include set_metadata_tool.xml in galaxy-app package. 2021-04-02 15:04:46 -04:00
Nate Coraor 7c0cf9d1f6 Include galaxy.datatype.converters in galaxy-app package. 2021-04-02 15:04:39 -04:00
Nate Coraor ad9d7e88e6 Include galaxy.model.migrate.versions in galaxy-app package. 2021-04-02 14:16:48 -04:00
Nate Coraor 609c5d2eb9 Include sample configs in galaxy-app package. 2021-04-02 14:10:33 -04:00
Nate Coraor 38fcde0aaf Include config schemas in galaxy-app package and support loading from
the package dir rather than a fixed path in lib/.
2021-04-02 14:07:37 -04:00
Nate Coraor e7127f7386 Include galaxy.workflow.refactor and galaxy.workflow.reports in
galaxy-app package.
2021-04-02 13:51:25 -04:00
Nate Coraor 4ad0b7c10c Include galaxy.model.tool_shed_install and sub-packages in galaxy-app. 2021-04-02 13:37:46 -04:00
Nate Coraor c25e730c95 Include galaxy.util.tool_shed in galaxy-app package. 2021-04-02 13:32:39 -04:00
Nate Coraor 61a87d1a36 Include galaxy.config in galaxy-app package. 2021-04-02 13:23:13 -04:00
Nate Coraor 44e59e9665 Include galaxy.model.view in galaxy-data package. 2021-04-02 13:21:13 -04:00
Nate Coraor 72caae0ab5 Include galaxy.model.dataset_collections.types in galaxy-data package. 2021-04-02 13:19:12 -04:00
Nate Coraor 1019ff06d8 Include job runner scripts in galaxy-app package 2021-04-02 13:17:30 -04:00
Nate Coraor cc1f471490 Release process overhaul
- Convert release Makefile targets to a script
- Update package versions from Galaxy version instead of leaving them
  uncoupled
- Use next-dev-version process on release branches when in between point
  releases
- Automatically detect and increment versions
- Test merging release branches forward before pushing releases
- Support multiple rc versions (will be more useful for package testing)
- Support building local versions of packages
- Tests for the release script
2021-03-30 12:11:48 -04:00
mvdbeek 908708c3c0 Add celery to galaxy-app 2021-03-29 09:29:25 -04:00
mvdbeek 1afe1e1211 Break UniverseApplication into smaller parts
so we can use a variant of app that loads managers in Celery.
2021-03-29 09:29:25 -04:00
mvdbeek ac3fcf911e Merge branch 'release_21.01' into dev 2021-03-24 20:34:06 +01:00
John Chilton 3e0a5d7b06 Starting work on tool-util 21.1.1 2021-03-19 14:27:29 -04:00
John Chilton 883a4b9641 Version 21.1.0 of tool-util (tag galaxy-tool-util-21.1.0). 2021-03-19 14:27:10 -04:00
John Chilton 9486d96b3b Starting work on containers 21.1.1 2021-03-19 14:21:42 -04:00
John Chilton a3e2698bd6 Version 21.1.0 of containers (tag galaxy-containers-21.1.0). 2021-03-19 14:21:21 -04:00
John Chilton 1a9433b298 Starting work on util 21.1.1 2021-03-19 14:18:57 -04:00
John Chilton 4c06212424 Version 21.1.0 of util (tag galaxy-util-21.1.0). 2021-03-19 14:18:27 -04:00
John Chilton 3fe054b7e6 Prepare for 21.1.0 release of galaxy-util. 2021-03-19 14:14:08 -04:00
Nicola Soranzo 76123657c2 Merge branch 'release_21.01' into dev 2021-03-17 12:41:24 +00:00
mvdbeek 9c2d63211f Add refgenconf package pin 2021-03-17 12:54:44 +01:00
Sergey Golitsynskiy 7fa062f30c Pin sqlalchemy in package requirements files 2021-03-17 12:12:35 +01:00
Sergey Golitsynskiy 2f0a024915 Pin sqlalchemy in package requirements files 2021-03-16 13:55:21 -04:00
Nicola Soranzo 6c540932c7 Merge branch 'release_21.01' into dev 2021-03-12 19:01:35 +00:00
Nicola Soranzo 283ec1772f Merge branch 'release_20.09' into release_21.01 2021-03-12 17:12:04 +00:00
Nicola Soranzo 734b08142a Use latest pip in package testing
Fix the following error when running `tox -e test_galaxy_packages` on
Python 3.5:

```
ERROR: Could not find a version that satisfies the requirement networkx==2.5 (from isa-rwval->galaxy-data==20.9.1.dev0) (from versions: 0.34, 0.35, 0.35.1, 0.36, 0.37, 0.99, 1.0rc1, 1.0, 1.0.1, 1.1, 1.2rc1, 1.2, 1.3rc1, 1.3, 1.4rc1, 1.4, 1.5rc1, 1.5, 1.6rc1, 1.6, 1.7rc1, 1.7, 1.8rc1, 1.8, 1.8.1, 1.9rc1, 1.9, 1.9.1, 1.10rc2, 1.10, 1.11rc1, 1.11rc2, 1.11, 2.0, 2.1, 2.2rc1, 2.2, 2.3rc3, 2.3rc4, 2.3, 2.4rc1, 2.4rc2, 2.4)
ERROR: No matching distribution found for networkx==2.5 (from isa-rwval->galaxy-data==20.9.1.dev0)
WARNING: You are using pip version 20.2.2; however, version 20.3.4 is available.
You should consider upgrading via the '/tmp/gxpkgtestenviQxuK1/bin/python -m pip install --upgrade pip' command.
ERROR: InvocationError for command /bin/bash packages/test.sh (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   test_galaxy_packages: commands failed
```
2021-03-11 22:41:10 +00:00
mvdbeek 45990803eb Merge branch 'release_21.01' into dev 2021-03-09 15:29:19 +01:00
John Chilton 6465b78836 Starting work on tool-util 21.1.0.dev7 2021-03-06 11:29:44 -05:00
mvdbeek 7025f20f68 Merge branch 'release_21.01' into dev 2021-03-02 15:10:04 +01:00
Marius van den Beek c084f5f919 Merge pull request #11512 from jmchilton/fix_pydanic_1.8
[21.01] Fix web framework requests for pydantic 1.8 not working.
2021-03-02 09:16:25 +01:00
Nate Coraor a2d1625780 Merge remote-tracking branch 'upstream/release_21.01' into dev 2021-03-01 16:52:02 -05:00
Nate Coraor 7ed0f5337f Merge remote-tracking branch 'upstream/release_20.09' into release_21.01 2021-03-01 16:47:23 -05:00
Nate Coraor 373489e8f4 Starting work on objectstore 20.9.2 2021-03-01 16:37:33 -05:00
Nate Coraor 0fbbf734f5 Version 20.9.1 of objectstore (tag galaxy-objectstore-20.9.1). 2021-03-01 15:29:38 -05:00
John Chilton 7ef579b96c Fix web framework requests for pydantic 1.8 not working. 2021-03-01 12:59:05 -05:00
John Chilton 11c1715fc3 Holistic approach to dependency injection.
Dependency injection is cool - it should however not be confined to the top-layer of the application. Inversion of control can help every layer and is a great way to de-couple various parts of the app.

This code brings in a framework (Lagom) to build a dependency injection framework and then adds a small function (``depends``) that adapts it to FastAPI's dependency injection mechanism ("Depends").

The advantages to this approach are numerous.

We don't need to write these little adapters for each component of the backend to adapt it FastAPI. For example look at the change to the roles API controller:

```diff
-def get_role_manager(app: UniverseApplication = Depends(get_app)) -> RoleManager:
-    return app.role_manager
-
-
 @cbv(router)
 class FastAPIRoles:
-    role_manager: RoleManager = Depends(get_role_manager)
+    role_manager: RoleManager = depends(RoleManager)
```

This is much less boilerplate. We don't need to implement & type that function get_role_manager and we don't need to bring in the import on UniverseApplication.

Additionally, we've got a clean abstraction that shields us from ``fastapi`` imports in all of our controllers. It should make it more possible to switch to new frameworks and such as the Python ecosystem matures.

Also, the same DI that is used to inject ``RoleManager`` into this contoller is used to inject app into RoleManager when it is constructed during application initialization. Any component being managed by UniverseApplication can now rely on its constructor arguments to be injected if it wants. It is easy to see the cool examples on FastAPI and think it is just a technology for controllers, but it totally is not.

I don't think there is really a way to use FastAPI's dependency injection outside the context of that framework, but even if one could Lagom is superior. All the auto-wiring is by type and requires zero framework and zero configuration (https://github.com/meadsteve/lagom#auto-wiring-with-zero-configuraton).

Having a web framework provide these framework-bound extension points for injecting stuff into controllers was the state of the art of Java like 15 years ago. Skipping that whole learning process and using the type system and auto-wiring that isn't dependent on framework annotation really jumps out to Java circa 8 years ago!

Why Lagom is an interesting question. When researching DI frameworks, I couldn't find a clear winner but Lagom focus on type annotations versus annotating by name makes it clearly more modern than a lot frameworks by much bigger names (https://github.com/meadsteve/lagom/blob/master/docs/comparison.md). The other type-centric framework that had even a nice interface that I found was punq (https://punq.readthedocs.io/en/latest/). The development just doesn't seem as active on punq. While I didn't land up using the integration Lagom seems to have async frameworks in mind (https://github.com/meadsteve/lagom/blob/master/lagom/integrations/fast_api.py), so that is another plus. Ultimately though I think I can swap between these two with like 10 lines of code switch, they do cool things with very simple interfaces and neither requires a bunch of investment in annotation on your components.
2021-02-23 10:28:46 -05:00
mvdbeek 61df313fb6 Add contextvars to data package requirement 2021-02-21 21:20:07 +01:00
Nate Coraor 7a15718861 Merge remote-tracking branch 'upstream/release_21.01' into dev 2021-02-16 21:59:52 -05:00
mvdbeek f978800d69 Revert sqlalchemy-json work for now
I'm still seeing errors in some places, and just changing everything to
SimpleJSON seems a bit risky at this point.
We'll have to live with
```
  File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/datatypes/registry.py", line 590, in change_datatype
    data.init_meta(copy_from=data)
  File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/model/__init__.py", line 2783, in init_meta
    return self.datatype.init_meta(self, copy_from=copy_from)
  File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/datatypes/data.py", line 171, in init_meta
    dataset.metadata = copy_from.metadata
  File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/model/__init__.py", line 2705, in set_metadata
    self._metadata = self.metadata.make_dict_copy(bunch)
  File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/model/metadata.py", line 161, in make_dict_copy
    rval[key] = self.spec[key].param.make_copy(value, target_context=self, source_context=to_copy)
  File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/model/metadata.py", line 281, in make_copy
    return copy.deepcopy(value)
  File "/cvmfs/main.galaxyproject.org/deps/_conda/envs/_galaxy_/lib/python3.6/copy.py", line 161, in deepcopy
    y = copier(memo)
  File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/model/custom_types.py", line 232, in __deepcopy__
    return MutationList(MutationObj.coerce(self._key, copy.deepcopy(self[:])))
AttributeError: 'MutationList' object has no attribute '_key'
```
for now.
2021-02-13 16:09:10 +01:00