Git Product home page Git Product logo

cptk's Introduction

cptk's People

Contributors

pre-commit-ci[bot] avatar reala10n avatar talbii avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

talbii

cptk's Issues

Track memory usage of tests

Checking if the tests exceeded the time limit is easy. However, checking for memory usage is a bit more difficult

Add git integration

Users may want to commit and push their solutions. This is why we want to integrate git with cptk and provide the following options:

  • Automatically commit after submitting code to a single problem
  • Automatically push after submitting code to a single problem
  • Automatically commit before the end of a session (multiple problems)
  • Automatically push before the end of a session
  • Edit and customize commit messages

Examples of formats for commit messages:

Solved {number} problems
{'\n'.join(f''{p.name} - {p.url}" for p in problems)}
Solved {numberSolved}, Resubmitted {numberResubmitted}

etc.

Track intresting information

We can analyze the websites that the user visits, what problems he spends most of his time on, and what language he prefers!
This information can be interesting and in my opinion, gives cptk some extra points when compared to other competitive programming toolkits.
Although it sounds good, this feature may be too much for the simpler users, and we might want to consider adding it as an extra and optional dependency.

Clone problems to a temporary directory

Clone a problem into a new temporary directory. In this directory, run the preprocessor and other third-party plugin hooks, and only then copy the directory into the final destination (and raise warnings if some files are overwritten).

VSCode plugin using the `code` CLI

This issue proposes a new plugin to cptk that will interact with the code CLI and will extend the built-in feature-set of cptk.

Key features

  • Option to automatically open a file after cloning a problem (with pre-defined cursor location using code -g
  • Show test expected vs output using code -d

Use streams with `cptk test`

Currently, tests with large input and outputs will get loaded into memory and will take a very long time to compare.
We should use the output stream to compare the output of the execution to the expected output file online

Add support for login and submitting

Allow website plugins to make requests using a requests session managed and provided by the cptk core.
For login information, add support for a keys.cptk.yaml file that will contain information that is managed by website plugins.
The website plugin will define the model of their section in the keys.cptk.yaml file.
The session used by cptk will be stored locally (probably as a pickle, perhaps an encrypted pickle).

Support directory renaming

If the user renames the folder structure of already existing problems, cptk should be smart and create new problems with the same relative path in the new, renamed subdirectory.
For example, if there is a problem from cses.fi located inside introductory-problems/trailing-zeros and the user decides to rename the directory to something like intro/trailing-zeros, other problems from the "Introductory Problems" section in the problem set should be cloned into the new intro subdirectory instead of the old introductory-problems one.

Add support for multiple problem templates

The project configuration file, project.cptk.yaml, should allow a specification of a list of template paths.
If multiple templates are provided, the first template in the list will be the default one, but the user will be able to overwrite the default choice with other choice names when cloning or creating a new problem using the clone and create subcommands, using a click option.

Inconsistent slash usage in windows

When using the clone subcommand the resulting path is printed with inconsistent slashes, for example:

PS> cptk clone https://cses.fi/problemset/task/1068
D:\Projects\tomer-cptk\cses-fi/cses-problem-set/weird-algorithm/

Better unexpected error traceback

Currently, the traceback for unexpected errors lacks information and in my option, the default python one is better.
I would like to print out the default traceback (or something that is very similar to it) with an additional bold line that states that an unexpected error has occurred.

This solution is great for Python developers and users that aren't familiar with Python:

  • Python developers that are using cptk will be familiar with the default Python traceback and will be able to figure out what is the problem if they want to.
  • Other users will see the bold statement which states that an unexpected error has occurred, and then they will be able to report the issue if they want to.

The error message should also print some information about the current Python version, and information about the version of cptk.

Selenium session saving

Logging into the websites again and again every time can be quite annoying. To avoid it, we can:

  • Save the browser session, and load the same one every time cptk lanches.
  • Use the default session of the user, stored in
  • Store login credentials manually and automatically login for the user

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.