Giter Club home page Giter Club logo

camisole's People

Contributors

cafehaine avatar ekleog avatar jilljenn avatar khoyo avatar leelvyn avatar lportemo avatar multun avatar seirl avatar tobast avatar zopieux 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

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

camisole's Issues

`camisole test -v` crash when no stderr message

Traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/camisole/camisole/camisole/__main__.py", line 118, in <module>
    main()
  File "/home/camisole/camisole/camisole/__main__.py", line 105, in main
    loop.run_until_complete(print_working_languages(languages, verbosity))
  File "/usr/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete
    return future.result()
  File "/home/camisole/camisole/camisole/__main__.py", line 32, in print_working_languages
    print(indent(extract_fail_message(raw).strip()))
  File "/home/camisole/camisole/camisole/__main__.py", line 16, in extract_fail_message
    return '\n'.join((relevant['meta']['message'], relevant['stderr']))
TypeError: sequence item 0: expected str instance, NoneType found

The traceback doesn't happen with -vvv:

    {'compile': {'exitcode': 0,
                 'meta': {'cg-mem': 39316,
                          'csw-forced': 58,
                          'csw-voluntary': 13,                                                   
                          'exitcode': 0,
                          'exitsig': None,
                          'killed': False,
                          'max-rss': 79812,
                          'message': None,
                          'status': 'OK',
                          'time': 0.179,
                          'time-wall': 1.444},
                 'stderr': '',
                 'stdout': ''},
     'tests': [{'exitcode': 0,
                'meta': {'cg-mem': 4344,
                         'csw-forced': 3,
                         'csw-voluntary': 3,
                         'exitcode': 0,
                         'exitsig': None,
                         'killed': False,
                         'max-rss': 6260,
                         'message': None,
                         'status': 'OK',
                         'time': 0.0,
                         'time-wall': 0.054},
                'name': 'test000',
                'stderr': '',
                'stdout': 'Hello, world!\n'}]}

Run Python script with packages

Is there a way to run a Python program with external pip packages ? e.g either by installing them on the go, or by defining a Python environment where the packages were installed beforehand ?

Golang: go cache is disabled

Go compiler throwing this error when trying to compile.

build cache is disabled by GOCACHE=off, but required as of Go 1.12

Setting the environment variable GOCACHE to /tmp/something could be a workaround but it turns out that it raises a PermissionDenied exception in camisole during post-compile root_tmp cleanup

Brainfuck support

Originally posted 2016-12-18 19:02 by Zopieux on Bitbucket
# Todo: requires two compilers (bf and C++), no idea how to do

UnicodeDecodeError when sending a request

Hello,

When trying to set up camisole onto a computer running Ubuntu Server 20.04, I used the instructions on the documentation page for manual installation. I got through all of the steps, but when I run camisole test or try to send the request given in the README, I get a UnicodeDecodeError. Specifically, I get:

Traceback (most recent call last):
  File "/usr/local/bin/camisole", line 11, in <module>
    load_entry_point('camisole==1.4', 'console_scripts', 'camisole')()
  File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/__main__.py", line 54, in main
  File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/progs/test.py", line 12, in handle
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/progs/languages.py", line 24, in print_working_languages
  File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/ref.py", line 8, in test
  File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/models.py", line 212, in run
  File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/models.py", line 181, in run_compilation
  File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/models.py", line 144, in compile
  File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/isolate.py", line 100, in __aenter__
  File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/utils.py", line 95, in __get__
  File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/isolate.py", line 239, in isolate_conf
  File "/usr/lib/python3.8/configparser.py", line 718, in read_file
    self._read(f, source)
  File "/usr/lib/python3.8/configparser.py", line 1017, in _read
    for lineno, line in enumerate(fp, start=1):
  File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/isolate.py", line 237, in dummy_section
  File "/usr/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd8 in position 96: invalid continuation byte

