Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
/* TOM Toolkit Branding Colors */
/* --primary: #017792; /* TOM Toolkit logo colors */
/* --color-primary: #017792; */
/* --primary-light: #00a3c8; */

[data-theme="light"] {
--color-primary: #017792;
--color-header-background: #00a3c8;
}
[data-theme="dark"] {
--color-primary: #017792;
--color-background: #00a3c8;
}

div.partners {
text-align: center;
}

a.hs {
padding-right: 10%;
}

.toctree-l1 > a[href*="getting_started"] {
color: #017792 !important;
font-weight: bold;
}
Binary file added docs/_static/managing_data/data_upload_form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 0 additions & 29 deletions docs/brokers/index.rst

This file was deleted.

63 changes: 46 additions & 17 deletions docs/code/index.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,55 @@
Interacting with your TOM through code
======================================

.. toctree::
:maxdepth: 2
:hidden:
TOM systems provide a platform for automating some, if not all, of the day-to-day workflow of an
astronomical program. To that end, the Toolkit offers Application Programmable Interfaces (API) for
a number of key functions, and there are a number of options for automating workflows.

querying
automation
backgroundtasks
custom_code
../common/scripts
Automated Tasks
---------------

:doc:`Advanced Querying <querying>` - Get a couple of tips on programmatic querying with Django's QuerySet API
There are many tasks which often have to be executed on a regular schedule, such as looking for new potential
targets for instance. Rather than have to do this yourself, you can write a simple script called a ``management command``
which can be configured to run regularly as a cronjob.

:doc:`Automating Tasks <automation>` - Run commands automatically to keep your TOM working even when you
aren’t
This mechanism is also really helpful if you want to implementing code to analyse the data in the TOM without having to
build it into the user interface.

:doc:`Background Tasks <backgroundtasks>` - Learn how to set up an asynchronous task library to handle long
running and/or concurrent functions.
:doc:`Automating Tasks </code/automation>` describes how to implement a ``management command``, and a full list of the
TOM's built-in management commands can be found :doc:`here </api/management_commands>`.

:doc:`Running Custom Code Hooks <custom_code>` - Learn how to run your own scripts when certain actions happen
within your TOM (for example, an observation completes).
Asynchronous Tasks
------------------

:doc:`Scripting your TOM with Jupyter Notebooks <../common/scripts>` - Use a Jupyter notebook (or just a python
console/scripts) to interact directly with your TOM.
Sometimes functions can take a long time to complete, such as data reduction pipelines or queries to external services.
This can be an issue for browser-based systems like TOMs, because the browser has a timeout which may raise an error
before the task completes. Nevertheless, it is often desirable for a TOM system to be able to orchestrate these
tasks.

An asynchronous task is designed to mitigate this problem; it can be triggered to run in the background by the TOM, and
to return the expected output whenever it is ready. :doc:`Background Tasks </code/backgroundtasks>` describes how to set up
an asynchronous task library to handle long running and/or concurrent functions.

Advanced Queries
----------------

Django's QuerySet API provides a range of sophisticated and efficient tools for querying your TOM's database.
:doc:`Advanced Querying </code/querying>` explores some of the options in more depth.

Custom Code Hooks
-----------------

A code hook allows us to tell the TOM to perform a given function whenever a certain action is taken, such as clicking
a button or uploading a file. You can add your own customized functions to the TOM and define when they should
be called following the guidelines in :doc:`Running Custom Code Hooks </code/custom_code>`.

Python Scripts and Jupyter Notebooks
------------------------------------

You can also interact directly with your TOM from a Python script or Jupyter notebook, which provides a flexible way to
analysis the data. :doc:`Scripting your TOM with Jupyter Notebooks </common/scripts>` shows how.

API Reference
-------------

Full details of all TOM Toolkit functions can be found in the :doc:`API Documentation </api/modules>`.
Loading
Loading