mitre

Create a Number Crunching CLI Tool

Implement a number crunching CLI utility which implements a unit converter, calculator, and area calculator. Write it in any language you'd like.

Working Agreement
link

A working agreement is essentially a promise to you or to your team on habits and processes you agree to follow while working on a project.

Tip: Try to incorporate as many of these habits as possible, as is they aim to reflect a real-world workflow vs just hacking away at something. They are designed to keep you organized and ensure you deliver a quality product.

optional
all_inclusive
circle
Error Handling and Feedback

As a developer, I agree to handle errors gracefully and provide feedback to the user.

Key Points
  • Implement error messages for invalid commands, missing arguments, or other user errors.
  • Ensure success messages for operations such as adding tasks or creating lists are distinct and easily visible.
  • Provide suggestions for correcting common errors to guide users in the right direction.
optional
all_inclusive
circle
Stories Must be Properly Tested

As a developer, I agree to ensure each story is properly tested. (A lot of times it can be a pain to test a CLI's tool main function, you'll understand when you get there, try your best, 100% code coverage is not required)

Key Points
  • Each story includes necessary unit testing.
  • Tests are run upon completion of a story.
  • All tests should pass before merge.
optional
all_inclusive
circle
Use Story Branches

As a developer, I agree to create a new git branch for each story I work on.

Key Points
  • Checkout a new branch for each story.
  • Development for a story is committed to the story branch.
  • Upon completion, create a PR to merge a story branch back into main.
  • If you are doing this project solo, you will be merging your own PRs.
(F) Project Setup and CLI Basics
link

Set up the basic structure of the NumberCruncher CLI tool, ensuring it's user-friendly and easy to navigate.

optional
circle
(S) Display Usage and Help Information

As a user, I want to view instructions and examples on how to use the NumberCruncher CLI tool, so that I can quickly understand the available s and commands.

Key Points
  • When I run the tool with the `-h` or `--help` option, it should display a clear and concise help message.
  • The help output should include examples of how to use each command and describe what each option does.
  • The tool should provide an error message if I enter a command incorrectly, along with a suggestion to view the help information.
optional
circle
(S) Running the CLI Tool

As a user, I want to easily run the NumberCruncher CLI tool, so that I can perform conversions, calculations, and other operations from my command line.

Key Points
  • I should be able to run the tool by entering `numcrunch` followed by the appropriate flags and values.
  • The tool should accept commands such as `length`, `weight`, `volume`, `temperature`, `time`, `speed`, `area`, `calc`, and `areacalc` for different operations.
  • The tool should prompt me with clear error messages if I fail to provide necessary arguments or provide them incorrectly.
optional
circle
(S) Check the Version

As a user, I want to check the version of the CLI tool, so that I know which version I am using.

Key Points
  • I should be able to view the tool's version by running the tool with the `-v` or `--version` option.
  • The tool should display the version number clearly and informatively.
(F) Unit Conversion
link

Perform unit conversions for various measurements, such as length, weight, volume, and more.

optional
circle
(S) Convert Length Units

As a user, I want to convert between different length units, so that I can easily compare measurements like inches, feet, meters, and kilometers.

Key Points
  • I should be able to convert length units by specifying `-command=length`, `-from`, `-to`, and `-value`.
  • The tool should support conversions between units like inches, centimeters, feet, meters, miles, kilometers, yards, and millimeters.
  • After entering the conversion command, I should see the converted value displayed clearly.
optional
circle
(S) Convert Weight Units

As a user, I want to convert between different weight units, so that I can easily compare measurements like pounds, kilograms, and grams.

Key Points
  • I should be able to convert weight units by specifying `-command=weight`, `-from`, `-to`, and `-value`.
  • The tool should support conversions between units like pounds, kilograms, ounces, grams, tons, metric tons, stone, and milligrams.
  • The result of the conversion should be displayed clearly and accurately.
optional
circle
(S) Convert Volume Units

As a user, I want to convert between different volume units, so that I can easily compare measurements like liters, gallons, and milliliters.

Key Points
  • I should be able to convert volume units by specifying `-command=volume`, `-from`, `-to`, and `-value`.
  • The tool should support conversions between units like gallons, liters, quarts, pints, cups, fluid ounces, and milliliters.
  • The tool should display the conversion result clearly, with the correct units.
