diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..d6042ec --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,120 @@ +# Contributor Covenant Code of Conduct + + +## Our Pledge + +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, 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 a positive environment for our community include: + 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 include: + 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 email address, without their explicit permission + Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +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. + +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 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 to the community leaders responsible for enforcement here. + +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. + +**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, version 2.0, +available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by Mozilla's code of conduct +enforcement ladder. + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..dbf76bc --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing + + +## Resources + +Here are some important resources: + + [Issues](https://github.com/thejackal360/Elena-Game-Engine/issues): for contributing bug reports and feature requests. + +## Submitting Changes + + Please send a [pull request to Elena-Game-Engine](https://github.com/thejackal360/Elena-Game-Engine/pulls) using the template provided. + + Always write clear log messages with your commits. + + Add sufficient comments to your code. + +## Testing + +When testing your code, use the same packages that are provided in the requirement files, namely: + + pyproject.toml for the primary dependencies of the software. + + requirements.txt for examples/demos. + +## Coding Conventions + + Use the [PEP 8](https://peps.python.org/pep-0008/) style guide for Python code. + + Try to remain consistent with existing code conventions in use. + diff --git a/README.md b/README.md index 72aebe3..2d5f42d 100644 --- a/README.md +++ b/README.md @@ -5,25 +5,41 @@ provides a *.json file listing all of the trivia questions for the module. The u within the chatbot. The Elena Python library can be used to organize and extend the trivia game. ## Dependencies -The following are the HTML/JS dependencies, included in the provided source code in the elena/ directory: +The following are the HTML/JS dependencies, included in the provided source code in the `src/elena/` directory: - jQuery 3.5.1 - Buefy - Bootstrap 5.1.3 - -The following are the Python dependencies, included in requirements.txt: + +The following are the Python dependencies, included in `pyproject.toml` and in +`requirements.txt` (used only for running the example): - torch==1.10.0+cpu - torchvision==0.11.1+cpu - torchaudio==0.10.0+cpu - - matplotlib == 3.3.4 - - flask == 2.0.0 - - gunicorn + - setuptools >= 40.0.4 + - wheel >= 0.29.0 + - matplotlib==3.8.1' + - flask==2.0.0 + - gunicorn==21.2.0 ## Usage -Please see app.py for an example of the Python app file. Within that file, the most important section of code is the object definitions. +Please see `src/example/app.py` for an example of the Python app file. +Within that file, the most important section of code is the object definitions. This is where the user organizes the trivia game's structure. +To make sure that the example runs smoothly please install the requirements +```bash +$ cd src/example +$ pip3 install -r requirements.txt ``` + +and then run the example +```bash +$ ./app.py --local +``` + + +```Python # Object Definitions # Create necessary objects for trivia game @@ -40,7 +56,7 @@ app = eFlask([mymod0, mymod1, mymod2], DOMAIN_NAME, ``` Most requests will be routed through a root route: -``` +```Python @app.eroute('/', methods=['POST', 'GET']) def root(mod): """ @@ -112,54 +128,6 @@ All trivia questions are json files mapping questions to answers. Please see sta Any game files go in static/js/games. See static/js/games in this repo for examples. The generated subjs and jsglobals files will go here. However, since those are generated by the Elena Python library, you don't need to think about them. The naming convention for the game files is (game name).js. Please do not give games names with spaces. The game file should contain a function with a val argument. The function should have the same name as the game file. val is a string, whose value is simply the last value the user entered in their textbox. -The default domain is "elena-heroku.herokuapp.com". Please change the DOMAIN_NAME constant in app.py to fit your Heroku project's domain. - -## Community Guidelines - -### Respectful and Inclusive Environment - -- Treat everyone with respect. Be considerate, understanding, and inclusive of diverse perspectives, backgrounds, and experiences. -- Avoid discriminatory language or behavior that may offend or exclude others. - -### Content Integrity and Appropriateness - -- Ensure that all content—lessons, questions, games, and discussions—adheres to community standards, maintaining accuracy and educational value. -- Content should be appropriate for all age groups and respectful of cultural differences. - -### Intellectual Property and Attribution - -- Respect intellectual property rights. Do not plagiarize content or violate copyright laws. -- Properly attribute sources, giving credit where it’s due. - -### Collaboration and Support - -- Encourage collaboration and constructive feedback. Help others, share knowledge, and support those seeking assistance. -- Keep discussions and interactions positive and helpful. - -### Security and Privacy - -- Do not share personal or sensitive information. Respect user privacy and the confidentiality of information shared within the community. -- Report any security concerns or vulnerabilities promptly. - -### Open Communication and Transparency - -- Engage in transparent and open communication. Discuss ideas, improvements, and issues in a constructive and clear manner. -- Notify moderators or administrators about any problems, disputes, or rule violations. - -### Use of Elena Python Library and Resources - -- Utilize the Elena Python library responsibly, ensuring proper organization and extension of the trivia game. -- Share knowledge and resources that could benefit the community while respecting the framework’s terms of use. - -### Reporting and Moderation - -- Report any violations or inappropriate behavior to moderators or administrators. -- Respect decisions made by the moderators regarding disputes, warnings, or content removal. - -### Continuous Improvement - -- Strive for continuous improvement and innovation within the framework. Encourage learning, growth, and the evolution of the project. - ## Platforms Tested The following are the browser/OS combinations on which the deployed Heroku site has been tested: