faboshka / secret-santa

A Secret Santa 🎅🎄 game which randomly assigns and notifies people to whom they should give a gift using Twilio's messaging API
The Unlicense
5 stars 0 forks source link
christmas secret-santa twilio

Secret Santa

The secret-santa package is a Secret Santa 🎅🎄 game which randomly assigns and notifies people to whom they should give a gift using Twilio's messaging API.

Test Workflow on Main Ruff

Table of Contents - [Secret Santa](#secret-santa) - [Why?](#why) - [But WHY is it over-engineered?](#but-why-is-it-over-engineered) - [Usage](#usage) - [Prerequisites](#prerequisites) - [Configs and Environment Needed](#configs-and-environment-needed) - [Installing the Dependencies](#installing-the-dependencies) - [Running](#running) - [Future Plans](#future-plans) - [Contributing](#contributing) - [So... How can I contribute?](#so-how-can-i-contribute) - [License](#license) - [Who](#who)

Why?

My friends and I wanted to have a Secret Santa party in our group, but didn't have the time to meet and draw names, so we wrote this code to have it draw the names and send each participant the name of whom he should give a gift to.

But WHY is it over-engineered?

I was bored. Truly bored!
And I know this could be written in one file - with a handful of code lines, but I wanted to try a few things out such as poetry, mkdocs, Google style docstrings, etc.
=> This is the result.

Usage

Prerequisites

To be able to install the project's dependencies, you need to have:

A few notes:

Configs and Environment Needed

To run this package, you need to have:

Installing the Dependencies

To install the dependencies with poetry installed, all you need to do is run:

poetry install

Running

To run the Secret Santa package / module, all you need to do after setting it up is run:

poetry run secret_santa

with the appropriate commands / arguments.

To see all the supported command-line arguments, run poetry run secret_santa --help.

The command-line arguments supported ```console ❯ poetry run secret_santa run --help Usage: secret_santa run [OPTIONS] run the secret santa game ╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ * --participants-path PATH path to the 'Secret Santa' participants JSON [default: None] [required] │ │ --env-path PATH path to the 'Secret Santa' environment [default: None] │ │ --show-arrangement --hide-arrangement show the final arrangement (participant -> receiver) [default: hide-arrangement] │ │ --logging-level [critical|error|warning|info|debug] logging level [default: info] │ │ --dry-run --no-dry-run run the program without actually sending the message [default: no-dry-run] │ │ --help Show this message and exit. │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ```

Future Plans

I can think of some things to add, such as:

If ever comes a time in which I'll be in a similar state to the one I was in writing this code, I may add these, but I don't see myself doing a lot with this package in the near future, however, if you like it and would like to add something, feel free to contribute.

Contributing

You could contribute code to the repository in many ways:

  1. Bug Reports: If you encounter a bug running the code, feel free to submit an issue.
  2. Bug Fixes: If there's a bug you encountered and would like to fix, or saw an issue you could fix, you're more than welcome fix it.
  3. Feature Code: If there's a feature that is , and you would like to code, you're also welcome.
    • In case you want to add a new feature, it would be advisable to raise the feature in an issue to be discussed beforehand.
  4. Optimization: If you see an opportunity to improve the code and decide to code it, I want to thank you for making the code better.

So... How can I contribute?

  1. Fork it.
  2. Create your feature branch, running the command git checkout -b my-new-feature.
  3. Make sure the tests pass as expected, and add some tests covering your changes.
  4. Document all functions and methods by the Google style docstrings
  5. Commit your changes, git commit -m "Added some feature".
  6. Push to the branch git push origin my-new-feature.
  7. Create a new Pull Request, merging from your my-new-feature to the main branch with a descriptive description of the changes made.

License

In the spirit of Christmas, I decided publish this code under the Unlicense License, to whomever may find it useful / want to use it (if someone ever will 😊.)


Who

The secret-santa project was originally developed by Fawzi Abo Shkara.