Skip to content

Usage Guide

Arjun edited this page Mar 30, 2022 · 3 revisions

Usage guide WIP

This serves as the official SCE-CLI user guide.

What is this tool?

sce has many projects. This tool is used to configure, install, manage and run all of these projects.

Getting Started

Installation

  • going to be installable through pip

Setup

usage: sce.py setup [-h]

optional arguments:
  -h, --help  show this help message and exit
  • run sce setup in the location you want to store the sce projects
    • don't worry if you already have sce projects cloned: setup will ask you whether you want to link them to this tool!
    • Notice: if you run setup in a directory with existing sce projects, the tool will automatically link them.

Linking Projects

usage: sce link [-h] [-p PATH] project
sce.py link: error: the following arguments are required: project

Linking projects to the tool allows it to run and manage them. Run sce link in the directory of a clone of project. Optionally, you can specify the directory with -p instead of changing to it and running link.

Running Projects

usage: sce run [-h] [--service [SERVICE ...]] [--dbpath DBPATH]

optional arguments:
  -h, --help            show this help message and exit
  --service [SERVICE ...], -s [SERVICE ...]
                        SCE Service name
  --dbpath DBPATH       Specify a path for the volume used by MongoDB.

run the project. For --dbpath, see Mongo DB

Presubmit Checks

usage: sce.py presubmit [-h] [--project PROJECT [PROJECT ...]]

optional arguments:
  -h, --help            show this help message and exit
  --project PROJECT [PROJECT ...], -p PROJECT [PROJECT ...]
                        Project to run presubmit checks for.

This is mainly to run the tests of a project given by -p/--project

MongoDB

Ensure you have Docker Desktop installed and running (Windows/Mac) or have Docker installed and the daemon running (Linux), MongoDB can be run with:

sce run -s mongo

This will map MongoDB's data volume to the default path SCE-CLI/mongo/data/db directory. To override this option and use your own directory, do:

sce run -s mongo --dbpath {your path}