Skip to content

Commit

Permalink
Resolve conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
bicarlsen committed Nov 16, 2020
2 parents 02df946 + 5ee7695 commit 17a6050
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions source/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Local Projects

Local and Hosted projects really only differ in how they store your data. Local projects use your file directory as a database, while the Hosted version uses the Thot server.

Local projects are just a set of folders and files on you computer. To tell Thot what a folder or file is you use an **Object File**. Object Files are just :ref:`JSON<json>` files that provide information to your project. There are three types of Object Files -- one for each component of a Thot projects.
Local projects are just a set of folders and files on you computer. To tell Thot what a folder or file is you use an **Object File**. Object Files are just :ref:`JSON<json>` files that provide information to your project. There are three types of Object Files -- one for each component of a Thot project.

.. warning::
A folder can be either a Container or an Asset, not both.
Expand Down Expand Up @@ -262,7 +262,7 @@ A simple python script for a local project may look something like
Testing Scripts
---------------

You can test your scripts using the ``LocalHost.dev_mode()`` function along with passing in a test container to act as the temporary root of your project.
You can test your scripts using the ``LocalProject.dev_mode()`` function along with passing in a test container to act as the temporary root of your project.

.. code-block:: python
Expand Down
12 changes: 6 additions & 6 deletions source/get_started/hosted_project-basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Let's save the changes we made by clicking the :badge:`Save, badge-primary` butt
Adding Levels
=============

We'll start by creating the Recipe A subtree. First click on the plus sign :fa:`plus-circle` to add a child Container to the project, and name it ``Recipe A``. Open the editor just as before by clicking on the pen icon. This time we'll set a few additional properties. First, set its type to ``recipe``. Next well add some metadata to the Container that we can use during the analysis.
We'll start by creating the Recipe A subtree. First click on the plus sign :fa:`plus-circle` to add a child Container to the project, and name it ``Recipe A``. Open the editor just as before by clicking on the pen icon. This time we'll set a few additional properties. First, set its type to ``recipe``. Next we'll add some metadata to the Container that we can use during the analysis.

.. admonition:: Metadata

Expand All @@ -79,7 +79,7 @@ Project Assets

As you've started to see, Thot's interface is designed to allow you to do the same thing in many ways. This allows you to work in the way that is most convenient to you. Let's see another way to add Assets to our project.

Switch to the Project Assets view by clicking on the Assets icon :fa:`file-image` in the tools panel. Here you can see a list of all the Assets in our project. We can also add Assets to the project, and associate them with Containers later. We'll add the Assets for Recipe B to the project now. Drag and drop the data files ``b1-data.csv`` and ``b2-data.csv`` to the designated area to add them. Just as we did before, set their type to ``noise-data``. Let's also change the names of the data to be a bit more descriptive. To do this double click on their name, opening up the editor. Let's names them ``A1 Data``, ``A2 Data``, ``B1 Data``, and ``B2 Data``.
Switch to the Project Assets view by clicking on the Assets icon :fa:`file-image` in the tools panel. Here you can see a list of all the Assets in our project. We can also add Assets to the project, and associate them with Containers later. We'll add the Assets for Recipe B to the project now. Drag and drop the data files ``b1-data.csv`` and ``b2-data.csv`` to the designated area to add them. Just as we did before, set their type to ``noise-data``. Let's also change the names of the data to be a bit more descriptive. To do this double click on their name, opening up the editor. Let's name them ``A1 Data``, ``A2 Data``, ``B1 Data``, and ``B2 Data``.

Return to the Container Tree view by clicking on its icon :fa:`sitemap` in the tools panels. Add Recipe B to the project, and Batches 1 and 2 to the recipe. Set Recipe B's type to ``recipe`` and add a string metadata with value ``B`` to it, just as we did for Recipe A.

Expand All @@ -100,9 +100,9 @@ We'll now add the analysis Scripts to our project. Go to the Project Scripts vie
+ recipe-stats.py -> Recipe Stats
+ recipe-comparison.py -> Recipe Comparison

