#evehq

/

      • inactivist has quit
      • iaro joined the channel
      • iaro is now known as nicola
      • encc joined the channel
      • nicola has quit
      • inactivist joined the channel
      • iaro joined the channel
      • inactivist
        There's also 'metadata' support we could use: http://docs.sqlalchemy.org/en/rel_0_8/core/sche...
      • iaro is now known as nicola
      • And... I'm not sure what to do about embedded dictionaries as used in the eve-demo's people.location schema entry...
      • Do we assume that all underlying db schema have been created externally, or must we offer some way of creating the schema?
      • nicola
        Eve will create the collection/documents if they are missing, but mongodb makes that a trivial task. Hard to replicate that in the SQL world.
      • I'd say assume the schema exist already
      • inactivist
        I think that's a good first step. We can ask SQLAlchemy to verify, I think.
      • nicola
        even for mongodb it doesn't really make sense. You want to optimize the DB, make sure you have the needed indexes, etc.
      • inactivist
        True enough.
      • I'll assume we should raise an exception during init if something's amiss
      • nicola
        agreed
      • inactivist
        What about constructs like people.location? Not sure if we're expected to translate that into SQL...
      • (complex, nested data types)
      • nicola
        I guess a first attempt at SQL could get away with raising an exception :)
      • inactivist
        I'm good with that - another thing to check at init-time, I suppose.
      • Should we have another custom exception or recycle someone else's? InvalidSchemaException() ?
      • (so many questions...)
      • nicola
        yes for specialized exceptions
      • and questions are good to have :)
      • I need feedback on this if you have a couple minutes guys https://github.com/nicolaiarocci/eve/issues/23
      • inactivist
        I've no opinion on the events question.
      • nicola
        it's alright :)
      • inactivist
        At least not this morning. :-/
      • I don't know what kind of use cases you're trying to address.
      • nicola
        that's actually a feature request (not mine), but there might be some interesting use cases
      • like custom logging or custom notification etc
      • not to mention updating other databases/apis
      • inactivist
        I prefer max flexibility/granularity, natch, and I'd prefer to see headers and such passed to the callback... but lacking use cases I don't know if that's reasonable. I'll try to check out the original feature request...
      • nicola nods
      • nicola
        yes I'll go with on_getting()/on_get() etc
      • inactivist
        (beware, I have to fight the urge to over-engineer... Simple is better than complex. Complex is better than complicated. 8-)
      • nicola
        well that's one case where simplicity for the API (just two events) would imply complexity on the calling script (parse request method, decide what to do etc). Of course I could also provide both class of events, leaving the client decide to which to subscribe… hmmm
      • *both classes of event
      • *both event classes :D
      • inactivist
        I'm all for flexibility - should I leave these comments on github rather than here? You asked for feedback there...
      • nicola
        yeah please do, will encourage discussion
      • thanks
      • inactivist
        Ok, done. Bombs away!
      • nicola smirks
      • That's me, Mr. Opinion. Worth every centisimi
      • or is that centisimo?
      • My brain hurts
      • nicola
        centesimi (plural) / centesimo (singular)
      • inactivist
        ah, yes, thanks
      • another copy and paste failure :-/
      • btw, I notice that Eve.validate_schema() provides incomplete 'offender' data if there are multiple offending entries in the schema -- last one wins.
      • Minor issue but it might cause confusion. I like to collect problems in a list and carry them around in my back pocket.
      • nicola
        hmm will check, shouldn't do that
      • inactivist
        I've not tested it but the code says it will.
      • If both eve.DATE_CREATED and eve.ID_FIELD are in schema, only ID_FIELD will be used in message?
      • Unless I misread that logic.
      • And if I did, I probably ought to go hide in the corner.
      • nicola
        ah yes I didn't get the context
      • (was thinking about payload validation)
      • inactivist
        (Very minor issue)
      • I assume one goal of Eve is to provide a friendly framework for building REST interfaces in Flask, so ... I like friendly.
      • I created an issue in the queue...
      • nicola
        ok
      • inactivist
        I may submit a pull request for consideration when I have time
      • nicola
        sure
      • inactivist
        Probably should delegate schema validation to the data instance...
      • but we can do that implicitly in the DataLayer constructor, I suppose
      • nicola
        in activist yes, validate_schema could/should behave like the domain validator (cerberus), reporting a list of errors
      • will fix
      • or are you going to send a PR for that?
      • AndrewK joined the channel
      • AndrewK
        Hello
      • nicola
        howdy AndrewK
      • AndrewK
        I sent you a brief email the other day concerning 404 on posting from a client I am trying to test.
      • nicola
        ah yes, I remember that one
      • did you figure it out?
      • AndrewK
        If you aren't terribly busy, do you think you could assist me in figuring out the problem?
      • nicola
        give me a few minutes
      • brb
      • AndrewK
        negative. I was hoping it was because I was running it from windows. But after starting it up on a linux vm and testing your eve-demo-client against it, it works. It still 404's from my other 'clients' post request.
      • no problem
      • :)
      • NOTICE: [eve] nicolaiarocci pushed 1 new commit to develop: https://github.com/nicolaiarocci/eve/commit/ce2deb2876beab3155fa967637ec66b0a13ce06e
      • NOTICE: eve/develop ce2deb2 Nicola Iarocci: Now collecting offending items and returning all of them into the exception message. Closes #24.
      • mmm love seeing those commits
      • lar1914
        where/what file can I start tracing to track down where I am getting a 405 even though my endpoints have all methods turned on?
      • AndrewK
        Are you getting them on specific endpoints or all of them? Are you getting them with specific methods or all of them?
      • lar1914
        PATCH
      • i verify all methods (for tracking down) are turned on..
      • AndrewK
        what kind of client setup are you using?
      • curl or something else
      • lar1914
        test_client
      • once app is running
      • where is first entry point for receiving request
      • then I can trace from there
      • i use wingware
      • ide
      • just realized that project was using global werkzeug
      • not virtualenv
      • AndrewK
        yep
      • lar1914
        i was trying to jump into venv but it was not going there
      • AndrewK
        ah
      • lar1914
        i now notice werkzeug.__file__ is pointing to global :(
      • AndrewK
        i was looking through source to help, as I have just started trying to test things with Eve two days ago. :)
      • NOTICE: [eve] nicolaiarocci pushed 1 new commit to develop: https://github.com/nicolaiarocci/eve/commit/f11db56c8d81f9496ab27516dd842b4991da20b9
      • NOTICE: eve/develop f11db56 Nicola Iarocci: Example on how to handle events to perform custom actions. Closes #23 and #22.
      • lar1914
        i love what nicola has put together
      • AndrewK
        i love how robust it is, even if it is quite young.
      • lar1914
        i do some extra magic and so rather than import his package, i am following his pattern
      • currently focussed on CORS and auth
      • AndrewK
        i dont do much in python, but the appeal of eve intrigued me.
      • lar1914
        CORS support is key IMHO
      • AndrewK
        is CORS support a WIP for eve or is it already there?
      • lar1914
        WIP?
      • AndrewK
        work in progress, sorry.
      • lar1914
        he just implimented
      • nicola
        AndrewK, I'm ready
      • AndrewK
        ah
      • lar1914
        i am working to wire it up to an AngularJS client on external domain
      • AndrewK
        hello nicola
      • nicola
        I was hoping yours was a windows issue too :D guess not
      • AndrewK
        haha nope.
      • anywho, i think its specific to my client attemps
      • attempts*
      • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>404 Not Found</title> <h1>Not Found</h1> <p>The requested URL was not found on the server.</p><p>If you entered the URL manually please check your spelling and try again.</p> GET /people/ HTTP/1.1 Host: 192.168.1.199 User-Agent: LiveCode (Win32) HTTP/1.0 404 NOT FOUND Content-Type: text/html Content-Length: 238 Server: Eve/0.0.4 Werkzeug/0.8.3 Python/2.7.3 Date: Fri,
      • ew that lost its formatting
      • one moment
      • nicola
        got it
      • what's the request like?
      • I see /people/
      • AndrewK
        i used your eve-demo and eve-demo-client
      • and both work well
      • i can browse to the resources and tings are fine from my browser
      • nicola
        even /people/ endpoint working fine from broswer?
      • AndrewK
        I am using livecode from http://runrev.com to try and access the basics.
      • yep
      • see the data just fine
      • albiet in xml instead of json
      • nicola
        yes that's right
      • don't you love that xml of mine? took a hell of a lot of work to get it right, goddamit :)
      • AndrewK
        i was trying to post your demo json to the api from livecode
      • it failed with a 404
      • then i just tried doing a get
      • does the same thing
      • the response is first in that paste
      • then the headers I sent
      • then the headers i recieved back
      • seems pretty standard, but it doesnt seem to be doing much that the browser version of the get isnt doing