Giter Club home page Giter Club logo

check50's Introduction

check50

check50 is a testing tool for checking student code. As a student you can use check50 to check your CS50 problem sets or any other Problem sets for which check50 checks exist. check50 allows teachers to automatically grade code on correctness and to provide automatic feedback while students are coding.

You can find documentation and instructions for writing your own checks at https://cs50.readthedocs.io/projects/check50/.

check50's People

Contributors

brianyu28 avatar cmlsharp avatar curiouskiwi avatar dmalan avatar hljames avatar jelleas avatar jsarchibald avatar jul1u5 avatar leetfin avatar malikidreeshasankhan avatar mjdv avatar pazz avatar rongxin-liu avatar stgm avatar therijn 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  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

check50's Issues

pset3 check50 can fail code that actually works!

Hi, it's really great that students can see the check50 code.
For this file https://github.com/cs50/check50/blob/pset3/checks/cs50/2017/x/fifteen/checks.py
check50 overwrites the draw() function of the student. This causes errors if the student is tracking the blank cell in her draw() function.
See: https://cs50.stackexchange.com/questions/26421/pset3-fifteen-c-passes-local-tests-but-fails-check50-with-timeouts/26422
Suggest not overwriting the draw() function and perhaps looking at the log file (and logging invalid attempts?)
Thanks for a really great course!

Codec failure

Currently, if I run on the attached caesar.c:

check50 -d --offline cs50/2017/fall/caesar caesar.c

I get:

Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/check50.py", line 185, in excepthook
    cleanup()
  File "/usr/local/lib/python2.7/dist-packages/check50.py", line 170, in cleanup
    shutil.rmtree(config.tempdir)
  File "/usr/lib/python2.7/shutil.py", line 239, in rmtree
    onerror(os.listdir, path, sys.exc_info())
  File "/usr/lib/python2.7/shutil.py", line 237, in rmtree
    names = os.listdir(path)
OSError: [Errno 2] No such file or directory: '/tmp/tmpedXoxi'

Original exception was:
Traceback (most recent call last):
  File "/usr/local/bin/check50", line 9, in <module>
    load_entry_point('check50==2.2.2', 'console_scripts', 'check50')()
  File "/usr/local/lib/python2.7/dist-packages/check50.py", line 151, in main
    print_json(results)
  File "/usr/local/lib/python2.7/dist-packages/check50.py", line 250, in print_json
    print(json.dumps(output, cls=Encoder))
  File "/usr/lib/python2.7/json/__init__.py", line 251, in dumps
    sort_keys=sort_keys, **kw).encode(obj)
  File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
    return _iterencode(o, 0)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb4 in position 13: invalid start byte

My current fix is appending ".decode('latin-1')" to the end of this line:

"actual": result["rationale"].actual

The issue is that the incorrect student submissions shifts an ascii value outside of the 0-127 range. Not sure if my fix is the right thing to do, but works for the time being.

Error installing certificates on Mac

The following error is the result of running pip3 install check50 on MacOS 10.12 with pip3 --version giving pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6). Sudo does not fix this issue.

Collecting check50
Requirement already satisfied: pexpect in /usr/local/lib/python3.6/site-packages (from check50)
Requirement already satisfied: backports.shutil-which in /usr/local/lib/python3.6/site-packages (from check50)
Requirement already satisfied: requests in /usr/local/lib/python3.6/site-packages (from check50)
Requirement already satisfied: argparse in /usr/local/lib/python3.6/site-packages (from check50)
Collecting submit50 (from check50)
  Using cached submit50-2.4.2.tar.gz