Let now associate these Scripts with their respective Containers. We'll start with Recipe A > Batch 1. click on the pen to edit, and click on the :badge:`Add Script, badge-success` button. Select the ``Noise Stats`` Script and save the container. Do the same for the other batches. We'll then repeat the process for both recipes adding the ``Recipe Stats`` Script to them, and finally we'll add the ``Recipe Comparison`` Script to the root container at the top.
Let's now associate these Scripts with their respective Containers. We'll start with Recipe A > Batch 1. click on the pen to edit, and click on the :badge:`Add Script, badge-success` button. Select the ``Noise Stats`` Script and save the container. Do the same for the other batches. We'll then repeat the process for both recipes adding the ``Recipe Stats`` Script to them, and finally we'll add the ``Recipe Comparison`` Script to the root container at the top.

Finally we need to add a library dependency to our project. Our Scripts use the `Pandas <https://pandas.pydata.org/>`_ library, so we need to tell our project about this dependency. Open the Library view by clicking on the book icon :fa:`book`. Pandas is considered a remote library because we haven't uploaded it directly to our Thot account. To add is as a dependency in our project type ``pandas`` into the Name field and select ``Python`` as the language. You can leave the version blank, as we'll use the most recent version. Click the :badge:`Add Library, badge-success` button to add it to our project.
Finally we need to add a library dependency to our project. Our Scripts use the `Pandas <https://pandas.pydata.org/>`_ library, so we need to tell our project about this dependency. Open the Library view by clicking on the book icon :fa:`book`. Pandas is considered a remote library because we haven't uploaded it directly to our Thot account. To add it as a dependency in our project type ``pandas`` into the Name field and select ``Python`` as the language. You can leave the version blank, as we'll use the most recent version. Click the :badge:`Add Library, badge-success` button to add it to our project.

Great! That finished our project set up. We can ensure we have everything set up the way we want by going to the Container Tree view and changing the **Preview** of our Containers. Go through each of the options to verify the Containers have the desired properties and associations.

Expand Down Expand Up @@ -131,7 +131,7 @@ Let's open the Container editor for Recipe A. Here we see that we can download t

Click on the Batch 1 child to navigate to it. Here you'll see that we now have two versions of the Noise Statistics Asset that our script created. This is because the Noise Stats analysis ran twice on it: once when we analyzed Batch 1 itself, and again when we analyzed Recipe A. This is one of the key concepts in Thot -- analysis runs from the bottom of the tree upwards, allowing each higher level access to all the Assets below it.

Let's remove all the Assets we've created so far, then analyze the entrie project. Click on the trash can icon :fa:`trash` in the corner of the Asset preview card to remove it. You can navigate to Recipe A by scrolling to the top of the Container editor and clicking it in the breadcrumbs navigation, or by exiting the navigator and re-opening it for Recipe A. Let's also remove the Noise Stats Asset for Batch B.
Let's remove all the Assets we've created so far, then analyze the entire project. Click on the trash can icon :fa:`trash` in the corner of the Asset preview card to remove it. You can navigate to Recipe A by scrolling to the top of the Container editor and clicking it in the breadcrumbs navigation, or by exiting the navigator and re-opening it for Recipe A. Let's also remove the Noise Stats Asset for Batch B.

Finally, let's analyze the entire project. Select the Silent Fireworks Container, and analyze it. Let's download the entire project so we can browse all of our Assets. With the Silent Fireworks Container still selected, click the download icon :fa:`download`. Extract the zip file, and browse through the folders. When you download a Container it downloads it as a Local Thot project, which you can learn more about in the :ref:`Local Project: Basics <local_project_basics>` tutorial.

Expand All @@ -143,4 +143,4 @@ Summary

In this tutorial we learned the basics of creating and analyzing a Thot project. We began by creating a new project. We created our Container Tree, organizing our project. We added properties, notes, Assets, and Scripts to our Containers. We were able to add Assets both within the Container, and from the Project Assets view. To add Scripts we first added them in the Project Scripts view, then associated them with our desired Containers. Finally, we declared our project's dependencies in the Library view.

Once we saved our project we were taken to the Project view. From here we saw how we could modify our Containers, download Containers and Assets, and analyze our project.
Once we saved our project we were taken to the Project view. From here we saw how we could modify our Containers, download Containers and Assets, and analyze our project.

0 comments on commit 17a6050

Please sign in to comment.