Commit 9bef3bc5 authored by Cage, Gregory's avatar Cage, Gregory
Browse files

Merge branch '3-sammy-release-impl' into 'main'

Initial implementation of Nova library

Closes #3

See merge request ndip/public-packages/nova-galaxy!1
parents 40cb78dd 117cb5ce
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -86,7 +86,8 @@ package-build:
      ${IMAGE_NAME}:src-${CI_COMMIT_SHA}
      bash -c "
      poetry config repositories.gitlab_repo ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi &&
      poetry publish -u gitlab-ci-token -p ${CI_JOB_TOKEN} -r gitlab_repo
      poetry publish -u gitlab-ci-token -p ${CI_JOB_TOKEN} -r gitlab_repo &&
      poetry publish -u __token__ -p ${PYPI_API_TOKEN}
      "
  when: manual
  tags:

poetry.lock

0 → 100644
+1673 −0

File added.

Preview size limit exceeded, changes collapsed.

+4 −9
Original line number Diff line number Diff line
[tool.poetry]
name = "nova-galaxy"
version = "0.1.0"
version = "0.3.0"
description = "Utilties for accessing the ORNL Galaxy instance"
authors = ["Greg Watson <watsongr@ornl.gov>"]
authors = ["Greg Watson <watsongr@ornl.gov>", "Gregory Cage <cagege@ornl.gov>"]
readme = "README.md"
license = "MIT"
keywords = ["NOVA", "Galaxy", "python"]
packages = [
	{include = "src/nova"}
    {include = "nova", from ="src"}
]


[tool.poetry.dependencies]
python = "^3.10"
bioblend = "^1.3.0"
@@ -20,9 +21,6 @@ build-backend = "poetry.core.masonry.api"


[tool.pytest.ini_options]
pythonpath = [
  ".", "src"
]
testpaths = ["tests"]
python_files = ["test*.py"]
norecursedirs = [".git", "tmp*", "_tmp*", "__pycache__"]
@@ -82,6 +80,3 @@ coverage = ">=6.4.3"
pytest = "*"
ruff = ">=0.6.2"
copier=">=9.3"

[tool.poetry.scripts]
nova_galaxy = "nova_galaxy:main"
+18 −3
Original line number Diff line number Diff line
import importlib.metadata

from .nova import NOVA
from .data_store import Datastore
from .dataset import Dataset, DatasetCollection, upload_datasets
from .nova import Nova, NovaConnection
from .outputs import Outputs
from .parameters import Parameters
from .tool import Tool

__all__ = ["NOVA"]
__all__ = [
    "Nova",
    "NovaConnection",
    "Datastore",
    "Dataset",
    "DatasetCollection",
    "upload_datasets",
    "Outputs",
    "Parameters",
    "Tool",
]

__version__ = importlib.metadata.version(__package__)
__version__ = importlib.metadata.version("nova-galaxy")
+22 −0
Original line number Diff line number Diff line
"""DataStore is used to configure Galaxy to group outputs of a tool together."""

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from .nova import NovaConnection  # Only imports for type checking


class Datastore:
    """Groups tool outputs together.

    The constructor is not intended for external use. Use nova.galaxy.Nova.create_data_store() instead.
    """

    def __init__(self, name: str, nova_connection: "NovaConnection", history_id: str) -> None:
        self.name = name
        self.nova_connection = nova_connection
        self.history_id = history_id
        self.persist_store = False

    def persist(self) -> None:
        self.persist_store = True
Loading