Requirement already satisfied: termcolor in /usr/local/lib/python3.6/site-packages (from check50)
Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.6/site-packages (from pexpect->check50)
Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests->check50)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests->check50)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests->check50)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests->check50)
Requirement already satisfied: backports.shutil_get_terminal_size in /usr/local/lib/python3.6/site-packages (from submit50->check50)
Requirement already satisfied: six in /usr/local/lib/python3.6/site-packages (from submit50->check50)
Building wheels for collected packages: submit50
  Running setup.py bdist_wheel for submit50 ... error
  Complete output from command /usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/rz/ts_f_9513jz8q7xrwrhbtx5h0000gn/T/pip-build-dvp6y9e4/submit50/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/rz/ts_f_9513jz8q7xrwrhbtx5h0000gn/T/tmpfdyanzvdpip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  copying submit50.py -> build/lib
  installing to build/bdist.macosx-10.12-x86_64/wheel
  running install
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/rz/ts_f_9513jz8q7xrwrhbtx5h0000gn/T/pip-build-dvp6y9e4/submit50/setup.py", line 65, in <module>
      version="2.4.2"
    File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 215, in run
      self.run_command('install')
    File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/private/var/folders/rz/ts_f_9513jz8q7xrwrhbtx5h0000gn/T/pip-build-dvp6y9e4/submit50/setup.py", line 22, in run
      raise RuntimeError("Error installing certificates.")
  RuntimeError: Error installing certificates.

  ----------------------------------------
  Failed building wheel for submit50
  Running setup.py clean for submit50
Failed to build submit50
Installing collected packages: submit50, check50
  Running setup.py install for submit50 ... error
    Complete output from command /usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/rz/ts_f_9513jz8q7xrwrhbtx5h0000gn/T/pip-build-dvp6y9e4/submit50/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/rz/ts_f_9513jz8q7xrwrhbtx5h0000gn/T/pip-7j2ug69l-record/install-record.txt --single-version-externally-managed --compile:
    running install
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/rz/ts_f_9513jz8q7xrwrhbtx5h0000gn/T/pip-build-dvp6y9e4/submit50/setup.py", line 65, in <module>
        version="2.4.2"
      File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/private/var/folders/rz/ts_f_9513jz8q7xrwrhbtx5h0000gn/T/pip-build-dvp6y9e4/submit50/setup.py", line 22, in run
        raise RuntimeError("Error installing certificates.")
    RuntimeError: Error installing certificates.

    ----------------------------------------
Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/rz/ts_f_9513jz8q7xrwrhbtx5h0000gn/T/pip-build-dvp6y9e4/submit50/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/rz/ts_f_9513jz8q7xrwrhbtx5h0000gn/T/pip-7j2ug69l-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/rz/ts_f_9513jz8q7xrwrhbtx5h0000gn/T/pip-build-dvp6y9e4/submit50/

move checks to cs50/checks repo

It occurs to me that factoring out the checks to its own repo will also help with versioning, since we shouldn't really have to increment check50's x.y.z version just because we add new checks.

exception when running check50 locally more than once

