mirror of
https://github.com/CartoDB/crankshaft.git
synced 2024-11-01 10:20:48 +08:00
4a81710749
This solves a problem with the Markov analysis. Otherwise, with some inputs it gives the following error: ``` Analysis A2 failed: ValueError: operands could not be broadcast together with shapes (5) (3) ``` The stack trace is the following: ``` ERROR: ValueError: operands could not be broadcast together with shapes (5) (2) CONTEXT: Traceback (most recent call last): PL/Python function "cdb_spatialmarkovtrend", line 7, in <module> return markov.spatial_trend(subquery, time_cols, num_classes, w_type, num_ngbrs, permutations, geom_col, id_col) PL/Python function "cdb_spatialmarkovtrend", line 76, in spatial_trend PL/Python function "cdb_spatialmarkovtrend", line 416, in __init__ PL/Python function "cdb_spatialmarkovtrend", line 498, in _mn_test PL/Python function "cdb_spatialmarkovtrend", line 526, in _ssmnp_test PL/Python function "cdb_spatialmarkovtrend" ``` and here is the line where it actually fails: https://github.com/pysal/pysal/blob/v1.11.2/pysal/spatial_dynamics/markov.py#L526 In v1.14.3, the `shtest` is opt-in. So this gives us a chance to curate data if we wanted to apply that test, optionally, instead of crashing: https://github.com/pysal/pysal/blob/v1.14.3/pysal/spatial_dynamics/markov.py#L490 |
||
---|---|---|
.github | ||
doc | ||
release | ||
src | ||
.brackets.json | ||
.gitignore | ||
.travis.yml | ||
check-compatibility.sh | ||
check-up-to-date-with-master.sh | ||
CONTRIBUTING.md | ||
LICENSE | ||
Makefile | ||
Makefile.global | ||
NEWS.md | ||
README.md | ||
RELEASE.md |
Crankshaft
CARTO Spatial Analysis extension for PostgreSQL.
Code organization
doc/
documentationsrc/
source code
pg/
contains the PostgreSQL extension source codepy/
Python module source code
release
reseleased versions
Requirements
- PostgreSQL
- plpythonu and postgis extensions
- python-scipy system package (see src/py/README.md)
Development Process
We distinguish two roles:
- developers will implement new functionality and bugfixes into the codebase.
- A release manager will handle the release process.
We use the branch develop
as the main integration branch for development. The master
is reserved to handle releases.
The process is as follows:
- Create a new topic branch from
develop
for any new feature or bugfix and commit their changes to it:
git fetch && git checkout -b my-cool-feature origin/develop
- Code, commit, push, repeat.
- Write some tests for your feature or bugfix.
- Update the NEWS.md doc.
- Create a pull request and mention relevant people for a peer review.
- Address the comments and improvements you get from the peer review.
- Mention
@CartoDB/dataservices
in the PR to get it merged intodevelop
.
In order for a pull request to be accepted, the following criteria should be met:
- The peer review should pass and no major issue should be left unaddressed.
- CI tests must pass (travis will take care of that).
Development Guidelines
For a detailed description of the development process please see the CONTRIBUTING.md guide.
Testing
The tests (both for SQL and Python) are executed by running, from the top directory:
sudo make install
make test
Release
The release process is described in the RELEASE.md guide and is the responsibility of the designated release manager.