Skip to content

Commit

Permalink
Merge pull request #342 from Boccca2014/update-docs
Browse files Browse the repository at this point in the history
Update Docs (Part 3)
  • Loading branch information
yesterd3v authored Jul 9, 2021
2 parents ad11b3f + d3f4571 commit d9709ef
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 35 deletions.
128 changes: 107 additions & 21 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,131 @@

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:
Examples of behavior that contributes to a positive environment for our
community include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior by participants include:
Examples of unacceptable behavior include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
## Enforcement Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@semester.ly. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
contact@semester.ly.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<p align="center"><a href="https://semester.ly" target="_blank"><img width="100"src="https://semester.ly/static/img/logo2.0-32x32.png"></a></p>
<p align="center"><a href="https://semester.ly" target="_blank"><img width="200" src="http://i.imgur.com/9mMP9bY.png"/></a></p>

<p align="center">
<a href="https://open.vscode.dev/jhuopensource/semesterly" target="_blank"><img src="https://open.vscode.dev/badges/open-in-vscode.svg" alt='Open in Visual Studio Code'/></a>
</p>

<p align="center">
<a href="https://travis-ci.com/jhuopensource/semesterly"><img src="https://api.travis-ci.com/jhuopensource/semesterly.svg?branch=master"></a>
<a href="https://www.gnu.org/licenses/gpl-3.0"><img src="https://img.shields.io/badge/License-GPL%20v3-blue.svg"/></a>
Expand Down
2 changes: 1 addition & 1 deletion docker-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ docker exec -it $(docker ps -q -f ancestor=semesterly) /bin/bash
docker exec -it $(docker ps -q -f ancestor=semesterly) shell

This will put you inside of the shell. Now you can get courses by running these commands:
python manage.py ingest jhu --term Spring --years 2018
python manage.py ingest jhu --term Fall --years 2021
python manage.py digest jhu
* Open a browser and visit https://jhu.sem.ly and hack away

Expand Down
4 changes: 4 additions & 0 deletions docs/advancedconfig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ In order for Semester.ly to run out of the box, we have included credentials to
'SOCIAL_AUTH_FACEBOOK_SECRET': ...,
'FB_TEST_EMAIL': ...,
'FB_TEST_PASS': ...,
'SOCIAL_AUTH_AZURE_TENANT_KEY': ...,
'SOCIAL_AUTH_AZURE_TENANT_SECRET': ...,
'SOCIAL_AUTH_AZURE_TENANT_ID': ...,
'STUDENT_SIS_AUTH_SECRET': ...,

#Not essential for testing, but can be filled in for advanced usage
...
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,4 @@
html_static_path = ['_static']

def setup(app):
app.add_stylesheet('theme_overrides.css')
app.add_stylesheet('css/theme_overrides.css')
2 changes: 1 addition & 1 deletion docs/environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Your Final Setup
~~~~~~~~~~~~~~~~
Great work. Your Semester.ly local environment is all setup.

Don't forget: **whenever you are working on Semester.ly** you should have one terminal running the server (via ``python manage.py runserver``), and one running webpack (via ``npm run watch``).
Don't forget: **whenever you're working on Semester.ly** you should have one terminal running the server (via ``python manage.py runserver``), and one running webpack (via ``npm run watch``).

.. note:: Don't forget to always work from your virtual environment! From the root directory, just execute ``source /venv/bin/activate`` to enter it.

Expand Down
6 changes: 4 additions & 2 deletions docs/learning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Learning The Stack
==================

.. note:: Learning a new thing can be scary. Especially when all you have are some docs and a massive code base to learn from. That's why we are here to help you learn, build, and contribute. Ask us questions! contact@semester.ly
.. note:: Learning a new thing can be scary. Especially when all you have are some docs and a massive code base to learn from. That's why we are here to help you learn, build, and contribute. Ask us questions at contact@semester.ly or on `Discord <https://discord.gg/txYbphsAV7>`_!

