[vmchecker-dev] [codereview]

Alexandru Moșoi brtzsnr at gmail.com
Tue Apr 28 00:58:08 EEST 2009


2009/4/28 Lucian Adrian Grijincu <lucian.grijincu at gmail.com>:
> On Tue, Apr 28, 2009 at 12:30 AM, Alexandru Moșoi <brtzsnr at gmail.com> wrote:
>> & a few more :)
>
> & more:
>
> Stupid github doesn't allow CRs for newly added files.
> http://github.com/ironmissy/vmchecker/blob/886490fd58d1de117e00e4dfc1695a27c3987251/bin/submissions.py
>    location = vmcheckerpaths.dir_user(assignment, user)
>    config_file = os.path.join(location, 'config')
>
> I know this isn't your code, but I've seen it done in a few places.
> This shoud lie in a function of it's own kind:
that's my bad. i didn't have enought time to change (and you are
behind with reviewing my code! don't trust me so much)

> I think a call like
>   vmcheckerpaths.assignment_config(user=u, assigment=as)
these should go under submission module. i will fix them later this
week after I integrate Irina's patch.

> would be nice, or we could drop the dictionary args and use plain old
>   vmcheckerpaths.assignment_config(u, as)
you don't have to specifiy `user` and `assignment` even if function
takes keyword arguments:


def a(x=1, y=2): pass

# equivalent
a(1, 2)
a(1, y=2)
a(x=1, y=2)

# wrong (keyword arguments must be passed after positional arguments)
# a(x=1, 2)


> ./commander.py:    args = (join(dir, 'callback'), join(dir, 'config'))
> ./commander.py:    with open(join(dir, 'config')) as handle:
> ./commander.py:    needed_files = ['archive.zip', 'tests.zip',
> 'config', 'storer', 'callback']
> ./repo_walker.py:        if not os.path.isfile(os.path.join(path, 'config')):
> ./submit.py:    with open(os.path.join(location, 'config'), 'w') as handler:
> ./submit.py:    with open(os.path.join(location, 'config')) as handler:
> ./submit.py:                zip_.write(os.path.join(location,
> 'config'), 'config')
> ./submit.py:    config_file = os.path.join(location, 'config')
> ./submit.py:    with open(os.path.join(location, 'config')) as handler:
oh, c'mon... that's my code. please continue on another thread.


-- 
Alexandru Moșoi
http://alexandru.mosoi.googlepages.com

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


More information about the vmchecker-dev mailing list