diff --git a/.github/BUG_ISSUE.md b/.github/BUG_ISSUE.md new file mode 100644 index 0000000..7eae51e --- /dev/null +++ b/.github/BUG_ISSUE.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: Is something not working as expected? +title: "[Bug]: " +labels: bug +assignees: '' + +--- + +Hi! Thank you for taking the time to report a bug with PythonCode. + +Additionally, please note that this platform is meant for bugs in PythonCode only. +Issues regarding dependencies and libraries should be reported in their respective repositories. + + + +## Expected Behavior + + +## Current Behavior + + +## Possible Solution + + + +## Steps to Reproduce + + +## Context [OPTIONAL] + + diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..abecce4 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,69 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to make participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, 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. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +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 + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/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 +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our 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. + +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. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when +an individual is representing the project or its community in public spaces. +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. + +## Enforcement + +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. + +## 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 + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..2e6b663 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,72 @@ +# Contributing to PythonCode + +We welcome you to [check the existing issues](https://github.com/DRMPN/PythonCode/issues) for bugs or enhancements to work on. +If you have an idea for an extension to PythonCode, please [file a new issue](https://github.com/DRMPN/PythonCode/issues/new) so we can discuss it. + +Make sure to familiarize yourself with the project layout before making any major contributions. + +## How to contribute + +1. Fork the [project repository](https://github.com/DRMPN/PythonCode/): click on the 'Fork' button near the top of the page. This creates a copy of the code under your account on the GitHub server. + +2. Clone this copy to your local disk: + + ```bash + git clone git@github.com:YourUsername/PythonCode.git + ``` + +3. Create a branch to hold your changes: + + ```bash + git checkout -b my-contribution + ``` + +4. Make sure your local environment is correctly set up for development and that all required project dependencies are installed. + +5. Start making changes on your newly created branch, remembering to + never work on the ``master`` branch! Work on this copy on your + computer using Git to do the version control. + +6. To check that your changes haven’t broken existing tests and that new tests pass, run the tests. + +7. When you're done editing and local testing, run: + + ```bash + git add modified_files + git commit + ``` + + to record your changes in Git, then push them to GitHub with: + + ```bash + git push -u origin my-contribution + ``` + +Finally, go to the web page of your fork of the PythonCode repo, and click +'Pull Request' (PR) to send your changes to the maintainers for review. + +When creating your PR, please make sure to enable the "Allow edits from maintainers" option (known as maintainer_can_modify). +This allows the maintainers to make minor changes or improvements to your PR branch if necessary during the review process. + +(If it looks confusing to you, then look up the [Git +documentation](http://git-scm.com/documentation) on the web.) + +## Before submitting your pull request + +Before you submit a pull request for your contribution, please work +through this checklist to make sure that you have done everything +necessary so we can efficiently review and accept your changes. + +If your contribution changes PythonCode in any way: + +- Update the [README](https://github.com/DRMPN/PythonCode/tree/master/CS50/FinalProject/README.md) if anything there has changed. + +If your contribution involves any code changes: + +- Update the [project tests](https://github.com/DRMPN/PythonCode/tree/master/MIT newbie course/alphOrder and test MC.py) to test your code changes. + +- Make sure that your code is properly commented with [docstrings](https://peps.python.org/pep-0257/) and comments explaining your rationale behind non-obvious coding practices. + +## Acknowledgements + +This document guide is based at well-written contributung guide of [TPOT](https://github.com/EpistasisLab/tpot) and [FEDOT](https://github.com/aimclub/FEDOT) frameworks. diff --git a/.github/FEATURE_ISSUE.md b/.github/FEATURE_ISSUE.md new file mode 100644 index 0000000..1bebca0 --- /dev/null +++ b/.github/FEATURE_ISSUE.md @@ -0,0 +1,68 @@ +--- +name: Feature request +about: Want us to add any features to PythonCode? +title: 'enh: ' +labels: enhancement +assignees: '' + +--- + + + +## Summary + + + +## Motivation + + + +## Guide-level explanation + + + +## Reference-level explanation + + + +## Drawbacks + + + +## Unresolved Questions + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..b230f67 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,53 @@ + + + + + + + + + + + +--- + +## Checklist + +Please check all that apply (`x` inside `[ ]`): + +- [ ] I've performed a self-review of my code +- [ ] I've run linters and tests locally before submission +- [ ] I've added tests (if it's a bug, feature or enhancement) +- [ ] I've adjusted the documentation (if it's a feature or enhancement) + +## Summary + + + +## Context + + + +## Additional Notes + +Add any additional context for reviewers (questions, implementation details, suggestions): diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml new file mode 100644 index 0000000..2852b29 --- /dev/null +++ b/.github/workflows/black.yml @@ -0,0 +1,17 @@ +name: Black Formatter +'on': +- push +- pull_request +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Run Black + uses: psf/black@stable + with: + options: --check --diff + src: . + jupyter: 'false' diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml new file mode 100644 index 0000000..cb1ad47 --- /dev/null +++ b/.github/workflows/unit_tests.yml @@ -0,0 +1,29 @@ +name: Unit Tests +'on': +- push +- pull_request +jobs: + test: + name: Run Tests + runs-on: ${{ matrix.os }} + timeout-minutes: 15 + strategy: + matrix: + os: + - ubuntu-latest + python-version: + - '3.9' + - '3.10' + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip install -r requirements.txt && pip install pytest pytest-cov + - name: Run tests + run: pytest tests/ --cov=. + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 diff --git a/README.md b/README.md new file mode 100644 index 0000000..b65510e --- /dev/null +++ b/README.md @@ -0,0 +1,82 @@ +# PythonCode + +--- + +[![OSA-improved](https://img.shields.io/badge/improved%20by-OSA-yellow)](https://github.com/aimclub/OSA) + +--- + +## Overview + +PythonCode is a collection of diverse projects, with a central focus on interactive experiences. It allows users to engage in games, simulations, and problem-solving activities, notably through integration with the Discord platform for community interaction. + +--- + +## Table of Contents + +- [Core features](#core-features) +- [Installation](#installation) +- [Contributing](#contributing) +- [Citation](#citation) + +--- +## Core features + +1. **Discord Bot Integration**: The project implements a Discord bot using the lightbulb library, allowing interaction with Discord servers through commands. +2. **Slash Command Handling**: The bot supports slash commands and subcommands, enabling users to trigger specific actions within Discord using a structured command interface. + +--- + +## Installation + +Install PythonCode using one of the following methods: + +**Build from source:** + +1. Clone the PythonCode repository: +```sh +git clone https://github.com/DRMPN/PythonCode +``` + +2. Navigate to the project directory: +```sh +cd PythonCode +``` + +--- + +## Contributing + +- **[Report Issues](https://github.com/DRMPN/PythonCode/issues)**: Submit bugs found or log feature requests for the project. + +--- + +## Citation + +If you use this software, please cite it as below. + +### APA format: + + DRMPN (2020). PythonCode repository [Computer software]. https://github.com/DRMPN/PythonCode + +### BibTeX format: + + @misc{PythonCode, + + author = {DRMPN}, + + title = {PythonCode repository}, + + year = {2020}, + + publisher = {github.com}, + + journal = {github.com repository}, + + howpublished = {\url{https://github.com/DRMPN/PythonCode.git}}, + + url = {https://github.com/DRMPN/PythonCode.git} + + } + +--- diff --git a/MIT newbie course/ProblemSet4/test_ps4a.py b/tests/test_ps4a.py similarity index 100% rename from MIT newbie course/ProblemSet4/test_ps4a.py rename to tests/test_ps4a.py