|
| 1 | +# Intro to CLIs |
| 2 | + |
| 3 | +## Learning Goals |
| 4 | + |
| 5 | +- Use your Python skills to build an interactive command-line application. |
| 6 | +- Follow best practices in CLI design in Python. |
| 7 | + |
| 8 | +*** |
| 9 | + |
| 10 | +## Key Vocab |
| 11 | + |
| 12 | +- **Command Line**: a text-based interface that is built into your computer's |
| 13 | +operating system. It allows you to access the files and applications on your |
| 14 | +computer manually or through scripts. |
| 15 | +- **Terminal**: the application in Mac OS that allows you to access the command |
| 16 | +line. |
| 17 | +- **Command Shell/Powershell**: the applications in Windows that allow you to access |
| 18 | +the command line. |
| 19 | +- **Command-Line Interface (CLI)**: a text-based interface used to run programs, |
| 20 | +manage files and interact with objects in memory. As the name suggests, it is |
| 21 | +run from the command line. |
| 22 | + |
| 23 | +*** |
| 24 | + |
| 25 | +## Introduction |
| 26 | + |
| 27 | +Now that we're in the home stretch of Phase 3, it's time to prepare for your |
| 28 | +project. You will see the rubric for the project in the next page in this |
| 29 | +module, but before we get there, let's take some time to explore the format for |
| 30 | +the project: a **command-line interface** (or **CLI**). |
| 31 | + |
| 32 | +A CLI is a program that is run from the command-line and provides a text-based |
| 33 | +interface to allow you to carry out various tasks. While the functionality of |
| 34 | +CLIs is limited by the capabilities of Terminal (in Mac OS) and Command |
| 35 | +Shell/Powershell (in Windows), _everything you have learned in Phase 3 can be |
| 36 | +carries out through a CLI._ |
| 37 | + |
| 38 | +*** |
| 39 | + |
| 40 | +## Lesson Section |
| 41 | + |
| 42 | +Lorem ipsum dolor sit amet. Ut velit fugit et porro voluptas quia sequi quo |
| 43 | +libero autem qui similique placeat eum velit autem aut repellendus quia. Et |
| 44 | +Quis magni ut fugit obcaecati in expedita fugiat est iste rerum qui ipsam |
| 45 | +ducimus et quaerat maxime sit eaque minus. Est molestias voluptatem et nostrum |
| 46 | +recusandae qui incidunt Quis 33 ipsum perferendis sed similique architecto. |
| 47 | + |
| 48 | +```py |
| 49 | +# python code block |
| 50 | +print("statement") |
| 51 | +# => statement |
| 52 | +``` |
| 53 | + |
| 54 | +```js |
| 55 | +// javascript code block |
| 56 | +console.log("use these for comparisons between languages.") |
| 57 | +// => use these for comparisons between languages. |
| 58 | +``` |
| 59 | + |
| 60 | +```console |
| 61 | +echo "bash/zshell statement" |
| 62 | +# => bash/zshell statement |
| 63 | +``` |
| 64 | + |
| 65 | +<details> |
| 66 | + <summary> |
| 67 | + <em>Check for understanding text goes here! <code>Code statements go here.</code></em> |
| 68 | + </summary> |
| 69 | + |
| 70 | + <h3>Answer.</h3> |
| 71 | + <p>Elaboration on answer.</p> |
| 72 | +</details> |
| 73 | +<br/> |
| 74 | + |
| 75 | +*** |
| 76 | + |
| 77 | +## Instructions |
| 78 | + |
| 79 | +This is a **test-driven lab**. Run `pipenv install` to create your virtual |
| 80 | +environment and `pipenv shell` to enter the virtual environment. Then run |
| 81 | +`pytest -x` to run your tests. Use these instructions and `pytest`'s error |
| 82 | +messages to complete your work in the `lib/` folder. |
| 83 | + |
| 84 | +Instructions begin here: |
| 85 | + |
| 86 | +- Make sure to specify any class, method, variable, module, package names |
| 87 | + that `pytest` will check for. |
| 88 | +- Any other instructions go here. |
| 89 | + |
| 90 | +Once all of your tests are passing, commit and push your work using `git` to |
| 91 | +submit. |
| 92 | + |
| 93 | +*** |
| 94 | + |
| 95 | +## Conclusion |
| 96 | + |
| 97 | +Conclusion summary paragraph. Include common misconceptions and what students |
| 98 | +will be able to do moving forward. |
| 99 | + |
| 100 | +*** |
| 101 | + |
| 102 | +## Resources |
| 103 | + |
| 104 | +- [Resource 1](https://www.python.org/doc/essays/blurb/) |
| 105 | +- [Reused Resource][reused resource] |
| 106 | + |
| 107 | +[reused resource]: https://docs.python.org/3/ |
0 commit comments