~/workspace/hello/ $ check50 --local cs50/2017/fall/hello
:) hello.c exists.
:( hello.c compiles.
    expected exit code 0, not 1
:| prints "hello, world\n"
    can't check until a frown turns upside down
~/workspace/hello/ $ check50 --local --verbose cs50/2017/fall/hello                                               
Sorry, something's wrong! Let [email protected] know!
Traceback (most recent call last):
  File "/opt/pyenv/versions/3.6.0/bin/check50", line 11, in <module>
    load_entry_point('check50==2.1.0', 'console_scripts', 'check50')()
  File "/opt/pyenv/versions/3.6.0/lib/python3.6/site-packages/check50.py", line 135, in main
    copy(filename, src_dir)
  File "/opt/pyenv/versions/3.6.0/lib/python3.6/site-packages/check50.py", line 177, in copy
    shutil.copytree(src, os.path.join(dst, os.path.basename(src)))
  File "/opt/pyenv/versions/3.6.0/lib/python3.6/shutil.py", line 353, in copytree
    raise Error(errors)
shutil.Error: [('~/.local/share/check50/cs50/checks/cs50/2017/ap/resize/more/check50', '/tmp/tmpf5p0pu92/_/~/.local/share/check50/cs50/checks/cs50/2017/ap/resize/more/check50', "[Errno 2] No such file or directory: '~/.local/share/check50/cs50/checks/cs50/2017/ap/resize/more/check50'"), ('~/.local/share/check50/cs50/checks/cs50/2017/ap/resize/less/check50', '/tmp/tmpf5p0pu92/_/~/.local/share/check50/cs50/checks/cs50/2017/ap/resize/less/check50', "[Errno 2] No such file or directory: '~/.local/share/check50/cs50/checks/cs50/2017/ap/resize/less/check50'"), ('~/.local/share/check50/cs50/checks/cs50/2017/ap/find/more/check50', '/tmp/tmpf5p0pu92/_/~/.local/share/check50/cs50/checks/cs50/2017/ap/find/more/check50', "[Errno 2] No such file or directory: '~/.local/share/check50/cs50/checks/cs50/2017/ap/find/more/check50'"), ('~/.local/share/check50/cs50/checks/cs50/2017/ap/find/less/check50', '/tmp/tmpf5p0pu92/_/~/.local/share/check50/cs50/checks/cs50/2017/ap/find/less/check50', "[Errno 2] No such file or directory: '~/.local/share/check50/cs50/checks/cs50/2017/ap/find/less/check50'")]

check50 - (music) not recognising enharmonics

My code uses the minor scale pattern to calculate semitone distances and thus, frequencies of each note, and the "produces all correct notes for octaves 3-5" passes but fails for Ab3 and Bb5. I believe this to be because check50 wasn't implemented to recognize that some notes are enharmonic (Ab3 is the same as G#3 and Bb5 is the same as A#5).

// Calculates frequency (in Hz) of a note
int frequency(string note)
{
    char letter = note[0], acc = '\0';
    int octave;

    // parse the note string
    if (strlen(note) == 2)
    {
        // 0 - 9 are contiguous so arithemtic can be done with them
        octave = note[1] - '0';
    }
    else
    {
        acc = note[1];
        octave = note[2] - '0';
    }

    // for octaves of A
    int f = DEFAULT_FREQ * pow(2, octave - DEFAULT_OCTAVE);

    int frequency;

    // accidentals
    int qual = 0;
    if (acc != '\0')
    {
        if (strcmp(&acc, "b") == 0)
        {
            qual -= 1;
        }
        else
        {
            qual += 1;
        }
    }

    // letters
    int interval = letter - 'A';
    string pattern = "2122122";
    float sum = 0.0;
    for (int i = 0; i < interval; i++)
    {
        // sum the number of steps to the letter from A
        sum += pattern[i] - '0';
    }

    /**
     * Calculate the sum of semitones (using the "2122122" minor scale pattern)
     * from A to the note letter and compensate for the letters below A by
     * subtracting that number of semitones from 12.
     *
     * If the letter is below A, then the resulting number needs to be
     * multiplied by -1 in to work with the frequency equation:
     *          (2 ** (n/12)) * frequency of A octave
     * Accidentals are also taken into by adding 1 to or subtracting one to the
     * semitone sum.
     *
     * Else, we just calculate the frequency using the formula as is.
     */
     float n = 0.0;
     if (interval > 1)
     {
         n = (SEMITONES - sum) * -1;
         frequency = round(f * pow(2, (n + qual) / SEMITONES));
     }
     else
     {
         frequency = round(f * pow(2, (sum + qual) / SEMITONES));
     }
     return frequency;
}

check50 output

:) bday.txt and helpers.c exist
:) helpers.c compiles
:) bday.txt is correct
:) is_rest identifies "" as a rest
:) is_rest identifies "A4" as not a rest
:) fraction of "1/8" returns duration 1
:) fraction of "1/4" returns duration 2
:) fraction of "3/8" returns duration 3
:) fraction of "1/2" returns duration 4
:) note A4 has frequency 440
:) note A6 has frequency 1760
:) note A#5 has frequency 932
:( note Ab3 has frequency 208
    expected "208", not "233"
:) note C3 has frequency 131
:( note Bb5 has frequency 932
    expected "932", not "1047"
:) produces all correct notes for octaves 3-5

Debugging checks should be easier

Instead of just printing "check50 ran into an error while running checks!", it would be great if errors were allowed to propagate when run with --verbose. It would also be nice to have a self.info function for checks that could be used to print debug messages with --verbose.

check50 fails

