Skip to content

Commit

Permalink
Open Sourcing (#97)
Browse files Browse the repository at this point in the history
* Add terminate script

* Add terminate script

* add unittest for terminate

* add unittest for terminate

* fix unittest for terminate

* fix issue where it was not deleting second test username

* check credentials before displaying message???

* Added Julian Moskovits to contributors list

* only print the necessary messages???

* Added quickstart

* Added setup file

* Switched to Jumpstarter

* Fixed zip url

* Added monkey patch for print

* Partial fix

* Added file redact

* Delete instances.txt

* Better gitignore + removed cache

* Rename Start to Starter

* Update README.md

* Update README.md

* refactor for format

* include a print_to_screen func

* move print_to_screen() to helper file

* add a test for string_to_print()

* Delete instances.txt

* Update .gitignore

* Update .gitignore

* Update CONTRIBUTING.md

* Update README.md

* Fixed paths

* Updated danger

* Updated danger

* Updated danger (#87)

* fix empty GPA

* Run Local (#84)

* Added ability to run locally

* Added guide to PULL_REQUEST_GUIDE

* Update README.md

* Update README.md

* Create CONTRIBUTING_FAQ.md

* Create VISION.md

* API Shift (#85)

* Big clean up

* Added cunyfirstapi to dep.pip

* Updated headers

* Updated PR readme

* Updated initgn with api

* Api stuff

* updated readme style

* Update CONTRIBUTING.md

* Update PULL_REQUEST_GUIDE.md

* Added tests

* Updated import

* Fixed dep install

* Finally fixed test checker

* Update bitrise.yml

* Update README.md

* Update README.md

* Create .hound.yml

* Update bitrise.yml

* cleaning DS.Store out

* constant misspelled (#95)

* Open source (#96)

* Fixed starter

* Updated php

* Updated readme

* addes the new CunyFirstAPI

* Fixed helper + grades

* Major fixing, connected back up with API
  • Loading branch information
Huddie authored Jan 20, 2019
1 parent 84bae6e commit 57c6c52
Show file tree
Hide file tree
Showing 59 changed files with 802 additions and 457 deletions.
124 changes: 120 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,121 @@
**/logs
**/instances.txt
**/test-instances.txt
**/.DS_Store
**/__pycache__/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
./logs
./instances.txt
./test-instances.txt
./__pycache__
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
2 changes: 2 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python:
enabled: true
12 changes: 8 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<center><img src=http://icons.iconarchive.com/icons/icons8/windows-8/512/Files-Add-File-icon.png width=50>

# Contributing Guide
</center>
<p align="center">

<img src=http://icons.iconarchive.com/icons/icons8/windows-8/512/Files-Add-File-icon.png width=50>
<br>
<h1 align="center">Contributing Guide</h1>
</p>
<br>


## Reporting A Problem
Expand All @@ -28,7 +32,7 @@ First off, thanks!

Don't hesitate to reach out for help. Simply comment on the issue and someone will help you out.

**Step 4:** Once you think you've solved the issue and are ready to have your changes incorperated into the master, check out the [Pull Request guide]().
**Step 4:** Once you think you've solved the issue and are ready to have your changes incorperated into the master, check out the [Pull Request guide](https://github.com/Huddie/Grade-Notifier/blob/master/PULL_REQUEST_GUIDE.md).

Again, if you have any question, feel free to reach out and thanks for your future contributions!

Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTING_FAQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Contributing FAQ

These questions and answers have been added by other contributors who got stuck along the way. If you get stuck and then figure out the answer, add your question and answer here to help others.

### Q1: How do I update a Pull Request I made?

Each pull request is linked to one of your branches. For example: You may be requesting a pull from your `master` branch. Regadless, to update a pull request simply push changes to that branch in which the pull request is coming from.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
| Ehud Adler | Tue Jan 8 13:51:48 PST 2019 |
| Bitrise Bot | Tue Jan 8 13:53:09 PST 2019 |
| ericshermancs | Tue Jan 8 17:04:12 PST 2019 |
| Julian Moskovits | Wed Jan 9 15:31:39 PST 2019 |
14 changes: 5 additions & 9 deletions Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ if github.pr_title.include? "[WIP]"
# auto_label.delete("WIP")
end

forgot_tests = !git.modified_files.include?("src/tests/tests.py")

forgot_tests = git.modified_files.grep(%r{tests.py}).empty?
if forgot_tests and not declared_trivial
warn("It appears that you forgot to add a Unit Test to the test file.\n Please add a test and upload the new version.\n The test file can currently be found at: ./src/tests/test/.py")
if forgot_tests
warn('It appears that you forgot to add a Unit Test to the test file.\n Please add a test and upload the new version.\n The test file can currently be found at: ./src/tests/tests.py\n If this is a "trivial" change add #trivial to the title')
else
message("Thanks for remembering to add a test!")
end

## Unit Tests
Expand All @@ -55,9 +57,3 @@ if not unit_text.include?('OK')
else
message("All Unit Test Passed! 🤟")
end






3 changes: 2 additions & 1 deletion Depfiles/dependencies.pip
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ twilio
requests
pylint
python-dotenv
colorconsole
colorconsole
cunyfirstapi
2 changes: 1 addition & 1 deletion Depfiles/depinstall.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
while read p; do
pip3 install $p
pip3 install $p -U
done < ./Depfiles/dependencies.pip

while read p; do
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ GEM
no_proxy_fix
octokit (~> 4.7)
terminal-table (~> 1)
danger-auto_label (1.3.1)
danger-plugin-api (~> 1.0)
danger-commit_lint (0.0.6)
danger (~> 5.0)
danger-pep8 (0.0.5)
danger-plugin-api (~> 1.0)
danger-plugin-api (1.0.0)
danger (> 2.0)
danger-todoist (1.3.0)
danger-plugin-api (~> 1.0)
danger-welcome_message (0.0.1)
danger-plugin-api (~> 1.0)
faraday (0.15.3)
Expand Down Expand Up @@ -58,9 +58,9 @@ PLATFORMS

DEPENDENCIES
danger
danger-auto_label
danger-commit_lint
danger-pep8
danger-todoist
danger-welcome_message

BUNDLED WITH
Expand Down
34 changes: 31 additions & 3 deletions PULL_REQUEST_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<center><img src=https://camo.githubusercontent.com/98ac5a9047bbf6a063e667a933cc056ea3e627a6/68747470733a2f2f6d617863646e2e69636f6e73382e636f6d2f416e64726f69645f4c2f504e472f3531322f50726f6772616d6d696e672f70756c6c5f726571756573742d3531322e706e67 width=50>
<p align="center">

# Pull Request Guide
</center>
<img src=https://camo.githubusercontent.com/98ac5a9047bbf6a063e667a933cc056ea3e627a6/68747470733a2f2f6d617863646e2e69636f6e73382e636f6d2f416e64726f69645f4c2f504e472f3531322f50726f6772616d6d696e672f70756c6c5f726571756573742d3531322e706e67 width=50>
<br>
<h1 align="center">Pull Request Guide</h1>
</p>
<br>

Welcome back! Congrats on getting to this point!
Expand All @@ -17,9 +19,35 @@ Before making a Pull request try to make sure you've checked off the quick check
* You didn't forget a #TODO inside your code
* You followed the [PEP8](https://www.python.org/dev/peps/pep-0008) or equivalent for the language your programming in styleguide
* Your code passes the unit tests
* Test your code locally (See below)
* Your code contains a new unit test (for your new addition) that passes
* If you've added a new remote import (not builtin) you've included that import in its proper dependencies file (example: dependencies.pip)

## Adding a new file
If your PR requires a new file to be added please make sure it begins with the header

Don't forget to update the filename

```python
###***********************************###
'''
Grade Notifier
File: <filename>.py
Author: Ehud Adler
Core Maintainers: Ehud Adler, Akiva Sherman,
Yehuda Moskovits
Copyright: Copyright 2019, Ehud Adler
License: MIT
'''
###***********************************###
```

## Testing code locally
To test the website locally navigate into the top-level directory

Then run `bash ./src/tests/run-local.sh`

Once the localhost server is running visit `http://localhost:8000` to view the website.

## Making the Pull Request

Expand Down
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Great question! Let me highlight a few of our strengths:
|---|---|
|🚨| Get Notifier when a new grade is posted |
|<img src=./Assets/CUNY-Logo.png width=30>| Available to all CUNY schools |
|📧| Works with email |
|📧| Works with email (coming soon...) |
|📱| Works with phone |
|| Save time|
|😰| Reduce stress|
Expand All @@ -38,15 +38,37 @@ There are currently 3 main ways you can help contribute:
2. Building out the script
3. DevOps, making sure the project doesn't hiccup

Check out the [contributing guide](https://github.com/Huddie/Grade-Notifier/blob/master/CONTRIBUTING.md).
### I want to contribute but...

Reach out [email protected] or [email protected]. We're happy to walk you through how git works, how the project is structured or anything else.

### Quickstart

> Requirements:
> - macOS/Linux
> - git installed
> - ruby installed (should come preloaded on those 2 OS)
If your looking to get going quickly checkout our Starter file. It can be downloaded here: [Grade-Notifier Starter file](https://gist.github.com/Huddie/e7e19d4f84a4e531944c25d6751cfe39/archive/77c0815b530659dde202b1d60f873e58a0c4d600.zip)


1. Make sure you have jumpstarter installed. If not type into your terminal (anywhere) `gem install jump-starter`

2. Have your Github username and password on hand.

3. Simply drag the Setup file (that you just downloaded) into the folder of your choice and run `jumpstart start` in your terminal (make sure your in the proper directory).

Thats it! Your good to go!

For a walkthrough of the non-quickstart approach check out the [contributing guide](https://github.com/Huddie/Grade-Notifier/blob/master/CONTRIBUTING.md).

## Open Source & Copying

We open source this repository for 2 main reasons:

1) We hope that a project like this will excite fellow students and give them a project to work on. We know getting started on projects can be tough and we hope this helps get you coding!

2) This project is susceptible to breakage at any point. Being that it relies on CUNYFirsts website the code and URL's are subject to changes and not in our control. For that reason, constent maintainence and updates could be necessary. As much fun as we had building this, we can't keep ontop of it.
2) This project is susceptible to breakage at any point. Being that it relies on CUNYFirsts website the code and URL's are subject to changes and not in our control. For that reason, constant maintainence and updates could be necessary. As much fun as we had building this, we can't keep ontop of it.

We have chosen to use the MIT License to allow students to make use of the code inside the project but **do not distribute this software commercially** paid or free.

Expand Down
24 changes: 24 additions & 0 deletions Starter
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
puts "\n\n"
puts "Hi There! ✌️".green
puts "Thanks for contributing to the Grade-Notifier 🚨!\n".green
puts "Our setup process is fairly basic but we'll walk you through it\n"
puts "So without further ado, Let's begin!\n\n".green
puts "We'll need you GitHub Username and Password to start".yellow
puts "Don't worry, we don't store either of them\n".yellow
print "GitHub Username: "
username = STDIN.gets.chomp
password = STDIN.getpass("GitHub Password: ")
puts "\n\n👍 Great!, Thanks!\n\n".green
puts "We'll start by forking the Grade-Notifier/GN-Core repo.\n"
puts "This could take a second so hold tight.\n".yellow
git fork "Grade-Notifier/GN-Core" --username=username --password=password
puts "👍 Fork Complete!\n\n".green
puts "Next up we're gonna clone your forked repo #{username}/GN-Core\n"
puts "This could take a second so hold tight.\n".yellow
git clone "GN-Core" --username=username
puts "👍 Clone Complete! Nice!\n\n".green
cd GN-Core
puts "Installing dependencies....\n".green
bash run ./Depfiles/depinstall.sh
puts "👍 Dependencies Installed! Nice!\n\n".green
puts "Done."
24 changes: 24 additions & 0 deletions VISION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@


# VISION

We have an ambitious goal of being a template, employed by multiple different schools.
We don't see this project staying specific to any school. The crux of the Grade-Notifier is 3 mains things:

1. Requesting the grades of a specific student
2. Checking if a change in that users grades
3. Notifying that user that a change has occured + what the changes are

Notice how not 1 of the 3 main purposes of the Grade-Notifier deals with actually getting those grades. (login, scraping etc...).
That job, we believe will ultimately be the job of a "Grade-Notifier-API". We hope to build the Grade-Notifier-API interface such that other developers
may, if they choose, implement the interface in a way that would enable Grade-Notifier to work for their school.

We additionally want to make setting up the project as easy as possible. That means deploying to their server of choice, updating the Grade-Notifier core when updates come out etc.

We believe that at the end of this project many schools will have a Grade-Notifier running backed by our Grade-Notifier core.
We also believe that this project and the projects that come from this project will help student, CS and otherwise,
get involved in their field and open them up to the world of open source.

We hope you join the project, and see out our vision with us.

Ehud.
Loading

0 comments on commit 57c6c52

Please sign in to comment.