Our Stack
~~~~~~~~~~
Expand Down Expand Up @@ -50,4 +50,6 @@ For development, we use the BEM methedology (`learn about BEM here! <http://get

Learning Scraping/Parsing
#########################
Our own tutorial, coming soon!

Here's one `insightful article <https://codeburst.io/making-a-web-scraping-application-with-python-celery-and-django-23162397c0b6>`_.
And here's another `article <https://realpython.com/beautiful-soup-web-scraper-python/>`_!
11 changes: 6 additions & 5 deletions docs/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ Steps are below on getting your local development environment running:
docker-compose build
docker-compose up
The **build** command creates a local database and build of your source code.
The **up** command runs everything. Be careful not to build when you don't need to as this will destroy your entire database and you'll need to ingest/digest again to get your course data (which takes about 30 minutes).
The **build** command creates a local database and build of your source code.
The **up** command runs everything. Be careful not to build when you don't need to as this will destroy your entire database and you'll need to ingest/digest again to get your course data (which takes about 30 minutes).

You now have Semester.ly running. If this is the first time, you will want some data which done in the next step.

Expand All @@ -93,10 +94,10 @@ Steps are below on getting your local development environment running:

.. code-block:: bash
python manage.py ingest jhu --term Spring --years 2018
python manage.py ingest jhu --term Fall --years 2021
python manage.py digest jhu
7. Open a browser and visit https://jhu.sem.ly and hack away.
7. Open a browser and visit https://jhu.sem.ly or http://jhu.sem.ly:8000 (timetable view) and hack away. Visit http://localhost:8000 to view the landing page.
You can skip ahead to **Advanced Configuration** or **How it All Works** now.

Option 2: Setup using a Python Virtual Environment
Expand All @@ -121,7 +122,7 @@ To enter your virtual environment, execute the following code from your Semester
source venv/bin/activate
.. note:: Be sure to execute the above "source" command anytime you are working on Semesterly!
.. note:: Be sure to execute the above "source" command anytime you're working on Semesterly!

Check your OS info
~~~~~~~~~~~~~~~~~~
Expand Down
22 changes: 18 additions & 4 deletions parsing/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@
ignore_result=True
)
def task_parse_current_registration_period(schools=None, textbooks=False):
"""Parse semesters in current registration period."""
"""
Parse semesters in current registration period.
Args:
school (str, optional): School to parse.
textbooks (bool, optional): Flag to parse textbooks.
"""
schools = set(schools or ACTIVE_SCHOOLS)
for school in set(SCHOOLS_MAP) & schools:
# Grab the most recent year.
Expand Down Expand Up @@ -62,7 +68,13 @@ def task_parse_current_registration_period(schools=None, textbooks=False):

@task()
def task_parse_active(schools=None, textbooks=False):
"""Parse all semesters displayed to users (i.e. active semesters)."""
"""
Parse all semesters displayed to users (i.e. active semesters).
Args:
school (str, optional): School to parse.
textbooks (bool, optional): Flag to parse textbooks.
"""
schools = set(schools or ACTIVE_SCHOOLS)
for school in set(SCHOOLS_MAP) & schools:
if SCHOOLS_MAP[school].singe_access:
Expand All @@ -84,7 +96,8 @@ def task_parse_active(schools=None, textbooks=False):
ignore_result=True
)
def task_parse_textbooks(schools=None, all=False):
"""Parse textbooks for morst recent academic period.
"""
Parse textbooks for morst recent academic period.
Note that in some instances parsers parse textbooks
and courses at the same time.
Expand All @@ -96,7 +109,8 @@ def task_parse_textbooks(schools=None, all=False):

@task()
def task_parse_school(school, years_and_terms, textbooks=False):
"""Call the django management commands to start parse.
"""
Call the django management commands to start parse.
Args:
school (str): School to parse.
Expand Down

0 comments on commit d9709ef

Please sign in to comment.