Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Add documentation #60

Merged
merged 7 commits into from
Aug 18, 2018
Merged

Add documentation #60

merged 7 commits into from
Aug 18, 2018

Conversation

cmfcmf
Copy link
Contributor

@cmfcmf cmfcmf commented Jul 11, 2018

  • cleanup README
  • cleanup LICENSE
  • write a bunch of docs

If you find any issues such as typos, feel free to directly push to this branch.

This fixes most of #25 and depends on #62 and #57.

@cmfcmf cmfcmf changed the title WIP: Cleanup README and LICENSE Cleanup README and LICENSE Jul 19, 2018
README.md Outdated
[![Coverage Status](https://coveralls.io/repos/github/frederike-ramin/gamification/badge.svg?branch=coveralls)](https://coveralls.io/github/frederike-ramin/gamification?branch=coveralls)
# gamification
[![Build Status](https://travis-ci.com/schul-cloud/gamification.svg?branch=master)](https://travis-ci.com/frederike-ramin/gamification)
[![Coverage Status](https://coveralls.io/repos/github/schul-cloud/gamification/badge.svg?branch=coveralls)](https://coveralls.io/github/frederike-ramin/gamification?branch=coveralls)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link still points to the old repository

README.md Outdated
## Testing

Simply run `npm test` and all your tests in the `test/` directory will be run.
Run `npm test` to run all tests. Use `npm coverage` to run tests and generate coverage.
Copy link
Contributor

@corinnaj corinnaj Jul 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change this to: "Run npm test to run all linters and tests. Use npm coverage to also generate coverage."
I find that makes it a bit clearer, especially since tests won't even run if the linter fails.

@coveralls
Copy link

coveralls commented Aug 7, 2018

Pull Request Test Coverage Report for Build 78

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.533%

Totals Coverage Status
Change from base Build 72: 0.0%
Covered Lines: 278
Relevant Lines: 282

💛 - Coveralls

@cmfcmf cmfcmf changed the title Cleanup README and LICENSE Add documentation Aug 7, 2018
@cmfcmf
Copy link
Contributor Author

cmfcmf commented Aug 7, 2018

I've written a bunch of docs now. I'd welcome a review :)

Copy link
Contributor

@corinnaj corinnaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Thank you! I made some comments, most of which are nitpicking, but also some questions on parts I wasn't sure about.

README.md Outdated
## About
This project provides a microservice to manage gamification for your
application. It does not provide any graphics or pre-defined content, but
only a backend REST api. At its core, the service listens to events sent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API is spelled in all caps

README.md Outdated
- the user reached 10 XP
- the user achieved the FooAchievement
- a FooEvent is received

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention that a combination of rules can be required for an achievement. (e.g. user has 10 XP and FooAchievement)

README.md Outdated
Each user has a level. The user starts at level 1 and can never go below that.
The level is strictly tied to the user's main xp "XP". The required xp for each
level can be configured to either be linearly increasing, exponentially
increasing, or completely custom-defined. The level is not stored anywhere but
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double space

README.md Outdated
are granted, these are persisted to MongoDB. It is planned to also send an event
back to RabbitMQ when an achievement or xp are granted.

The gamification service also provides a (mostly) readonly REST api, which can
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read-only instead of readonly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh. Must've used too much TypeScript lately 💃

README.md Outdated
Define the different xp-pools there are within your application.
The "XP" xp-pool is always defined.

Note: This section is not yet used anywhere within the gamification service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've rewritten the paragraph to be more clear (I hope):

Note: The xp-pool names defined here are not currently validated by the
configuration parser, i.e. not specifying the available xp-pools or specifying
additional xp-pools does not raise an error currently. It is, however, planned
to validate the configuration more thoroughly, which would then raise an error
if you use an xp-pool not defined here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that makes it clear to me. 👍

README.md Outdated
You can send events manually in the *Exchanges* section. Select the exchange and then publish your message at *Publish message*. Don't forget to insert the *routing key*.
Define when to increase a user's level based on their XP. The level is
always purely based on the user's current XP. Each user, regardless of this
configuration, always starts at level 0. That means that the first
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be Level 1?

README.md Outdated

1. Achievements: The achievements service handles achievement data and stores
granted achievements in the `achivements` collection. Each row consists of the
`user_id`, the `name` (achievement name), `amount` (how often the user has
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be current_amount and total_amount? In other sections, you already talk about maxAwardedTotal, so the new values from your PR should also be included here.

README.md Outdated

Simply run `npm test` and all your tests in the `test/` directory will be run.
This project provides two `docker-compose` files, one meant for development and
one meant for production. The
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of this sentence is missing.

@cmfcmf
Copy link
Contributor Author

cmfcmf commented Aug 8, 2018

Thank you for your remarks, @corinnaj! I don't think you were being too nit-picky. 😃 I've addressed them in 6f8a788.

cmfcmf added a commit that referenced this pull request Aug 8, 2018
I've cherry-picked this commit from #60, so that #60 is only about docs.
Copy link
Contributor

@frederike-ramin frederike-ramin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good job, thanks a lot, @cmfcmf!

@cmfcmf cmfcmf merged commit 9dfa3c5 into master Aug 18, 2018
@cmfcmf cmfcmf deleted the chore/repo-cleanup branch August 18, 2018 20:00
@cmfcmf cmfcmf mentioned this pull request Aug 18, 2018
5 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants