-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packaging flask-mongoengine for Debian #219
Comments
Hi @oorestisime.
Great. Thanks for this. Anything you need, please ask.
Done: 60f8704
Works for me. What did you try and what did you get? Basically, I would create a virtualenv in which I'd install all dependencies (easiest is probably to fetch flask-mongoengine itself from pip so that it pulls all the rest in). Then, in the VE,
I don't think I had to do anything special. Not sure if/how test dependencies are automatically added (rednose, etc.). Might be worth checking and maybe installing them manually (pip or apt-get). Don't you have an explicit error message? |
Here's the stacktrace Traceback (most recent call last): tests/test_basic_app.py line 22 in setUp Todo.drop_collection() build/bdist.linux-x86_64/egg/mongoengine/document.py line 673 in drop_collection db.drop_collection(cls._get_collection_name()) build/bdist.linux-x86_64/egg/pymongo/database.py line 553 in drop_collection self.command("drop", _unicode(name), allowable_errors=["ns not found"]) build/bdist.linux-x86_64/egg/pymongo/database.py line 478 in command with client._socket_for_reads(read_preference) as (sock_info, slave_ok): /usr/lib/python2.7/contextlib.py line 17 in __enter__ return self.gen.next() build/bdist.linux-x86_64/egg/pymongo/mongo_client.py line 752 in _socket_for_reads with self._get_socket(read_preference) as sock_info: /usr/lib/python2.7/contextlib.py line 17 in __enter__ return self.gen.next() build/bdist.linux-x86_64/egg/pymongo/mongo_client.py line 716 in _get_socket server = self._get_topology().select_server(selector) build/bdist.linux-x86_64/egg/pymongo/topology.py line 142 in select_server address)) build/bdist.linux-x86_64/egg/pymongo/topology.py line 118 in select_servers self._error_message(selector)) ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused Do i need to run mongod for tests? |
OK same here. I never saw that because I always had a There were recent commits about using Is running the automatic tests part of the build process in Debian? I mean, is it mandatory? I'm just asking, not suggesting we should skip this, especially since everything is in place. |
It is not mandatory but I'd like to include them since they can help find bugs of installation. There are a lot of instances checking the installations of packages and having the tests would help make sure that the package is correctly installed and healthy. This is the reason i picked the github tarball instead of the pypi one (you exclude tests there). I can try to launch mongod during tests and see if that works although i think that mongomock would be a better solution so if you can point me to the way to test without mongod i would really appreciate. This is the only blocker :) |
@oorestisime, for a status of flask-ME, see #71. We're about to release 0.8. The last missing piece is a development around For now, there could be a way to specify it manually. I've just had a quick try, fiddling with Debian packaging is a great opportunity for the project, so I think this is yet another incentive to get this |
Ok great :) Thanks again for all the help! |
hello folks, any updates here? given that the freeze for the next release is on November i'd like to know if there's any chance for this to be done before that so i could actually upload a package. |
Just stumbled upon this old conversation. Mongomock support has been removed from flask-mongoengine, so it won't save you. How do you deal with Mongoengine tests? Mongomock? Maybe have a look at other MongoDB related packages (pymongo) to see how they run their tests. |
Outdated, have no sense now. |
Hello,
I ve started packaging flask-mongoengine. I noticed that the license is probably a bit old since it says 2010-2012. I guess you might want to pump this up.
Anyhow the issue i have is with tests. I can't seem to run them. I am sure I am going something wrong at the point "ensure you are running a local copy of Flask-MongoEngine". Can you possibly tell me what I have to run before doing
python setup.py nosetests
?Cheers,
Orestis
The text was updated successfully, but these errors were encountered: