GithubHelp home page GithubHelp logo

codewars-1's Introduction

Requirements Status Build Status

codewars

Codewars Kata Python solutions

Project Structure

  • python2 - Python 2 katas
  • python3 - Python 3 katas
  • tests - tests for both language version katas and utils
  • utils - simple scripts I wrote to handle the project routines

Prerequisites

  • Old katas use Python 2, new katas - Python 3
  • Requirements: pip install -r requirements.txt (virtual environment is strongly suggested)

System Variables

Utilities and utility tests requires Codewars API key. Store it inside utils/envs.py:

touch utils/envs.py
echo "ACCESS_KEY='<your_api_key>'" > utils/envs.py

Tests

I use pytest to run test suit. Unfortunately it's impossible to switch to nose or unittest because pytest syntax is heavily used (fixtures, parametrization and so on). Still you can freely write unittest-style tests if needed - pytest understands it correctly. Flag --doctest-modules is also used to analyze doctests (there're few here and there).

For syntax style validation pylint is used.

Language version will be auto selected according to active virtual environment.

Unit and Doc Tests

invoke test

Syntax Validation

invoke syntax

Utils

Active

  • invoke new <slug> - creates new solution and test files depends on the given kata slug (uses jinja2 and codewars API), for example: invoke new hello-world will be call codewars API to provide a description and difficulty level for the hello-world kata (you can check kata's slug in it's url). In case of success - hello_world.py and test_hello_world.py will be created in the corresponding folders (according to active Python version and kata difficulty level).

Dated

  • invoke update - updates dependencies of Python 2 and Python 3 pyenv virtual environments (codewars2 and codewars3).
  • invoke sort - was used to sort old kata files depends on the language version (uses codewars API and concurrent.futures for performance)

Contribution

All contributions are warmly welcomed! I would love to see better solutions, solutions to missing katas, error fixes, new automation scripts or additional docs. Please, do not hesitate if you consider your skill to be not that good, I'm also not a Senior Developer you know ๐Ÿ˜ At least we would have a nice discussion in your pull request! ๐Ÿ˜Š

Contacts

Feel free to contact me if you have any questions, problems with this repository or suggestions, I would love to help! ๐Ÿ˜Ž

codewars-1's People

Contributors

lancelote avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.