check50 cs50/2018/x/resize/less is failing even though the output matches with staff version.

Peek output

check50-issue

check50 output

check50-results

Contribution guide.

I'm really excited to see that this implementation is going to be in bash.
If there would be a contribution guide, I'd like to contribute as well.

rejecting non-integers

Not sure if we expect that or if there's a cleaner way to detect this but in sentimental/mario for example, the check for rejecting non-integer values still passes even if the user is taking input using the following which would throw an exception in this case:

$ cat mario.py
int(input("Height: "))
$ check50 --local cs50/2018/x/sentimental/mario/less                                                                                                                                                                               
:) mario.py exists.
:( rejects a height of -1
    expected prompt for input, found none
:) handles a height of 0 correctly
:( handles a height of 1 correctly
    expected "##\n", not ""
:( handles a height of 2 correctly
    expected " ##\n###\n", not ""
:( handles a height of 23 correctly
    expected "               ...", not ""
:( rejects a height of 24, and then accepts a height of 2
    expected prompt for input, found none
:) rejects a non-numeric height of "foo"
:) rejects a non-numeric height of "

importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated

In Python 3.7, cs50/2018/x/finance:

 check50 ran into an error while running checks!
    sending GET request to /login
    Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/unittest/case.py", line 59, in testPartExecutor
    yield
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/unittest/case.py", line 615, in run
    testMethod()
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/check50.py", line 416, in wrapper
    func(self)
      File "/root/.local/share/check50/cs50/checks/cs50/2018/x/finance/check50/__init__.py", line 115, in login_page
    self.validate_form("/login", ["username", "password"])
      File "/root/.local/share/check50/cs50/checks/cs50/2018/x/finance/check50/__init__.py", line 10, in wrapper
    return f(self, *args, **kwargs)
      File "/root/.local/share/check50/cs50/checks/cs50/2018/x/finance/check50/__init__.py", line 35, in validate_form
    content = self.app.get(route).content()
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/check50.py", line 520, in content
    BeautifulSoup(self.response.data, "html.parser"),
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/bs4/__init__.py", line 282, in __init__
    self._feed()
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/bs4/__init__.py", line 343, in _feed
    self.builder.feed(self.markup)
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/bs4/builder/_htmlparser.py", line 247, in feed
    parser.feed(markup)
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/html/parser.py", line 111, in feed
    self.goahead(0)
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/html/parser.py", line 179, in goahead
    k = self.parse_html_declaration(i)
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/html/parser.py", line 270, in parse_html_declaration
    self.handle_decl(rawdata[i+2:gtpos])
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/bs4/builder/_htmlparser.py", line 192, in handle_decl
    self.soup.endData(Doctype)
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/bs4/__init__.py", line 420, in endData
    self.object_was_parsed(o)
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/bs4/__init__.py", line 425, in object_was_parsed
    previous_element = most_recent_element or self._most_recent_element
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/bs4/element.py", line 1117, in __getattr__
    return self.find(tag)
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/bs4/element.py", line 1354, in find
    l = self.find_all(name, attrs, recursive, text, 1, **kwargs)
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/bs4/element.py", line 1375, in find_all
    return self._find_all(name, attrs, text, limit, generator, **kwargs)
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/bs4/element.py", line 582, in _find_all
    strainer = SoupStrainer(name, attrs, text, **kwargs)
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/bs4/element.py", line 1686, in __init__
    self.text = self._normalize_search_value(text)
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/bs4/element.py", line 1691, in _normalize_search_value
    if (isinstance(value, str) or isinstance(value, collections.Callable) or hasattr(value, 'match')
      File "/opt/pyenv/versions/3.7.0/lib/python3.7/collections/__init__.py", line 52, in __getattr__
    DeprecationWarning, stacklevel=2)
    Contact [email protected] with the URL of this check!

@crossroads1112 @Jelleas any workarounds or should we downgrade back to the latest 3.6?

See also pypa/setuptools#1401.

add clean way of factoring out CFLAGS to a term-specific config file

E.g., should avoid hardcoding compilation lines like self.spawn("clang -o resize resize.c -lcs50").exit(0), since we tend to tweak CFLAGS each year. Ideal to factor that var out so that, on a per-semester basis, it can be configured to match the IDE. Else we'll have to grep through checks each year tweaking, which doesn't feel ideal? Perhaps we should just add a .clang check that wraps .spawn?

Traceback in student output when Python code has NameError (or others presumably)

screen shot 2018-08-13 at 12 28 07 pm

__init__.py

import check50

@check50.check()
def exists():
    """mario.py exists."""
    check50.exists("mario.py")

@check50.check(exists)
def compiles():
    """no syntax errors in mario.py."""
    check50.run("python -m py_compile mario.py").exit(0)

@check50.check(compiles)
def prints_four_question_marks():
    """prints four question marks"""
    check50.run("python mario.py").stdout("\?\?\?\?", "????").exit(0)

.cs50.yaml

lab50:
  file:
    - mario.py

submit50:
  files: &files
    - !exclude "*"
    - !require mario.py

check50:
  files: *files

Enhancement - install java compiler to add java support for check50

During the CS50 teacher workshop I've been trying to implement java checks in the check50 and submit50 repos. I think I have correctly implemented the checks, but I believe that a java compiler is missing from the server that is running check50. Below is the link to my java checks.
We think they will work if a java compiler is installed. I hope it's as simple as the following command sudo apt-get install openjdk-9-jdk-headless

You can run this in the cs50 IDE :
check50 cs50/2017/x/isPrime/java@jake23hogs/checks

Link to repo:
https://github.com/jake23hogs/checks/tree/master/cs50/2017/x/isPrime/java

pset2 caesar check50 passing code that fail

When checking my vigenere code, I realised that part of the baz check of hello, world! would actually fail caesar too.

More specifically my original caesar code passed the check50, but if running with argument 25, for "hello, world!" I would actually get the wrong answer. This was not picked up by check50 .

I've now corrected my code, which should now produce the right answers!

handle case where arg to -d isn't a directory with user-friendly error, not exception

~/workspace/ (v3dev) $ check50 -d problems/caesar/__init__.py 
Sorry, something's wrong! Let [email protected] know!
Traceback (most recent call last):
  File "/opt/pyenv/versions/3.7.0/bin/check50", line 11, in <module>
    load_entry_point('check50==3.0.0', 'console_scripts', 'check50')()
  File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/check50/__main__.py", line 230, in main
    config = internal.load_config(internal.check_dir)
  File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/check50/internal.py", line 71, in load_config
    with open(config_file) as f:
NotADirectoryError: [Errno 20] Not a directory: '/home/ubuntu/workspace/problems/caesar/__init__.py/.cs50.yaml'

don't require .cs50.yml in debug mode?

Use case is wanting to run some checks for a lab without giving the lab a public slug (as would happen by creating a check50 key in .cs50.yml). Could we assume that the check should be run on the entire contents of $CWD?

~/workspace/tmp/ (v3dev) $ check50 -d .
/home/ubuntu/workspace/tmp/.cs50.yaml not found
Traceback (most recent call last):
  File "/opt/pyenv/versions/3.7.0/bin/check50", line 11, in <module>
    load_entry_point('check50==3.0.0', 'console_scripts', 'check50')()
  File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/check50/__main__.py", line 230, in main
    config = internal.load_config(internal.check_dir)
  File "/opt/pyenv/versions/3.7.0/lib/python3.7/site-packages/check50/internal.py", line 71, in load_config
    with open(config_file) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/workspace/tmp/.cs50.yaml

auto-update check50?

  • run pip install --upgrade first
  • then spawn a child process running check50, orphan it, kill the parent

pset3 find check don't work

When I run check50 cs50/2017/x/find/more I get this output

Traceback (most recent call last):
  File "/opt/pyenv/versions/3.6.0/bin/check50", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1479, in <module>
    register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

Not sure why, it worked three or four months ago when I finished this task. I didn't submit it because I wanted to finish game of fifteen too and to submit both. I came back today to finish it and I had to do update50, so maybe that is a reason for this problem. Also, pset3 find didn't work until I run make all again and recompiled it.

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.