Giter VIP home page Giter VIP logo

aocrunner's Introduction

Hi there ๐Ÿ‘‹

aocrunner's People

Contributors

caderek avatar dominiksipowicz avatar ianduvall avatar teofanis avatar valtism avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aocrunner's Issues

send/readme generation

i input my first answer on the aoc website, then found aocrunner and used it for my second answer.

the problem is, i can't send the answer in the cli

Type fetch or f - to fetch the input
Type send  or s - to send the solutions

โœ”  โ€ฆ s

Part 1:
Status: ALREADY COMPLETED or LOCKED

am i out of luck for day 1?

Template string multiline does not work on test input

Hi,

let me say thank you for this package first. I'm really enjoying it.
I found one issue with test input when using template literals. It looks like it adds some wierd whitespace or uses something als instead of \n when using multiline strings.
Had this issue on day03 part1.

part1: {
    tests: [
      {
       // works:
        input: `00100\n11110\n10110\n10111\n10101\n01111\n00111\n11100\n10000\n11001\n00010\n01010`,

        // does not work: (multiline string)
        input: `00100
        11110
        10110
        10111
        10101
        01111
        00111
        11100
        10000
        11001
        00010
        01010`,
        expected: 198,
      },
    ],
    solution: part1,
  },

Pulling existing stats?

Hello ๐Ÿ‘‹ I just discovered this, so can't push the last 6 solutions - is there a way to pull in the stats so far, i.e. stars completed, time finished for each part, etc to the README?

Add jest or similar test runner

Hi, would you be open to adding jest as a test runner and being able to make a .test.js file and have multiple test suites. I find that the single test runner in indes.js works but I would like to have multiple test assertions for multiple unit/functions. In the current scenario I have to run each function that i want to test within the single run function. Thoughts?

Node version 17 is required

with node 16.5.0 running npx aocrunner init has this error

file:///Users/bschulze/.npm/_npx/b3b346747336e290/node_modules/aocrunner/lib/io/copy.js:3
  fs.cpSync(fromDir, toDir, { recursive: true });
     ^

TypeError: fs.cpSync is not a function
    at copy (file:///Users/bschulze/.npm/_npx/b3b346747336e290/node_modules/aocrunner/lib/io/copy.js:3:6)
    at init (file:///Users/bschulze/.npm/_npx/b3b346747336e290/node_modules/aocrunner/lib/actions/init.js:43:3)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

when running with node 17.2.0 successfully created

Suggestion: `launch.json`

Would you be open for an optional VS Code setting available during setup ?

Scenario :
User runs npx aocrunner init and is presented with the setup wizard.
After the user has selected their language, package manager, folder, name etc... an optional question is asked:
Would you like to enable VS Code integration/launch.json settings ? (y/N). (Or something similar)

If the user specifies "Y", a new .vscode/launch.json file will be added.

This will allow the user to press (F5/Ctrl+F5) or select Run and have VS Code prompt them for the number of the day they want to run.

(Example picture below)

image
image

Let me know if you'd be open to something like this and I can open a PR.

Reducing spaces

Today, when I launch the prompt I get:
image

Could we imagine having a more concise output?

  • removing all empty lines?
  • Not run part2 when part one is not done? Run only part2 when part 1 is done?
  • remove completely the Total time?

All this by config? Or not?

Let me know what do you think :)

feature request: switch off running on real data

When I waork on my solution I usually want the code to be run on tests only and not on the real data. Can this be switched off? If I have several tests and some console.log debugging messages in my code, the run on real data usually sends lots of these messages and make debugging not so easy.

PS: Thanks for a great tool.

How can I add jest or mocha to this?

Hey,

I absolutely don't want to take up much of your time with this issue so please if it's totally out of scope just close it.

I've been using this runner and I really like it but with the strict ESM settings, I'm not really sure which package.json or tsconfig.json things I'd need to set to get tests working (initial attempts fell over relating to ESM).

If you happened to know how to set this up, or felt like it would be a useful addition to the runner as the exercises get trickier and testing smaller parts might be useful, that would be super awesome.

Cheers for the great project either way!

There is no "input.txt" file in the solution directory!

Same as issue #17 - Can't seems to make it work.
I tried updating the version to 1.9.2 but it didn't work. Tried with node v16.18.1 and node v19.2.0
Working on macOS Monterey, Intel i5 processor.

Can you please have a look? thanks! ๐Ÿ™๐Ÿผ

New User-Agent requirement

Per this thread on reddit from the creator of AoC, API requests may be completely blocked soon if they do not include an appropriate User-Agent header.

If you have any kind of tool, website, script, plugin, etc etc that sends requests to AoC, please include your contact information (like your email address) in the User-Agent header of every request. (That's the contact info of the person that maintains the code sending the automated requests, not the contact info of the person using your code.) I'm seeing a lot of abusive traffic from tools that just identify themselves as stuff like python-requests/x.y.z, so I'll probably be blocking User Agents like those entirely soon. Even better would be to also include a URL where I can see the tool, too; a good User Agent would be something like github.com/topaz/name-of-tool by [email protected].

Asking to install esbuild on each hot-reload

image

INPUT FOR AOC 2022 DAY 7 ALREADY FETCHED
Transpiling...

Need to install the following packages:
  esbuild
Ok to proceed? (y) y

  dist/day02/index.js         2.6kb
  dist/day05/index.js         2.2kb
  dist/day03/index.js         1.6kb
  dist/day04/index.js         1.3kb
  dist/day01/index.js         873b
  dist/day06/index.js         834b
  dist/day07/index.js         699b
  dist/template/index.js      423b
  dist/utils/index.js          34b
  dist/day02/index.js.map     5.3kb
  dist/day05/index.js.map     4.9kb
Transpiling...

Need to install the following packages:
  esbuild
Ok to proceed? (y) y

  dist/day07/index.js      699b
  dist/day07/index.js.map  1.5kb

โšก Done in 1ms

-- Day 7 ------------------------------

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.