这是indexloc提供的服务,不要输入任何密码
Skip to content

YisusChrist/codewars-solver

            Tests Passing    GitHub pull requests    License


Report Bug · Request Feature · Ask Question · Report security bug


Alt


codewars-solver is a Python package that allows you to solve Codewars katas from the command line and automatically submit them to the platform. Once the kata is solved, the program will automatically create a new file with the solution in the appropriate directory. It also allows you to upload the solution to your personal GitHub repository to keep track of your progress, share your solutions with the community and store your collection of solved katas.

All the functionalities can be described in the following steps:

  • 1. The program will ask you to enter your Codewars username and API key. This information will be stored in a configuration file in your system's configuration directory. This information is required to submit the solutions to the platform.

  • 2. The program will ask you to select the programming language you want to use to solve the kata. The program will then create a new file with the kata's name in the appropriate directory. The file will contain the kata's description and a template with the function to be implemented.

  • 3. Once the kata is solved, the program will automatically submit the solution to the platform and create a new file with the solution in the appropriate directory. The program will also ask you if you want to upload the solution to your personal GitHub repository. If you choose to do so, the program will create a new branch with the solution and open a pull request to merge the branch with the main branch.


Table of Contents

Requirements

Here's a breakdown of the packages needed and their versions:

Note

The software has been developed and tested using Python 3.11.4. The minimum required version to run the software is Python 3.6. Although the software may work with previous versions, it is not guaranteed.

Installation

From PyPI

codewars-solver can be installed easily as a PyPI package. Just run the following command:

pip3 install codewars-solver

Important

For best practices and to avoid potential conflicts with your global Python environment, it is strongly recommended to install this program within a virtual environment. Avoid using the --user option for global installations. We highly recommend using pipx for a safe and isolated installation experience. Therefore, the appropriate command to install codewars-solver would be:

pipx install codewars-solver

The program can now be ran from a terminal with the codewars-solver command.

Manual installation

If you prefer to install the program manually, follow these steps:

Warning

This will install the version from the latest commit, not the latest release.

  1. Download the latest version of codewars-solver from this repository:

    git clone https://github.com/yisuschrist/codewars-solver
    cd codewars-solver
  2. Install the dependencies:

    poetry install --only main
  3. Run the following commands to install codewars-solver in your /usr/bin/ directory:

    poetry run codewars-solver

The program can now be ran from a terminal with the codewars-solver command.

Uninstall

If you installed it from PyPI, you can use the following command:

pipx uninstall codewars-solver

Usage

To run the codewars-solver script, you can use the following command:

codewars-solver [OPTIONS]

where [OPTIONS] are the command line options described below:


Example of execution

Contributors

How do I contribute to codewars-solver?

Before you participate in our delightful community, please read the code of conduct.

I'm far from being an expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests!

We also need people to test out pull requests. So take a look through the open issues and help where you can.

See Contributing Guidelines for more details.

License

codewars-solver is released under the GPL-3.0 License.

Credits

This package was partially created with Cookiecutter and adapted from the @cjolowicz's Hypermodern Python Cookiecutter project template.

About

Solve Codewars katas from the command line and automatically submit them to the platform.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6