Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5968fd5f8 | ||
|
|
1f606c9cc5 | ||
|
|
c97fb2acea | ||
|
|
8f478ef22c | ||
|
|
c7bb50be5a | ||
|
|
ef17e2fe4c | ||
|
|
f3b8546063 |
@@ -7,8 +7,6 @@ CartoDB Spatial Analysis extension for PostgreSQL.
|
|||||||
* *pg* contains the PostgreSQL extension source code
|
* *pg* contains the PostgreSQL extension source code
|
||||||
* *python* Python module
|
* *python* Python module
|
||||||
|
|
||||||
FIXME: should it be `./extension` and `./lib/python' ?
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
* pip
|
* pip
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--DO NOT MODIFY THIS FILE, IT IS GENERATED AUTOMATICALLY FROM SOURCES
|
||||||
|
-- Complain if script is sourced in psql, rather than via CREATE EXTENSION
|
||||||
|
\echo Use "CREATE EXTENSION crankshaft" to load this file. \quit
|
||||||
-- Internal function.
|
-- Internal function.
|
||||||
-- Set the seeds of the RNGs (Random Number Generators)
|
-- Set the seeds of the RNGs (Random Number Generators)
|
||||||
-- used internally.
|
-- used internally.
|
||||||
@@ -133,4 +136,13 @@ BEGIN
|
|||||||
RETURN ST_Collect(points);
|
RETURN ST_Collect(points);
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE plpgsql VOLATILE
|
LANGUAGE plpgsql VOLATILE;
|
||||||
|
-- Make sure by default there are no permissions for publicuser
|
||||||
|
-- NOTE: this happens at extension creation time, as part of an implicit transaction.
|
||||||
|
-- REVOKE ALL PRIVILEGES ON SCHEMA cdb_crankshaft FROM PUBLIC, publicuser CASCADE;
|
||||||
|
|
||||||
|
-- Grant permissions on the schema to publicuser (but just the schema)
|
||||||
|
GRANT USAGE ON SCHEMA cdb_crankshaft TO publicuser;
|
||||||
|
|
||||||
|
-- Revoke execute permissions on all functions in the schema by default
|
||||||
|
-- REVOKE EXECUTE ON ALL FUNCTIONS IN SCHEMA cdb_crankshaft FROM PUBLIC, publicuser;
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
--DO NOT MODIFY THIS FILE, IT IS GENERATED AUTOMATICALLY FROM SOURCES
|
||||||
|
-- Complain if script is sourced in psql, rather than via CREATE EXTENSION
|
||||||
|
\echo Use "CREATE EXTENSION crankshaft" to load this file. \quit
|
||||||
@@ -51,4 +51,4 @@ BEGIN
|
|||||||
RETURN ST_Collect(points);
|
RETURN ST_Collect(points);
|
||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE plpgsql VOLATILE
|
LANGUAGE plpgsql VOLATILE;
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
-- Make sure by default there are no permissions for publicuser
|
||||||
|
-- NOTE: this happens at extension creation time, as part of an implicit transaction.
|
||||||
|
-- REVOKE ALL PRIVILEGES ON SCHEMA cdb_crankshaft FROM PUBLIC, publicuser CASCADE;
|
||||||
|
|
||||||
|
-- Grant permissions on the schema to publicuser (but just the schema)
|
||||||
|
GRANT USAGE ON SCHEMA cdb_crankshaft TO publicuser;
|
||||||
|
|
||||||
|
-- Revoke execute permissions on all functions in the schema by default
|
||||||
|
-- REVOKE EXECUTE ON ALL FUNCTIONS IN SCHEMA cdb_crankshaft FROM PUBLIC, publicuser;
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
SELECT cdb_crankshaft._cdb_random_seeds(1234);
|
||||||
|
|
||||||
|
-- Use regular user role
|
||||||
|
SET ROLE test_regular_user;
|
||||||
|
|
||||||
|
-- Add to the search path the schema
|
||||||
|
SET search_path TO public,cartodb,cdb_crankshaft;
|
||||||
|
|
||||||
|
-- Exercise public functions
|
||||||
|
SELECT ppoints.code, m.quads
|
||||||
|
FROM ppoints
|
||||||
|
JOIN cdb_moran_local('ppoints', 'value') m
|
||||||
|
ON ppoints.cartodb_id = m.ids
|
||||||
|
ORDER BY ppoints.code;
|
||||||
|
SELECT round(cdb_overlap_sum(
|
||||||
|
'0106000020E61000000100000001030000000100000004000000FFFFFFFFFF3604C09A0B9ECEC42E444000000000C060FBBF30C7FD70E01D44400000000040AD02C06481F1C8CD034440FFFFFFFFFF3604C09A0B9ECEC42E4440'::geometry,
|
||||||
|
'values', 'value'
|
||||||
|
), 2);
|
||||||
@@ -40,9 +40,9 @@ setup(
|
|||||||
|
|
||||||
# The choice of component versions is dictated by what's
|
# The choice of component versions is dictated by what's
|
||||||
# provisioned in the production servers.
|
# provisioned in the production servers.
|
||||||
install_requires=['pysal==1.11.0','numpy==1.6.1','scipy==0.17.0'],
|
install_requires=['pysal==1.11.0', 'numpy==1.10.4', 'scipy==0.17.0', 'pandas==0.17.1', 'scikit-learn==0.17.0', 'statsmodels==0.6.1', 'keras==0.3.2', 'shapely==1.5.3', 'osgeo==2.0.2','scikit-image==0.12.3'],
|
||||||
|
|
||||||
requires=['pysal', 'numpy'],
|
requires=['pysal', 'numpy', 'scipy', 'pandas', 'scikit-learn', 'statsmodels', 'keras', 'shapely', 'osgeo','skimage'],
|
||||||
|
|
||||||
test_suite='test'
|
test_suite='test'
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user