I've tried deleting the binary that running the installation creates and reinstalling camisole, but this doesn't seem to have fixed anything. Why is this happening?

Improve travis build

  • add Rust
  • add Ada
  • add brainfuck
  • add C#
  • add Haskell
  • add JavaScript
  • add Pascal
  • add VisualBasic

[BUG] Execution broken

Recently tried to compile my Docker back after 2 years. It doesn't work anymore for this reason :

linux@linux-VirtualBox:~/_GIT/GH/Kochise/docker-camisole$ sudo docker run --network host -it --rm --privileged --entrypoint bash camisole
[sudo] password for linux: 

mcmurphy@linux-VirtualBox:/app$ camisole test -vvv

Traceback (most recent call last):
  File "/usr/bin/camisole", line 10, in <module>
    from importlib.metadata import distribution
ModuleNotFoundError: No module named 'importlib.metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/camisole", line 13, in <module>
    from importlib_metadata import distribution
ModuleNotFoundError: No module named 'importlib_metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/camisole", line 15, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 3259, in <module>
    @_call_aside
  File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 581, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 909, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 795, in resolve
    raise DistributionNotFound(req, requirers)

pkg_resources.DistributionNotFound: The 'camisole==1.5.dev35+gf0f3daf' distribution was not found and is required by the application

mcmurphy@linux-VirtualBox:/app$ 

Nothing changed on my side. So if you have an idea...

CLI command to quickly see which languages work

Originally posted 2017-01-10 18:39 by serialk on Bitbucket

A bit like the /test endpoint but in CLI, and with a cleaner and colored output. The goal is for a human to check quickly which languages do work and see what fails and why.

HTTPRequestEntityTooLarge: Request Entity Too Large

Hi !

I'm using Camisole for a project, but I have a problem.

When I want to run a test with a huge entry (over than 1Mb), the exception "aiohttp.web_exceptions.HTTPRequestEntityTooLarge: Request Entity Too Large" is thrown.

Have you an idea how I can increase this size limit?

Thank you !

Add a way to set arbitrary language names

Originally posted 2017-01-10 18:41 by serialk on Bitbucket

Using __class__.__name__ is a cool default but I think we should give more control to the user (like using a name descriptor that gives __class__.__name__ when not set).

execve("/usr/bin/javac") : No such file or directory

Hi,

I have a new problem.
Up to now, Camisole was set up on a personal Raspberry Pi with Archlinux in order to show the feasibility of using Camisole in a formal academical usage.

However, when I moved the configuration to the "real machine", a VM provided by the university with Debian 9 OS, Java stopped being supported.
When I try camisole test -v, I have the following error :

execve("/usr/bin/javac") : No such file or directory.

Of course, javac does exist in /usr/bin/ and does work adequately outside Camisole.

Any idea why Camisole can't find it?
Java is provided by the openjdk-8-jdk package (I'm not really proficient with Debian, so perhaps I'm missing something).

Thank you for you help,
Lastdreamer

Language variant system

Originally posted 2017-01-10 18:59 by serialk on Bitbucket

I would like to be able to add a "variant" attribute to languages.

  • There always should be a "default" variant, so if you call the "c" language without specifying a variant you should always gate a sane default generic C behavior
  • This could be used to put versions of languages, compilators, ....

Examples of variants I can think of:

  • ('cxx', 'gcc-5.2')
  • ('python', 'cpython-2.8')
  • ('python', 'pypi')
  • ('fsharpc', 'fsharpc-4.1')

The problem I see with this approach is that we're giving more flexibility to the users but we're complexifying too much everything: if you want to use different versions of different languages, you'll have to add different paths, different packages, and this won't fit in the easy approach "everything is packaged, we just pacman -S everything and call the binaries from the paths". We'll have to add configuration for the paths of the binaries, the language description will leak in the configuration and it might become a problem.

The other option is to keep everything as part of the name. We have Python and C++, and if someone wants to add a fancy compiler he can add a 'c++14-clang' language.

