Commit 431e12a9 authored by Ayres, Andrew's avatar Ayres, Andrew
Browse files

Lots of random fixes

parent 86259fe3
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ packages = [
[tool.poetry.dependencies]
python = "^3.10"
nova-trame = "*"
nova-galaxy = "^0.4.0"
nova-galaxy = "^0.7.0"

[build-system]
requires = ["poetry-core"]
+3 −3
Original line number Diff line number Diff line
import os
from nova.galaxy import Nova, Parameters, Tool
from nova.galaxy import Connection, Parameters, Tool


class Fractal:
@@ -18,12 +18,12 @@ class Fractal:
                "You must specify GALAXY_URL and GALAXY_API_KEY as environment variables."
            )

        nova = Nova(galaxy_url=self.galaxy_url, galaxy_key=self.galaxy_key)
        conn = Connection(galaxy_url=self.galaxy_url, galaxy_key=self.galaxy_key)
        tool = Tool(id="neutrons_fractal")
        params = Parameters()
        params.add_input(name="option", value=self.fractal_type)

        with nova.connect() as galaxy_connection:
        with conn.connect() as galaxy_connection:
            data_store = galaxy_connection.create_data_store(name="fractal_store")
            data_store.persist()
            output = tool.run(data_store, params)
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ packages = [
[tool.poetry.dependencies]
python = "^3.10"
nova-trame = "*"
nova-galaxy = "^0.4.0"
nova-galaxy = "^0.7.0"

[build-system]
requires = ["poetry-core"]
+3 −3
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ import base64
from typing import Literal

from pydantic import BaseModel, Field
from nova.galaxy import Nova, Parameters, Tool
from nova.galaxy import Connection, Parameters, Tool


class Fractal(BaseModel):
@@ -22,11 +22,11 @@ class Fractal(BaseModel):
                "You must specify GALAXY_URL and GALAXY_API_KEY as environment variables."
            )

        nova = Nova(galaxy_url=self.galaxy_url, galaxy_key=self.galaxy_key)
        conn = Connection(galaxy_url=self.galaxy_url, galaxy_key=self.galaxy_key)
        tool = Tool(id="neutrons_fractal")
        params = Parameters()

        with nova.connect() as galaxy_connection:
        with conn.connect() as galaxy_connection:
            data_store = galaxy_connection.create_data_store(name="fractal_store")
            data_store.persist()
            output = tool.run(data_store, params)
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ packages = [
[tool.poetry.dependencies]
python = "^3.10"
nova-trame = "*"
nova-galaxy = "^0.4.0"
nova-galaxy = "^0.7.0"

[build-system]
requires = ["poetry-core"]
Loading