Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#12022] [#10623] Update development, troubleshooting, and process documentation #12358

Merged
merged 11 commits into from
Apr 9, 2023
147 changes: 103 additions & 44 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +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
* 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 teammates@comp.nus.edu.sg. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and 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.
reported to the community leaders responsible for enforcement at
teammates@comp.nus.edu.sg.
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 https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

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]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/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
24 changes: 24 additions & 0 deletions .github/DISCUSSION_TEMPLATE/help-requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
title: "Help Request: [summary of your problem]"
body:
- type: textarea
attributes:
label: "Environment"
description: "Describe your environment."
value: |
- **Commit SHA:** <!-- Result of running the command `git rev-parse HEAD` -->
- **Operating System:**
- **JDK Version:**
- **Node.js Version:**
- **Firefox / Chrome Version (if applicable):**
- type: textarea
attributes:
label: "Intention"
description: "Describe what you are trying to do or needing help for."
value: |
<!-- e.g. if you were setting up the project, tell us the step in the setting up guide at which you are stuck. -->
<!-- e.g. if you were resolving test failures, tell us which tests are failing. -->
<!-- Include information such as screenshots, error stack traces, or console messages to help us troubleshoot. -->
- type: textarea
attributes:
label: "Resolution Attempt"
description: "Tell us the steps you have taken to try to (unsuccessfully) resolve the problem and the outcomes."
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Go to the "Preview" tab and click on the relevant issue type to be redirected to

- [Bug reports](?template=bug-report.md)
- [Feature/enhancement requests, enhancement to build process](?template=feature-request.md)
- [Help requests](?template=help-request.md)
- [Data migration](?template=data-migration.md)

For other tasks (e.g. refactoring, adding tests, fixing typo), there is no template to follow. Simply provide a clear issue title and description of the work to be done.
Expand Down
23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE/help-request.md

This file was deleted.

11 changes: 11 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Security Policy

## Supported Versions

Due to the system's nature as a Software-as-a-Service (instead of installable libraries), only the latest released version will be considered for security patches.

## Reporting a Vulnerability

You may submit vulnerability reports to teammates@comp.nus.edu.sg.

We will strive to respond in 24 hours, and in the event of an accepted report, no more than 72 hours before providing an estimate resolution time.
34 changes: 34 additions & 0 deletions .github/workflows/jdk17.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Component Tests (JDK 17)