Design comments on this are welcome!

Queueing system

Originally posted 2017-01-10 18:15 by serialk on Bitbucket

I suggest we use long polling to queue requests, we set a fixed size of concurrent things that can execute in parallel that we can configure (/etc/camisole.conf?) and we add an endpoint to see how many items are queued, what's the average waiting time, etc.

Camisole test crashing

Hi,

I freshly installed Isolate than Camisole under ubuntu 20.04 on an arm computer.

isolate-check-environment produces :

WARNING: the memory is not present. isolate --cg cannot be used.
Checking for cgroup support for cpuacct ... PASS
Checking for cgroup support for cpuset ... PASS
Checking for swap ... PASS
Checking for CPU frequency scaling ... PASS
Checking for kernel address space randomisation ... PASS
Checking for transparent hugepage support ... PASS

but camisole test crashes :

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/firefly/Documents/git/camisole/camisole/__main__.py", line 58, in <module>
    main()
  File "/home/firefly/Documents/git/camisole/camisole/__main__.py", line 54, in main
    sys.exit(func(args))
  File "/home/firefly/Documents/git/camisole/camisole/progs/test.py", line 12, in handle
    return asyncio.get_event_loop().run_until_complete(check)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/firefly/Documents/git/camisole/camisole/progs/languages.py", line 24, in print_working_languages
    success, raw = res[i].result()
  File "/home/firefly/Documents/git/camisole/camisole/ref.py", line 8, in test
    raw_result = await lang.run()
  File "/home/firefly/Documents/git/camisole/camisole/models.py", line 214, in run
    binary = await self.run_compilation(result)
  File "/home/firefly/Documents/git/camisole/camisole/models.py", line 183, in run_compilation
    cretcode, info, binary = await self.compile()
  File "/home/firefly/Documents/git/camisole/camisole/models.py", line 145, in compile
    async with isolator:
  File "/home/firefly/Documents/git/camisole/camisole/isolate.py", line 122, in __aenter__
    busy = {int(p.name) for p in self.isolate_conf.root.iterdir()}
  File "/home/firefly/Documents/git/camisole/camisole/utils.py", line 95, in __get__
    res = self.func(cls)
  File "/home/firefly/Documents/git/camisole/camisole/isolate.py", line 269, in isolate_conf
    parser.read_file(dummy_section())
  File "/usr/lib/python3.8/configparser.py", line 718, in read_file
    self._read(f, source)
  File "/usr/lib/python3.8/configparser.py", line 1017, in _read
    for lineno, line in enumerate(fp, start=1):
  File "/home/firefly/Documents/git/camisole/camisole/isolate.py", line 268, in dummy_section
    yield from f
  File "/usr/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb7 in position 18: invalid start byte

I have no clue about what is going wrong, do you ?

Best regards :)

Plugin mode for languages

Originally posted 2017-01-10 18:01 by serialk on Bitbucket

We should source python files in paths like:

  • /usr/share/camisole/lang
  • ~/.local/share/camisole/lang

Maybe split, one file per language?
Configuration file to know which languages we want to enable? /etc/camisole.conf? -c option?

Multi line Python source

Is there a work-around to test (small) multi-line Python code ? For instance, small functions (5 lines).

/system endpoint : ValueError

When accessing to the /system endpoint, camisole's httpserver throws this error:

Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/camisole/httpserver.py", line 89, in wrapper
result = await wrapped(request, data)
File "/usr/lib/python3.7/site-packages/camisole/httpserver.py", line 129, in system_handler
return {'system': camisole.system.info()}
File "/usr/lib/python3.7/site-packages/camisole/system.py", line 49, in info
'cpu_cache_L1d': parse_size(cpu.get('L1d cache')),
File "/usr/lib/python3.7/site-packages/camisole/utils.py", line 34, in parse_size
return int(str_size)
ValueError: invalid literal for int() with base 10: '32 ki'

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.