-
Notifications
You must be signed in to change notification settings - Fork 299
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
Conditional Database Import / Docos #692
Conversation
This looks awesome! Cloning now. What you've put are great starting points for a discussion. That said, I may be a bit more outspoken about FileIO...
|
For 3, I think that the solution could be as easy as using a So perhaps something like: test_db.py import unittest
from .. import db
try:
import sqlalchemy
import geomet
missing = False
except:
logger.debug('some message')
missing = True
class TestDB(unittest.testcase):
@unittest.skipif(missing == True)
def setUp(self):
#Fire up the db connection
@unittest.skipif(missing == True)
def test_listtables(self):
#Test table listing Then it looks like nose has support for printing a 'S' for skipped tests. http://nose.readthedocs.org/en/latest/plugins/skip.html As an aside - checkout some of the other decorators and the ability to roll your own unittest decorators. Not something I have thought about before, but super nice to see that these exist. For 4: |
Okay, cool. @TaylorOshan and I were dealing with some of the same issues in skipping tests based on conditions while trying to make moving We should write condtional import stuff into the styleguide, so that it's consistent across the different sets of potential soft dependencies. |
So I played around a bit more with FileIO and how this might look:
This maintains the fragility in guessing input type by extension, but enforces a consistent interface. From a user perspective, the development of drivers that are roughly similar to those that already exist is quite straight forward. Additionally, the user can expect that
Some questions that we need to answer:
Looking at
|
While we probably want to finally finish this (& weights construction stuff), I think we might benefit from:
Thoughts? |
adding @dfolch ckdtree work 🎉
adding cartodb to projects
fixing KDTree/cKDTree changes to API & adding ckdtree to Arc_KDTree
adding people to travis email list
add spint to contrib_docs
…n the standard normal approximation. Means and standard errors were taken over all local permutations rather than specific to each local value.
Local Moran was using the incorrect moments in z_sim and p_z_sim
Doc/rolling
add changes to make doctests in weights submodule pass
Changes Unknown when pulling e1b54ee on jlaura:master into * on pysal:master*. |
@jlaura would it be alright to cherrypick your commits from this & redirect to dev? I've rebased this in ljwolf/pysal/pr692 and in #841 |
[REBASE & REDIRECT] Conditional Database Imports & Docos, #692
👍 On Saturday, July 16, 2016, Levi John Wolf notifications@github.com wrote:
|
closed by #841 |
Two parter, so feel free to request that I break apart.
The main reason for the PR is to continue the conversation re: FileIO / Database access / Conditional imports.
To test (
conda install gdal
- only to get the test data generated, not necessary for the PR):Then
Some things to discuss (maybe in a hangout?)
read
,seek
, andnext
methods, but a DB is not a file object. How can the interface be either generalized or the differences obfuscated (the current hack feels like a hack, so zero love from here)sqlite:///
(or postgresql with username/password/port). Do we want to try and abstract that from the user or just accept that this is the way SQLAlchemy manages interfacing with databases?