|  | Commit message (Collapse) | Author | Age | Lines | 
|---|
| |\ |  | 
| | | |  | 
| | | |  | 
| | | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | | The problem with --ignore-installed is that it also ignores packages in
the target site, therefore re-installing all packages and making caching
futile.
Install snekbox's dependencies to the default user site. During
installation of the exposed packages, switch the user site to a custom
one to ensure pip will not skip packages due to seeing them as already
installed as one of snekbox's dependencies.
If pip made the --root option ignore packages outside the root, then
using --root would be the best solution. There is a 5+ year old issue
open about that. | 
| | | |  | 
| | | |  | 
| |/  
|   
|   
| | Just a refactor. | 
| | 
| 
| 
| | Fix #89 | 
| |\ |  | 
| | | |  | 
| | | 
| | 
| | 
| | | Pre-commit requires git. | 
| | | |  | 
| | | |  | 
| | | |  | 
| | | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | 
| | | Hooks added:
* check-merge-conflict - checks for files with merge conflict strings
* check-toml - attempts to load all toml files to verify syntax
* check-yaml - attempts to load all yaml files to verify syntax
* end-of-file-fixer - ensures files end in a newline and only a newline
* mixed-line-ending - replaces mixed line endings with LF
* trailing-whitespace - trims trailing whitespace
* python-check-blanket-noqa - enforces that noqa annotations always
  occur with specific codes
See: python-discord/organisation#138 | 
| | | 
| | 
| | 
| | 
| | 
| | | It is a flake8 plugin which enforces PEP 8 naming conventions.
Resolves #63 | 
| |/ |  | 
| | |  | 
| | |  | 
| | |  | 
| |\ |  | 
| | | 
| | 
| | 
| | | One of the unit tests depends on numpy. | 
| | | |  | 
| | | |  | 
| | | 
| | 
| | | Co-authored-by: Joe Banks <[email protected]> | 
| | | |  | 
| | | |  | 
| |/  
|   
|   
|   
|   
|   
|   
|   
|   
|   
|   
|   
|   
|   
|   
|   
| | Isolate snekbox's dependencies from the packages available within the
Python interpreter. Disable Python's default behaviour of site-dependent
manipulations of sys.path. The custom directory looks like a user site
to allow `pip install --user` to work with it. However, snekbox will see
it as simply an additional search path for modules rather than as a user
site.
Disable isolated mode (-I) because it implies (-E), which ignores
PYTHON* environment variables. This conflicts with the reliance on
`PYTHONPATH`.
Specify `PYTHONUSERBASE` in the Dockerfile to make installing packages
to expose more intuitive for users. Otherwise, they'd have to remember
to set this variable every time they need to install something. | 
| |\  
| | 
| | | Make flake8 properly run through pre-commit in PyCharm. | 
| |/ |  | 
| |\ |  | 
| | | |  | 
| | | |  | 
| | | |  | 
| | | |  | 
| |/ |  | 
| | |  | 
| | |  | 
| | |  | 
| | |  | 
| | |  | 
| |\ |  | 
| | | |  | 
| | | |  | 
| | | 
| | 
| | 
| | 
| | 
| | | I've added a test that checks if output exceeding the limit is
correctly truncated. To make the test more robust, I've defined a
constant for the read chunk size. | 
| | | 
| | 
| | 
| | 
| | 
| | 
| | | When you send a signal `N` to a subprocess using Popen, it will return
`-N` as its exit code. As the rest of the code returns signal exit codes
as `128 + N`, we convert those negative exit codes into the standard
form used by the rest of the code. | 
| | | |  | 
| | | 
| | 
| | 
| | 
| | 
| | | This new behavior matches how other limiters terminate the subprocess,
resulting in a more consistency in the front-end for the end users as
well. | 
| | | 
| | 
| | 
| | 
| | 
| | | I've increased the number of characters in each chunk we read from
stdout to 10_000. This means we now read roughly 10 KB - 40 KB in each
chunk. | 
| | | 
| | 
| | 
| | 
| | 
| | 
| | | Previously, the chunk of output that took us over the output limit was
dismissed. As we've already consumed it and it's not going to have a
very large size, we might as well include it in the final output we
return. |