on:
push:
branches:
- master

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Run Backend Linting
run: ./gradlew lint --continue
component-testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Update Property File
run: mv src/test/resources/test.ci-ubuntu-latest.properties src/test/resources/test.properties
- name: Run Solr search service
run: docker-compose run -d -p 8983:8983 solr
- name: Run Backend Tests
run: ./gradlew createConfigs componentTests
26 changes: 19 additions & 7 deletions docs/CONTRIBUTING.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ We welcome contributions from anyone, in particular, students (see [here](https:

Understand what TEAMMATES is about, both as a product (users' point of view) and a project (developers' point of view).

* [Product intro page](https://teammatesv4.appspot.com) shown to potential users
* [Product intro page](https://teammatesv4.appspot.com) shown to potential users
* [Features overview](https://teammatesv4.appspot.com/web/front/features)
* [Project vision, challenges, and principles](overview.md)

Expand Down Expand Up @@ -56,17 +56,29 @@ Of course we are happy to guide you if you encounter any difficulties when doing

Although TEAMMATES uses many tools and technologies, you need not know all of them before you can contribute. The diagram below shows which technologies you need to learn to contribute in different roles.

![RolesAndTechnologies.png](images/RolesAndTechnologies.png)
| Tool | Web page Developer | Front-end Developer | Test Developer | DevOps Developer | Back-end Developer |
|:---------------------|--------------------|---------------------|----------------|:-----------------|:-------------------|
| Git | ✅ | ✅ | ✅ | ✅ | ✅ |
| HTML | ✅ | ✅ | | | |
| SCSS, Bootstrap | ✅ | ✅ | | | |
| Angular, TypeScript | | ✅ | ✅ | ✅ | |
| Jest | | ✅ | ✅ | | |
| Node.js | | | | ✅ | |
| Java | | | ✅ | ✅ | ✅ |
| Datastore, Objectify | | | | | ✅ |
| TestNG | | | ✅ | | ✅ |
| Gradle | | | | ✅ | |
| Selenium | | | ✅ | | |

Note that these roles are not fixed or formally assigned; it is simply for guidance only.

Roles:

* **Web page developer**: Works on static web pages, such as those used in the TEAMMATES product web site.
* **Front-end developer**: Works on the front-end of the app, i.e. the dynamically-generated user interface.
* **Test developer**: Works on automating system tests.
* **Back-end developer**: Works on the back-end logic of the app, including data storage.
* **DevOps developer**: Works on automations (CI, static analysis, scripting) and operations (logging, monitoring, troubleshooting).
* **Web page developer**: Works on static web pages, such as those used in the TEAMMATES product website.
* **Front-end developer**: Works on the front-end of the app, i.e. the dynamically-generated user interface.
* **Test developer**: Works on automating system tests.
* **Back-end developer**: Works on the back-end logic of the app, including data storage.
* **DevOps developer**: Works on automations (CI, static analysis, scripting) and operations (logging, monitoring, troubleshooting).

### Orientation task list

Expand Down
6 changes: 2 additions & 4 deletions docs/SUPPORT.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ If you are looking for support for TEAMMATES, check out:
* [For students](https://teammatesv4.appspot.com/web/front/help/student)
* [For instructors](https://teammatesv4.appspot.com/web/front/help/instructor)
* [Developer Documentation](https://teammates.github.io/teammates)
* [FAQs by external contributors](https://github.com/TEAMMATES/teammates/issues?utf8=✓&q=is:issue+label:a-DevHelp). Note that many of the questions asked and/or answers provided may have been outdated now.

If you want to reach out to the project team, the best way is to [post a message in our issue tracker](https://github.com/TEAMMATES/teammates/issues/new). Our issue tracker doubles as a discussion forum.
You can use it for things like asking questions about the project, the workflow, or requesting technical help.
* [FAQs by external contributors](https://github.com/TEAMMATES/teammates/discussions/categories/help-requests?discussions_q=). Note that many of the questions asked and/or answers provided may have been outdated now.

If you want to reach out to the project team, the best way is to [post a message in our discussion forum](https://github.com/TEAMMATES/teammates/discussions).
Alternatively (less preferred), you can email us at **teammates@comp.nus.edu.sg**.
2 changes: 1 addition & 1 deletion docs/best-practices/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The goal is to make the system as fully covered by automated tests as possible.
* **Write independent tests**: A test should have minimal to zero impact to global state/other tests that are running (possibly in parallel).
* **Write short tests**: It is better to have many `@Test`/`it` methods than to group all testing into one `@Test`/`it` method. This helps in debugging and rerunning failed tests.
* **Avoid redundant tests**: Be mindful of the cost of running a test. Do not add redundant tests.
* **Strive for 100% coverage**: Try to write tests to cover 100% of the functional code you wrote. We have configured JaCoCo for Java and Istanbul for TypeScript for your usage.
* **Strive for 100% coverage**: Try to write tests to cover 100% of the functional code you wrote. We have configured JaCoCo for Java and Jest for TypeScript for your usage.
* **Coverage is not enough**: Be mindful of missing test cases (e.g., boundary values). Just because you have 100% coverage does not mean the code is error free. You could have missed execution paths in the test and in the SUT at the same time.
* **Test at different levels**: Test units at unit level. Do not attempt to test lower level components from higher level functionality.
* **Testing private methods**: It is OK to omit testing private methods if they are fully covered by tests written against public methods of the same class. If the private method is complex enough to warrant its own test method, you can use reflection to access the private method from the test class.
2 changes: 1 addition & 1 deletion docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Architecture

![High Level Architecture](images/highlevelArchitecture.png)
<puml src="diagrams/highlevelArchitecture.puml"></puml>

TEAMMATES is a Web application that runs on Google App Engine (GAE). Given above is an overview of the main components.

Expand Down
Loading