optional
circle
(S) Convert Temperature Units

As a user, I want to convert between different temperature units, so that I can easily compare temperatures in Celsius, Fahrenheit, and Kelvin.

Key Points
  • I should be able to convert temperature units by specifying `-command=temperature`, `-from`, `-to`, and `-value`.
  • The tool should support conversions between Celsius, Fahrenheit, and Kelvin.
  • The result of the conversion should be displayed accurately, with appropriate rounding if necessary.
optional
circle
(S) Convert Time Units

As a user, I want to convert between different time units, so that I can easily compare durations in seconds, minutes, hours, and days.

Key Points
  • I should be able to convert time units by specifying `-command=time`, `-from`, `-to`, and `-value`.
  • The tool should support conversions between units like seconds, minutes, hours, days, weeks, and months.
  • The conversion result should be clear and precise.
optional
circle
(S) Convert Speed Units

As a user, I want to convert between different speed units, so that I can easily compare speeds in mph, km/h, and knots.

Key Points
  • I should be able to convert speed units by specifying `-command=speed`, `-from`, `-to`, and `-value`.
  • The tool should support conversions between units like mph, km/h, fps, m/s, and knots.
  • The conversion result should be displayed clearly.
optional
circle
(S) Convert Area Units

As a user, I want to convert between different area units, so that I can easily compare measurements like square feet, square meters, and acres.

Key Points
  • I should be able to convert area units by specifying `-command=area`, `-from`, `-to`, and `-value`.
  • The tool should support conversions between units like square feet, square meters, acres, hectares, square inches, and square centimeters.
  • The conversion result should be accurate and easy to understand.
(F) Calculator
link

Perform basic arithmetic operations like addition, subtraction, multiplication, and division.

optional
circle
(S) Perform Addition

As a user, I want to add two numbers, so that I can quickly calculate sums directly from the command line.

Key Points
  • I should be able to perform addition by specifying `-command=calc`, `-from=add`, `-value`, and `-value2`.
  • The tool should display the result of the addition operation clearly.
optional
circle
(S) Perform Subtraction

As a user, I want to subtract one number from another, so that I can quickly calculate differences directly from the command line.

Key Points
  • I should be able to perform subtraction by specifying `-command=calc`, `-from=subtract`, `-value`, and `-value2`.
  • The tool should display the result of the subtraction operation clearly.
optional
circle
(S) Perform Multiplication

As a user, I want to multiply two numbers, so that I can quickly calculate products directly from the command line.

Key Points
  • I should be able to perform multiplication by specifying `-command=calc`, `-from=multiply`, `-value`, and `-value2`.
  • The tool should display the result of the multiplication operation clearly.
optional
circle
(S) Perform Division

As a user, I want to divide one number by another, so that I can quickly calculate quotients directly from the command line.

Key Points
  • I should be able to perform division by specifying `-command=calc`, `-from=divide`, `-value`, and `-value2`.
  • The tool should handle cases where division by zero is attempted by displaying an error message.
  • The result of the division operation should be displayed clearly and accurately.
(F) Area Calculator
link

Calculate the area of different geometric shapes such as squares, circles, and triangles.

optional
circle
(S) Calculate Square Area

As a user, I want to calculate the area of a square, so that I can determine the size of square spaces directly from the command line.

Key Points
  • I should be able to calculate the area of a square by specifying `-command=areacalc`, `-shape=square`, and `-side`.
  • The tool should display the calculated area clearly.
optional
circle
(S) Calculate Circle Area

As a user, I want to calculate the area of a circle, so that I can determine the size of circular spaces directly from the command line.

Key Points
  • I should be able to calculate the area of a circle by specifying `-command=areacalc`, `-shape=circle`, and `-radius`.
  • The tool should display the calculated area clearly.
optional
circle
(S) Calculate Triangle Area

As a user, I want to calculate the area of a triangle, so that I can determine the size of triangular spaces directly from the command line.

Key Points
  • I should be able to calculate the area of a triangle by specifying `-command=areacalc`, `-shape=triangle`, `-base`, and `-height`.
  • The tool should display the calculated area clearly.