Commit 6f93cf97 authored by Ayres, Andrew's avatar Ayres, Andrew
Browse files

Move project dependencies section

parent 431e12a9
Loading
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ exercises: 3

# 2. Getting Started with a Template Application


As mentioned in the introduction, all code examples in this tutorial are based on a template application. In this episode, we will create this starting point by cloning a template using the `copier` library. This template provides a basic project structure and pre-configured files that will help us get started quickly with our NOVA project, saving us from setting up everything from scratch.

::::::::::::::::::::::::::::::::::::::::: callout
@@ -30,6 +31,22 @@ The setup section detailed the prerequisites required for the tutorial. One of t

::::::::::::::::::::::::::::::::::::::::::::::::::

## Install Project Dependencies

1.  **Clone the Template:**  Follow the instructions in the "Getting Started with a Template Application" episode to clone the NOVA template using `copier`.  This will create a new directory (e.g., `nova_tutorial`) containing your project files.
2.  **Navigate to the Project Directory:**  Open your terminal and navigate to the newly created project directory:

    ```bash
    cd nova_tutorial
    ```

3.  **Install Dependencies with Poetry:**  Use Poetry to install the project dependencies defined in the `pyproject.toml` file:

    ```bash
    poetry install
    ```

    This command will create a virtual environment for your project and install all required libraries, including the NOVA libraries and Trame.

## Cloning the Template

+4 −0
Original line number Diff line number Diff line
@@ -124,6 +124,10 @@ At times, it may be desirable to execute a tool or workflow without waiting on t
            output = tool.run(data_store, params, wait=False)
```

## Tool output

After the tool finishes running on NDIP, the result of the tool is returned as an output. In this example, the output is a single image file of the generated fractal. Tools can return single files or a collection of files as a zip. The output can be used by the rest of your application, saved, or simply discarded. A copy of the output also resides on the NDIP platform, so it is not necessary to maintain a local copy.

## Next Steps

In this section, you learned how to use the `nova-galaxy` library to run a tool on NDIP. In the next sections, we will expand on this to create a full user interface to make this functionality accessible to the end user.
+2 −19
Original line number Diff line number Diff line
@@ -18,24 +18,7 @@ Before proceeding, ensure you have met the following prerequisites:
*   **A Text Editor or IDE:** You will need a text editor or IDE (such as VS Code, Sublime Text, or Atom) for writing code.
*   **Familiarity with the Command Line:** You will need to be comfortable using the command line or terminal.

## 2. Install Project Dependencies

1.  **Clone the Template:**  Follow the instructions in the "Getting Started with a Template Application" episode to clone the NOVA template using `copier`.  This will create a new directory (e.g., `nova_tutorial`) containing your project files.
2.  **Navigate to the Project Directory:**  Open your terminal and navigate to the newly created project directory:

    ```bash
    cd nova_tutorial
    ```

3.  **Install Dependencies with Poetry:**  Use Poetry to install the project dependencies defined in the `pyproject.toml` file:

    ```bash
    poetry install
    ```

    This command will create a virtual environment for your project and install all required libraries, including the NOVA libraries and Trame.

## 3. Configure Environment Variables
## 2. Configure Environment Variables

The NOVA framework requires you to set environment variables for your NDIP URL and API key. These variables are used to authenticate with the NDIP platform.

@@ -64,7 +47,7 @@ For this tutorial, we will be using calvera-test.ornl.gov as our galaxy endpoint

    **Important:** For security reasons, it is recommended to avoid hardcoding your API key directly in your code. Using environment variables is a more secure and flexible approach.

## 4. Verify Your Setup
## 3. Verify Your Setup

To ensure your setup is correct, run the following command in your terminal within the `nova_tutorial` directory: