thesoftwarefactory / experiment-server Goto Github PK
View Code? Open in Web Editor NEWPrototype for Continuous Experimentation Server
Prototype for Continuous Experimentation Server
With instructions
More simple and clear API. API should be able to give some guidelines on how data is arranged in the application.
At least following issues
For example OAuth
For example
| id | exp_id_a | exp_id_b
Currently configurations contain plaintext address to database.
Application gets UUID, and can be identified by it. Clients can use UUID to specify their application.
Swagger API version 2.0.1 returns 500 with correct values to the address in the topic. For some reason the error message contains the data which was requested. Swagger is fun.
{
"title": "Internal Server Error",
"code": "500 Internal Server Error",
"message": "The server has either erred or is incapable of performing the requested operation.\n\n\nResponse body should be empty: {\"data\": {\"endDatetime\": \"2017-11-10 14:11:09\", \"application_id\": 1, \"totalDataitems\": 0, \"experimentgroups\": [{\"configurations\": [{\"key\": \"highScore\", \"value\": true, \"id\": 1, \"experimentgroup_id\": 1}], \"clients\": 0, \"experiment_id\": 1, \"id\": 1, \"name\": \"High score ON\"}, {\"configurations\": [{\"key\": \"highScore\", \"value\": false, \"id\": 2, \"experimentgroup_id\": 2}], \"clients\": 0, \"experiment_id\": 1, \"id\": 2, \"name\": \"High score OFF\"}], \"status\": \"running\", \"startDatetime\": \"2016-11-10 14:11:09\", \"name\": \"High score\", \"id\": 1}}\n\n"
}
2016-11-16T13:57:46.813518+00:00 app[web.1]: app_id = self.request.swagger_data['appid']
2016-11-16T13:57:46.813524+00:00 app[web.1]: AttributeError: 'Request' object has no attribute 'swagger_data'
Does anyone know what's going on?
This works
@view_config(route_name='configurationkeys_for_app', request_method="GET")
def configurationkeys_GET(self):
""" List all configurationkeys with GET method """
app_id = self.request.swagger_data['id']
if Application.get(app_id) is None:
print_log(datetime.datetime.now(), 'GET', '/applications/%s/configurationkeys'\
% app_id, 'Get configurationkeys', 'Failed')
return self.createResponse(None, 400)
app_conf_keys = ConfigurationKey.query().join(Application).filter(Application.id == app_id)
return list(map(lambda _: _.as_dict(), app_conf_keys))
And this doesn't
@view_config(route_name='configurationkey', request_method="GET")
def configurationkeys_GET_one(self):
""" Find and return one configurationkey by id with GET method """
app_id = self.request.swagger_data['appid']
confkey_id = self.request.swagger_data['ckid']
confkey = get_conf_key_by_appid_and_ckid(app_id, confkey_id)
if confkey is None:
print_log(datetime.datetime.now(), 'GET',\
'/applications/%s/configurationkeys/' % app_id
+ str(confkey_id), 'Get one configurationkey', 'Failed')
return self.createResponse(None, 400)
return confkey.as_dict()
Added routes are:
config.add_route('configurationkeys_for_app', '/applications/{id}/configurationkeys')
config.add_route('configurationkey', '/applications/{appid}/configurationkeys/{ckid}')
Remove size from experimentgroup-model
Client only sends post requests to
Successful HTTP Delete-requests return nothing.
Requires changes at least in initializedb.py
From the old UI
Renaming tables
In comments: "WARNING: This is a deprecated class and should be removed ASAP"
Front-end: correct get/post requests
Currently are defined as '*'.
Good CSS skeleton, containing instructions
Returns currently 400.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.