README.md 4.37 KB
Newer Older
wuruchi's avatar
wuruchi committed
# Autosubmit GUI
wuruchi's avatar
wuruchi committed
[![status](https://joss.theoj.org/papers/a8ac17f6c02fdf76098ac97ed3e09b22/status.svg)](https://joss.theoj.org/papers/a8ac17f6c02fdf76098ac97ed3e09b22)
wuruchi's avatar
wuruchi committed
# Table of Contents

1. [Overview](#Overview)
Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
2. [Installation](#installation)
3. [Testing](#testing)
4. [User Guide](#user-guide)
5. [Contributing](#contributing)
wuruchi's avatar
wuruchi committed

## Overview:
Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
**Autosubmit GUI** is a front-end software developed using [ReactJS](https://react.dev/) as the main framework This front-end software consumes most of the information it needs from [Autosubmit API](https://earth.bsc.es/gitlab/es/autosubmit-api), an API that retrieves information from an internal file system and databases that result from the execution experiments under [Autosubmit](https://earth.bsc.es/gitlab/es/autosubmit) on a High Performance Computing environment.
wuruchi's avatar
wuruchi committed

Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
These two systems, the **API** and the **GUI**, are independent. It is possible to replace **Autosubmit API** for another API that provides similar information. For that purpose, we provide with response examples (more details in the installation section) that can help the developer understand how the information is used in the components of the GUI. Furthermore, you can review the [Autosubmit API repository](https://earth.bsc.es/gitlab/es/autosubmit-api) to learn more about the API and find the current list of available requests.
Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
Full documentation: https://autosubmit-gui.readthedocs.io/en/latest/
wuruchi's avatar
wuruchi committed

wuruchi's avatar
wuruchi committed
## Installation
> **NOTE**
> This project has been created by using [Create React App (CRA)](https://create-react-app.dev/), so it is important to check CRA documentation to do changes on its deployment process.
wuruchi's avatar
wuruchi committed

First, clone the repository:
wuruchi's avatar
wuruchi committed

`git clone https://earth.bsc.es/gitlab/es/autosubmit-gui/`
wuruchi's avatar
wuruchi committed

Then, check if you are using the right recommended Node.js version of this project to be sure there is no conflict in its dependencies. This could be easily done by using the [Node Version Manager](https://github.com/nvm-sh/nvm) using: 
wuruchi's avatar
wuruchi committed

wuruchi's avatar
wuruchi committed

Install the needed dependencies using the [Node Package Manager](https://www.npmjs.com/):
wuruchi's avatar
wuruchi committed

wuruchi's avatar
wuruchi committed

Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
It's important that you configure this project before using it by using Enviroment variables. This can be easily done by creating a `.env` file on the project root directory.
wuruchi's avatar
wuruchi committed

Here is an example content of a `.env` file:
wuruchi's avatar
wuruchi committed

```bash
REACT_APP_AUTOSUBMIT_API_SOURCE=https://earth.bsc.es/autosubmitapi
```
wuruchi's avatar
wuruchi committed

Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
You can check the full list of the configuration variables here: https://autosubmit-gui.readthedocs.io/en/latest/configuration/index.html

> **NOTE**
> If you want to have different sets of `.env` files for different purposes (production, development, testing, etc), refer to the [Enviroment variables CRA documentation](https://create-react-app.dev/docs/adding-custom-environment-variables).
Now you are able to run the GUI locally using:
wuruchi's avatar
wuruchi committed

`npm start`

Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
Or build the project bundle by doing:

`npm run build`

Furthermore, if you want to set up it for production, please refere to the [Deployment CRA documentation](https://create-react-app.dev/docs/deployment).

wuruchi's avatar
wuruchi committed

wuruchi's avatar
wuruchi committed
## Testing
wuruchi's avatar
wuruchi committed

Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
The testing have been developed using [Cypress](https://docs.cypress.io/guides/overview/why-cypress).
wuruchi's avatar
wuruchi committed

Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
To start running the e2e and component tests you have to configure and run the GUI. Follow the installation guide above if needed.
wuruchi's avatar
wuruchi committed

Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
Then, you have to write a `.env.cypress` with the URL of your GUI and API like this:
wuruchi's avatar
wuruchi committed

Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
```bash
CYPRESS_BASE_URL=http://localhost:3000/
CYPRESS_EXTERNAL_API=http://127.0.0.1:8000
```
Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
Once done, you can run the tests by running `npm run cy:run` or interactively using `npm run cy:open`.
wuruchi's avatar
wuruchi committed

wuruchi's avatar
wuruchi committed
## User Guide
wuruchi's avatar
wuruchi committed

Luiggi Tenorio Ku's avatar
Luiggi Tenorio Ku committed
A user guide has been developed and published at https://autosubmit-gui.readthedocs.io/en/latest/userguide/index.html

We are constantly working on updating it considering the latest features.
wuruchi's avatar
wuruchi committed

wuruchi's avatar
wuruchi committed
## Contributing
wuruchi's avatar
wuruchi committed

Currently, the development of this software is under the `Autosubmit team` that belongs to the `Earth Science Department` of the `Barcelona Supercomputing Center`.
wuruchi's avatar
wuruchi committed

You can open issues in this repository using the `Email a new issue to this project` function, since user creation is currently restricted to only `BSC` members.
wuruchi's avatar
wuruchi committed
Most issues have been centralized in the [Autosubmit repository](https://earth.bsc.es/gitlab/es/autosubmit/-/issues), and you can check them there.

wuruchi's avatar
wuruchi committed
You are free (and encouraged) to clone this software and modify it to fit your needs. Moreover, the `BSC` is always looking for collaboration, so feel free to request support.