Comments (1)
def req_assert(*expressions, message: str = 'invalid', status_code: int = 200):
"""
Call this at any point to check if an expression is True. If any
of the expressions provided are False, then an anubis.utils.exceptions.AssertError
will be raised. The global handler will then use the message and status
code in a error_response.
>>> thing = None
>>> req_assert(thing is not None, message='thing was None')
>>> # raise AssertError('thing was None', 200)
:param expressions:
:param message:
:param status_code:
:return:
"""
if not all(expressions):
raise AssertError(message, status_code)
from anubis.
Related Issues (20)
- ADD custom settings to specific theia images
- ADD ability to manually trigger autograde for assignment or for student HOT 4
- ADD helm integration tests
- ADD automatic rollbacks on rollout failure
- ADD insert commit hash into web and api images HOT 1
- ADD anubis dev ide HOT 1
- ADD ctop to base ide
- ADD column to superuser playground table for if docker is enabled
- CHG use distributed locks to distribute theia-poller job HOT 2
- ADD submission pipeline log capture
- CHG make anubis developer IDE more clear
- ADD ability to automatically scale in/out cluster at specified schedules
- EXP figure out self hosted s3 storage for longhorn backups HOT 1
- BUG web font broken on windows firefox
- ADD button to superuser.users page for deleting pvcs
- CHG sort test results by name on submission page HOT 2
- FIX Greeting workflow has been failing HOT 2
- ADD side-by-side answer/solution view HOT 1
- ADD UI for resending github collaboration invitation HOT 2
- ADD alert for when longhorn backups failing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anubis.