fractal-server 2.18.3a0__py3-none-any.whl → 2.18.3a1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- __VERSION__ = "2.18.3a0"
1
+ __VERSION__ = "2.18.3a1"
@@ -17,6 +17,7 @@ from fractal_server.app.models import UserOAuth
17
17
  from fractal_server.app.models.v2 import HistoryRun
18
18
  from fractal_server.app.models.v2 import HistoryUnit
19
19
  from fractal_server.app.models.v2 import JobV2
20
+ from fractal_server.app.models.v2.project import ProjectV2
20
21
  from fractal_server.app.routes.auth import current_superuser_act
21
22
  from fractal_server.app.routes.aux._job import _write_shutdown_file
22
23
  from fractal_server.app.routes.aux._runner import _check_shutdown_is_supported
@@ -37,6 +38,7 @@ router = APIRouter()
37
38
  @router.get("/", response_model=PaginationResponse[JobRead])
38
39
  async def view_job(
39
40
  id: int | None = None,
41
+ resource_id: int | None = None,
40
42
  user_id: int | None = None,
41
43
  project_id: int | None = None,
42
44
  dataset_id: int | None = None,
@@ -84,6 +86,13 @@ async def view_job(
84
86
  if id is not None:
85
87
  stm = stm.where(JobV2.id == id)
86
88
  stm_count = stm_count.where(JobV2.id == id)
89
+ if resource_id is not None:
90
+ stm = stm.join(ProjectV2, ProjectV2.id == JobV2.project_id).where(
91
+ ProjectV2.resource_id == resource_id
92
+ )
93
+ stm_count = stm_count.join(
94
+ ProjectV2, ProjectV2.id == JobV2.project_id
95
+ ).where(ProjectV2.resource_id == resource_id)
87
96
  if user_id is not None:
88
97
  stm = (
89
98
  stm.join(
@@ -6,6 +6,18 @@ import subprocess # nosec
6
6
  from fractal_server.runner.exceptions import TaskExecutionError
7
7
  from fractal_server.string_tools import validate_cmd
8
8
 
9
+ MAX_LEN_STDERR = 100_000
10
+
11
+
12
+ def placeholder_if_too_long(stderr: str) -> str:
13
+ """Returns a placeholder if the string is too long"""
14
+ if len(stderr) > MAX_LEN_STDERR:
15
+ return (
16
+ f"Cannot display stderr of length {len(stderr)}. You can find the "
17
+ "detailed logs by downloading the job-log folder."
18
+ )
19
+ return stderr
20
+
9
21
 
10
22
  def call_command_wrapper(*, cmd: str, log_path: str) -> None:
11
23
  """
@@ -46,6 +58,7 @@ def call_command_wrapper(*, cmd: str, log_path: str) -> None:
46
58
  if os.path.isfile(log_path):
47
59
  with open(log_path) as fp_stderr:
48
60
  stderr = fp_stderr.read()
61
+ stderr = placeholder_if_too_long(stderr)
49
62
  raise TaskExecutionError(
50
63
  f"Task failed with returncode={result.returncode}.\n"
51
64
  f"STDERR: {stderr}"
@@ -1,35 +1,29 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fractal-server
3
- Version: 2.18.3a0
3
+ Version: 2.18.3a1
4
4
  Summary: Backend component of the Fractal analytics platform
5
+ Author: Tommaso Comparin, Marco Franzon, Yuri Chiucconi, Jacopo Nespolo
6
+ Author-email: Tommaso Comparin <tommaso.comparin@exact-lab.it>, Marco Franzon <marco.franzon@exact-lab.it>, Yuri Chiucconi <yuri.chiucconi@exact-lab.it>, Jacopo Nespolo <jacopo.nespolo@exact-lab.it>
5
7
  License-Expression: BSD-3-Clause
6
- License-File: LICENSE
7
- Author: Tommaso Comparin
8
- Author-email: tommaso.comparin@exact-lab.it
9
- Requires-Python: >=3.11,<3.15
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.11
12
- Classifier: Programming Language :: Python :: 3.12
13
- Classifier: Programming Language :: Python :: 3.13
14
- Classifier: Programming Language :: Python :: 3.14
15
- Requires-Dist: alembic (>=1.13.1,<2.0.0)
16
- Requires-Dist: fabric (>=3.2.2,<3.3.0)
17
- Requires-Dist: fastapi (>=0.120.0,<0.121.0)
18
- Requires-Dist: fastapi-users[oauth] (>=15,<16)
19
- Requires-Dist: gunicorn (>=23.0,<24.0)
20
- Requires-Dist: packaging (>=25.0.0,<26.0.0)
21
- Requires-Dist: psycopg[binary] (>=3.1.0,<4.0.0)
22
- Requires-Dist: pydantic (>=2.12.0,<2.13.0)
23
- Requires-Dist: pydantic-settings (==2.11.0)
24
- Requires-Dist: sqlalchemy[asyncio] (>=2.0.23,<2.1)
25
- Requires-Dist: sqlmodel (==0.0.27)
26
- Requires-Dist: tomli_w (>=1.2.0,<1.3.0)
27
- Requires-Dist: uvicorn (>=0.38.0,<0.39.0)
28
- Requires-Dist: uvicorn-worker (==0.4.0)
29
- Project-URL: Documentation, https://fractal-analytics-platform.github.io/fractal-server
30
- Project-URL: Homepage, https://github.com/fractal-analytics-platform/fractal-server
31
- Project-URL: Repository, https://github.com/fractal-analytics-platform/fractal-server
8
+ Requires-Dist: fastapi>=0.120.0,<0.121.0
9
+ Requires-Dist: sqlmodel==0.0.27
10
+ Requires-Dist: sqlalchemy[asyncio]>=2.0.23,<2.1
11
+ Requires-Dist: fastapi-users[oauth]>=15,<16
12
+ Requires-Dist: alembic>=1.13.1,<2.0.0
13
+ Requires-Dist: uvicorn>=0.38.0,<0.39.0
14
+ Requires-Dist: uvicorn-worker==0.4.0
15
+ Requires-Dist: pydantic>=2.12.0,<2.13.0
16
+ Requires-Dist: pydantic-settings==2.11.0
17
+ Requires-Dist: packaging>=25.0.0,<26.0.0
18
+ Requires-Dist: fabric>=3.2.2,<3.3.0
19
+ Requires-Dist: gunicorn>=23.0,<24.0
20
+ Requires-Dist: psycopg[binary]>=3.1.0,<4.0.0
21
+ Requires-Dist: tomli-w>=1.2.0,<1.3.0
22
+ Requires-Python: >=3.11, <3.15
32
23
  Project-URL: changelog, https://github.com/fractal-analytics-platform/fractal-server/blob/main/CHANGELOG.md
24
+ Project-URL: documentation, https://fractal-analytics-platform.github.io/fractal-server
25
+ Project-URL: homepage, https://github.com/fractal-analytics-platform/fractal-server
26
+ Project-URL: repository, https://github.com/fractal-analytics-platform/fractal-server
33
27
  Description-Content-Type: text/markdown
34
28
 
35
29
  # Fractal Server
@@ -63,4 +57,3 @@ See https://fractal-analytics-platform.github.io/fractal-server.
63
57
  Fractal was conceived in the Liberali Lab at the Friedrich Miescher Institute for Biomedical Research and in the Pelkmans Lab at the University of Zurich by [@jluethi](https://github.com/jluethi) and [@gusqgm](https://github.com/gusqgm). The Fractal project is now developed at the [BioVisionCenter](https://www.biovisioncenter.uzh.ch/en.html) at the University of Zurich and the project lead is with [@jluethi](https://github.com/jluethi). The core development is done under contract by [eXact lab S.r.l.](https://www.exact-lab.it).
64
58
 
65
59
  Unless otherwise specified, Fractal components are released under the BSD 3-Clause License, and copyright is with the BioVisionCenter at the University of Zurich.
66
-
@@ -1,4 +1,4 @@
1
- fractal_server/__init__.py,sha256=dEhdl9EtyqOPj5CiMlEv2OAVTTkU6dc3GeZ002YM4p8,25
1
+ fractal_server/__init__.py,sha256=2-J9RpG_KXCtJNi4kxk3w5ETlw28IsXy-07Hns9oc6A,25
2
2
  fractal_server/__main__.py,sha256=QeKoAgqoiozLJDa8kSVe-Aso1WWgrk1yLUYWS8RxZVM,11405
3
3
  fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
4
4
  fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -25,7 +25,7 @@ fractal_server/app/routes/admin/v2/__init__.py,sha256=VF4wg09fvz6gVgIFe-r7LoCU9t
25
25
  fractal_server/app/routes/admin/v2/_aux_functions.py,sha256=fqA5sUCFuD2iVANQt2WUUfVOEVz5egQA7inzUKYGCw0,1684
26
26
  fractal_server/app/routes/admin/v2/accounting.py,sha256=xNXyQYpa0K0bOjd5WNVKfU6zBhvT2-Xgrx2F4vdS9C0,3512
27
27
  fractal_server/app/routes/admin/v2/impersonate.py,sha256=ictDjuvBr3iLv3YtwkVRMNQRq5qtPAeAXbbC7STSsEg,1125
28
- fractal_server/app/routes/admin/v2/job.py,sha256=nishNH472KMmz9Au8_w6xOOAXEN3tqVSUX1IraO1Hr0,10430
28
+ fractal_server/app/routes/admin/v2/job.py,sha256=UaUwD5vsIPslc6KrbUPs2OsGcJOsLd7UeE2a5GRZnD0,10837
29
29
  fractal_server/app/routes/admin/v2/profile.py,sha256=DwLlA9K3hkl9BqzyifIDiaWeHOM_N_17kqB5CSJOhSI,3165
30
30
  fractal_server/app/routes/admin/v2/resource.py,sha256=c2z6b_D_W6_dqVnxNF8F8OdlI5Z4asex8Zgfwzjbi2Q,6330
31
31
  fractal_server/app/routes/admin/v2/sharing.py,sha256=x7RtbDPapyENEU_s4-glPoEeEOxxj2VBgduVQ1V7wkE,3796
@@ -105,7 +105,6 @@ fractal_server/config/_email.py,sha256=vMwLHN9-beYp_-up-WkTpeyNUZk4EHwt3N2l6-PYn
105
105
  fractal_server/config/_main.py,sha256=6splUmAPRD1J9HXkeZ-Vqif7Nw4ljJXIugpvRrcwPeI,2476
106
106
  fractal_server/config/_oauth.py,sha256=UTmlFppDZcOQhr3RvkiG5XMqvr54XRAQ_Y-iR0V8N-8,2024
107
107
  fractal_server/config/_settings_config.py,sha256=tsyXQOnn9QKCFJD6hRo_dJXlQQyl70DbqgHMJoZ1xnY,144
108
- fractal_server/data_migrations/README.md,sha256=_3AEFvDg9YkybDqCLlFPdDmGJvr6Tw7HRI14aZ3LOIw,398
109
108
  fractal_server/data_migrations/tools.py,sha256=LeMeASwYGtEqd-3wOLle6WARdTGAimoyMmRbbJl-hAM,572
110
109
  fractal_server/exceptions.py,sha256=l6aZDk_6u_9PwDaQSoIFdI40ekpzqOJaxjx5rhW-HVI,141
111
110
  fractal_server/gunicorn_fractal.py,sha256=u6U01TLGlXgq1v8QmEpLih3QnsInZD7CqphgJ_GrGzc,1230
@@ -183,7 +182,7 @@ fractal_server/runner/config/slurm_mem_to_MB.py,sha256=6KmrIC-NymQjb9-bIQjNYQx6m
183
182
  fractal_server/runner/exceptions.py,sha256=N8DLn7tuV8zMSdr8xdJN0aIdytPveSCeQ1Y5IoxXW-8,1778
184
183
  fractal_server/runner/executors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
185
184
  fractal_server/runner/executors/base_runner.py,sha256=h8uE5gr6zFEwpjhasJDc-eNTMIw3RwmQQLYD6U5w8E0,7116
186
- fractal_server/runner/executors/call_command_wrapper.py,sha256=n6c9haKyIudBlz9-d3GQb19rewBR54qLG8jlrma6okk,1415
185
+ fractal_server/runner/executors/call_command_wrapper.py,sha256=yLFfwkYdfGAp6TSLx0omymW3IxaDNdxV-DDk-3oqNx0,1828
187
186
  fractal_server/runner/executors/local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
188
187
  fractal_server/runner/executors/local/get_local_config.py,sha256=oI32JawlG3ixYdjxJDRfT0sreEnoHekhiAHzlejl2aM,1694
189
188
  fractal_server/runner/executors/local/runner.py,sha256=0s0u5ONasXdsvS2WD5zxksQgved_XGXtaxCEiBJoAlM,12297
@@ -268,8 +267,7 @@ fractal_server/types/validators/_workflow_task_arguments_validators.py,sha256=zt
268
267
  fractal_server/urls.py,sha256=QjIKAC1a46bCdiPMu3AlpgFbcv6a4l3ABcd5xz190Og,471
269
268
  fractal_server/utils.py,sha256=-rjg8QTXQcKweXjn0NcmETFs1_uM9PGnbl0Q7c4ERPM,2181
270
269
  fractal_server/zip_tools.py,sha256=Uhn-ax4_9g1PJ32BdyaX30hFpAeVOv2tZYTUK-zVn1E,5719
271
- fractal_server-2.18.3a0.dist-info/METADATA,sha256=gvMqw6he1Mg5FoCHcVzHL1i3ywNWUhVfVz_Lqa_XF5I,4277
272
- fractal_server-2.18.3a0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
273
- fractal_server-2.18.3a0.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
274
- fractal_server-2.18.3a0.dist-info/licenses/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
275
- fractal_server-2.18.3a0.dist-info/RECORD,,
270
+ fractal_server-2.18.3a1.dist-info/WHEEL,sha256=ZyFSCYkV2BrxH6-HRVRg3R9Fo7MALzer9KiPYqNxSbo,79
271
+ fractal_server-2.18.3a1.dist-info/entry_points.txt,sha256=3TpdcjmETRYWJxFyAh3z-9955EWua9jdkSnBwxES1uE,60
272
+ fractal_server-2.18.3a1.dist-info/METADATA,sha256=dowEZiXk1xYXEsowmAdTx54gIWNNZ6w8PJYuvUczzdA,4163
273
+ fractal_server-2.18.3a1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.9.18
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ fractalctl = fractal_server.__main__:run
3
+
@@ -1,6 +0,0 @@
1
- Modules in this folder are consumed from the `update_db_data` function in
2
- `fractal_server/__main__.py`. They must expose a `fix_db` function, and they
3
- must be named according to `_slugify_version` (e.g. both for versions `1.4.3`
4
- and `1.4.3a0` the module name is `1_4_3.py`).
5
- Modules corresponding to old versions should be moved to the `old` subfolder,
6
- which is not included in the package wheel.
@@ -1,4 +0,0 @@
1
- Wheel-Version: 1.0
2
- Generator: poetry-core 2.2.1
3
- Root-Is-Purelib: true
4
- Tag: py3-none-any
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- fractalctl=fractal_server.__main__:run
3
-
@@ -1,29 +0,0 @@
1
- BSD 3-Clause License
2
-
3
- Copyright 2022 (C) Friedrich Miescher Institute for Biomedical Research and University of Zurich
4
- All rights reserved.
5
-
6
- Redistribution and use in source and binary forms, with or without
7
- modification, are permitted provided that the following conditions are met:
8
-
9
- * Redistributions of source code must retain the above copyright notice, this
10
- list of conditions and the following disclaimer.
11
-
12
- * Redistributions in binary form must reproduce the above copyright notice,
13
- this list of conditions and the following disclaimer in the documentation
14
- and/or other materials provided with the distribution.
15
-
16
- * Neither the name of the copyright holder nor the names of its
17
- contributors may be used to endorse or promote products derived from
18
- this software without specific prior written permission.
19
-
20
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.