Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from Whodiduexpect/v1.0.0-beta
Browse files Browse the repository at this point in the history
v1.0.0-beta changes
  • Loading branch information
Whodiduexpect authored Oct 7, 2019
2 parents 5e5c2ac + 7047f90 commit b86bb00
Show file tree
Hide file tree
Showing 11 changed files with 530 additions and 423 deletions.
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Introduction

First off, thank you for considering contributing to Assignment List.


### How can I help?

* Implementing features (the [feature tracker](https://github.com/Whodiduexpect/assignment-list/projects/1) is a good place to look for new features to implement)
* Fixing bugs (Github Issues is a good place to look)
* Correcting or clarifying the documentation
* Creating bug reports and feature requests through an [issue](https://github.com/Whodiduexpect/assignment-list/issues/new/choose)

# How to report a bug

Before reporting a bug:
1. Make sure that the issue is caused by Assignment List itself, and not one of its dependencies. For example, if the Student Vue data is incorrect, it is most likely the Student Vue Parser at fault. However, if you're unsure if the issue is caused by Assignment List or one of its dependencies, treat it as if it was an Assignment List issue.
2. Make sure that the "bug" that you are experiencing is a bug and not an error of incorrect installation. If you are having trouble getting Assignment List working, create an issue but don't label it a bug report.

To report a bug, create an issue and select the "Bug Report" template and fill out the different sections if applicable.

# How to suggest a feature or enhancement

To suggest a feature or enhancement, create a normal issue to suggest it. Once the feature or enhancement has been approved, it will be added to the [feature tracker](https://github.com/Whodiduexpect/assignment-list/projects/1), where you can check the progress of its implementation.


# Code Conventions
There are no strict rules or anything, just try to follow [PEP8](https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds).
## Tests
Since I'm pretty sure nobody is going to give their credentials for tests, tests don't test the main functionality of Assignment List and are more used to make sure certain aspects still work (ex: the help screen). Even though the tests might not test that Assignment List is entirely working, try to test essential aspects manually, or have someone else test it for you.
210 changes: 74 additions & 136 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,136 +1,74 @@
[![Build Status](https://travis-ci.org/Whodiduexpect/assignment-list.svg?branch=master)](https://travis-ci.org/Whodiduexpect/assignment-list)
# Assignment List
**PLEASE NOTE: Assignment list is still very much a work in progress**

Assignment list is an assignment organizing application for students that have a Student Vue web portal. It allows to keep track of a list of assignments and allows you to do things like mark assignments as completed and add new assignments that were not put on Student Vue. New features are planned to be implemented, for example, a reminder that allows you to remind you of a certain assignment on a specific day when you ask for the list of assignments.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine.

### Prerequisites

You will need Python 3.6 or later installed and working for this script to work.

### Installing

Clone the repository<br>
Example: Cloning the repository with Git
```
git clone git://github.com/Whodiduexpect/assignment-list.git
```

Install the dependencies

```
pip install -r requirements.txt
```

Start the script. (In this example, we'll use no arguments just to trigger the setup sequence without actually using it)

```
python assignment_list.py
```

If everything is working, you should see it output:
```
First time setup - Please enter your student id number, your password and your district domain separated by commas.
```
Enter your student id number, your password, and your district domain (the first part of your login URL) separated by commas.
(This is an example)
```
123456,mysupersecurepassword,https://portal.somedistrict.us
```
If you correctly entered your login details, it should output:
```
Did you mean to do something? Try adding the argument "--help"
```
### Demonstration
For this demonstration, let's follow through with that suggestion:
```
python assignment_list.py --help
```
```
usage: assignment_list.py [-h] [-c ASSIGNMENT_NUMBER] [-a "ASSIGNMENT TEXT"]
[-i "ASSIGNMENT TEXT"] [-l]
optional arguments:
-h, --help show this help message and exit
-c ASSIGNMENT_NUMBER, --complete ASSIGNMENT_NUMBER
Mark an assignment as complete
-a "ASSIGNMENT TEXT", --add "ASSIGNMENT TEXT"
Add an assignment not found in Student Vue
-i "ASSIGNMENT TEXT", --incomplete "ASSIGNMENT TEXT"
Mark a complete assignment as incomplete
-l, --list List to do assignments
```
Now, let's break it down:
* There are five commands
- "--help" or "-h" which shows this help screen
- "--complete" or "-c" which completes an assignment
- "--add" or "-a" which adds an assignment that is not present in Student Vue
- "--incomplete" or "-i" which marks a complete assignment as incomplete
- "--list" or "-l" which shows you the assignment list
#### Testing it out
Now let's test out these features.
First off, we check the assignments we have due:
```
python assignment_list.py --list
```
```
-- Assignment List --
1. Test assignment
2. Algebra assignment from Student Vue
```
Now that we have the list, we will mark the second one as complete:
```
python assignment_list.py --complete 2
```
```
Marked assignment #2 as complete
```
We then check the list again
```
python assignment_list.py -l
```
```
-- Assignment List --
1. Test assignment
```
It's gone! Let's try adding an assignment manually
```
python assignment_list.py --add "Some assignment that was not added"
```
```
Added assignment "Some assignment that was not added"
```
To make sure that what we did worked, let's check the list once again
```
python assignment_list.py --list
```
```
-- Assignment List --
1. Some assignment that was not added
2. Test assignment
```
Whoops! Turns out that algebra worksheet had a backside... Let's fix that
```
python assignment_list.py --incomplete "Algebra assignment from Student Vue"
```
```
Marked assignment "Algebra assignment from Student Vue" as incomplete
```
And if we pull up the list:
```
python assignment_list.py -l
```
```
-- Assignment List --
1. Some assignment that was not added
2. Algebra assignment from Student Vue
3. Test assignment
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
[![Build Status](https://travis-ci.org/Whodiduexpect/assignment-list.svg?branch=master)](https://travis-ci.org/Whodiduexpect/assignment-list)
# Assignment List

Assignment list is a terminal-based assignment manager for the Student Vue web portal. Assignment List is meant to replace the lack of features in Student Vue by giving tools to manage assignments, like a fancy integrated to-do list.

## Getting Started

These instructions will get you a copy of Assignment List up and running on your machine.

### Prerequisites

Assignment List works with Python 3.6 or later

### Installing

Clone the repository (with Git)

```
git clone https://github.com/Whodiduexpect/assignment-list.git
```

Change directory and install the dependencies

```
cd assignment-list
pip3 install -r requirements.txt
```
And now to test it:
```
python assignment_list.py
```
It should then prompt you with the initial setup. From there you can try listing the current assignments:
```
python assignment_list.py list
```
```
Assignment Assignment ID Class Name Due Date
0 Test Assignment #1 1111111 Last, F TESTCLASS I(1) 1/01/2019
1 Test Assignment #2 2222222 Last, F TESTCLASS II(2) 1/01/2019
2 Test Assignment #3 3333333 Last, F TESTCLASS III(3) 1/01/2019
```
For full usage instructions, see [USAGE.md](USAGE.md)

## Running the tests
Assignment List has rather primitive tests that you can run with pytest.
```
pip3 install pytest
```
```
pytest
```
### What do the tests do?
There are currently 2 basic tests:
* `help_screen_test.py`, which tests that the click help screen appears when no arguments are called
* `invalid_credentials_test.py`, which tests that Assignment List correctly handles situations where the Student Vue credentials are incorrect

These tests are mainly to make sure that Assignment List isn't completely broken, and don't test the core functionality of Assignment List.

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md)

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [releases on this repository](https://github.com/Whodiduexpect/assignment-list/releases).


## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

## Acknowledgments

* [Student Vue API, Unofficial Python API for StudentVue Portals](https://github.com/kajchang/StudentVue)
100 changes: 100 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Introduction

Running `python assignment_list.py` or `python assignment_list.py --help` shows a help message:
```
Usage: assignment_list.py [OPTIONS] COMMAND [ARGS]...
A Student Vue assignment manager
Options:
--help Show this message and exit.
Commands:
add Add a new assignment with the TITLE and DATE
complete Complete an assignment by assignment ID
list List assignments by CATEGORY (defaults to 'current')
reset Reset credentials
```
As you can see, there are 4 commands:
* add
* complete
* list
* reset

You can get a help message for each command by typing:
`python assignment_list.py COMMAND --help`
For example for the command add:

```
python assignment_list.py add --help
```
```
Usage: assignment_list.py add [OPTIONS] TITLE DATE
Add a new assignment with the TITLE and DATE
Options:
--help Show this message and exit.
```

# The `add` command

The `add` command adds an assignment to your list. It accepts the parameters `title` and `date`, it then asks you which period to add it to. If your title is more than a word long, you need to surround it with quotation marks.
Please note that the add command assigns an 8 digit number to the assignment, rather than the 7 digit Student Vue ID.
## Example usage
```
python assignment_list.py add "Assignment Title" 1/1/2019
```
```
Period 1 TESTCLASS I Taught by Test Teacher in Room 0
Period 2 TESTCLASS II Taught by Test Teacher in Room 0
Period 3 TESTCLASS III Taught by Test Teacher in Room 0
Period 4 TESTCLASS IV Taught by Test Teacher in Room 0
Period 5 TESTCLASS V Taught by Test Teacher in Room 0
Period 6 TESTCLASS VI Taught by Test Teacher in Room 0
Period 7 TESTCLASS VII Taught by Test Teacher in Room 0
Which class period do you want to add the assignment "Assignment Title" to?
```
```
Which class period do you want to add the assignment "Assignment Title" to? 1
```
```
Successfully added assignment "Assignment Title"
```

# The `complete` command

The `complete` command completes an assignment and hides it from the regular list. It takes the `ID` of the assignment as a parameter.
## Example Usage
```
python assignment_list.py complete 1111111
```
```
Marked assignment #1111111 as complete
```

# The `list` command
The `list` command lists the assignments. Currently, it has 2 optional categories, which are `current` and `completed`. The reason these categories are optional is that by default it's `current`, as to not require an unnecessary long command.
## Example Usage
`python assignment_list.py list` OR `python assignment_list.py list current`
```
Assignment Assignment ID Class Name Due Date
0 Test Assignment #1 1111111 Last, F TESTCLASS I(1) 1/01/2019
1 Test Assignment #2 2222222 Last, F TESTCLASS II(2) 1/01/2019
2 Test Assignment #3 3333333 Last, F TESTCLASS III(3) 1/01/2019
```

# The `reset` command
The `reset` command resets the student vue credentials in the event that they are incorrect or you want to switch accounts.

## Example Usage
```
python assignment_list.py reset
```
```
-- Credentials setup/reset --
Please enter Student ID: 123456
Please enter password (hidden):
Please enter district login url: https://sis-portal.somedistrict.us
```
Loading

0 comments on commit b86bb00

Please sign in to comment.