If you haven't used GitHub yet, you might be confused about some words. Here are the two most important ones, with links, were you can view and make them:
- Issues can be bug reports (when something goes wrong) or feature requests (when you want something added)
- Pull Request/PR are where submits changes, can be code, text or locale.
If you have an idea to improve the bot, just request it as a feature in an issue.
Your issue should ideally contain:
- Your request (what you want to see added)
- Your reasoning (why factorion should have this, not necessary if obvious)
- Resources (links to further information of the concept, more for new mathematical constructs, like termials, arcfactorials and similar)
If you want to work on an issue, just fork the repo and start. Don't be intimidated by the size. If you are not able to write a part of a feature (be it the parsing, the math, or anything else) or only able to write one part, that's ok. Someone else can continue your work.
If you are confused, where in the code to work, Code Structure has an overview.
When creating a PR (requesting a review), just make sure:
- That the code compiles (
cargo build) - That your addition is tested (add unit tests and
cargo test) - That Clippy doesn't complain about your code (if possible,
cargo clippy) - To bump the version number (SemVer-ish, if you're unsure, just ask)
If you are not comfortable writing code but know some math, you can still contribute. Just write a comment on the issue in question with the formula and your reasoning. That is, in many cases, already a lot of help.
The math with reasoning and derivation is separately documented in Math.
Alternatively you can provide translations. While we prefer if you make a PR, you can also just put the locale json text in an issue. (Please put ```json ``` around the locale) If you have any problems making one, just put what you can in an issue, and we will go from there.
The locale file format is documented in Locale
You might want to check first if somebody else is already working on it, by looking in PRs and issues.
If you are confused, on what issues and PRs are, have a look at Github Intro
main: Program loop, executing steps, data saving/readingreddit_api: Interacting with Reddit (getting the comments, sending replies)influxdb: Sending stats
main: Connects to Discord and listens for messages.discord_api: Handles incoming messages and sends replies.influxdb: Sending stats
comment: Executing steps for individual comments, comment metadata, reply arrangement (notes)parse: Finding factorials in comments (with skipping URLs and spoilers), parsing numberscalculation_task: Calculating factorials in different formats (including nested), simple mathcalculation_result: Formatting of factorial results (different representations)lib: Imports/Exports, Combined initializerintegration: Integration tests (take a comment and do the whole pipeline)
lib: The mathematical formulas implemented