#cli #mars #coding #exercise #controlling #set #rovers

app rover-cli

A coding exercise in controlling a set of rovers on mars

1 unstable release

0.1.0 Aug 15, 2023

#166 in Robotics

MIT license

23KB
603 lines

rover-cli

A coding exercise in controlling a set of rovers on mars.


🛠 Installation

cargo install rover-cli

🔋 Usage

Print output to console:

rover-cli foo.txt

Save output to file:

rover-cli --output output.txt foo.txt

To see helpful information:

rover-cli --help

💭 Code Choices

  • --unbounded command flag is included to allow to the rover to exit the plateau.
  • isize is used to represent co-ordinates to allow the rover to pass (0, 0).
  • fs::read_to_string is used for simplicity over the more performant but more complex BufReader.
  • RoverControlSatellite is used for themeatic effect!

🔬 Testing

To run tests for the CLI:

cargo test

Testing Approach

Unit tests that cover basic functionality and possible branches are included, however as this is a coding exercise, 100% coverage has not been aimed for.

Generate Coverage Report

Setup

rustup component add llvm-tools-preview &&
cargo install cargo-llvm-cov

Usage

To create a coverage report:

cargo llvm-cov

To debug a coverage report:

cargo llvm-cov --html --output-dir coverage

Dependencies

~2–2.7MB
~50K SLoC

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy