2016-08-13 00:17:13 +08:00
|
|
|
# Crankshaft [![Build Status](https://travis-ci.org/CartoDB/crankshaft.svg?branch=develop)](https://travis-ci.org/CartoDB/crankshaft)
|
2016-02-16 01:29:43 +08:00
|
|
|
|
2016-08-18 16:35:54 +08:00
|
|
|
CARTO Spatial Analysis extension for PostgreSQL.
|
2016-02-16 01:29:43 +08:00
|
|
|
|
|
|
|
## Code organization
|
|
|
|
|
2016-08-13 00:17:13 +08:00
|
|
|
* `doc/` documentation
|
|
|
|
* `src/` source code
|
|
|
|
- `pg/` contains the PostgreSQL extension source code
|
|
|
|
- `py/` Python module source code
|
2019-12-19 22:22:44 +08:00
|
|
|
* `release` released versions
|
2016-02-16 01:29:43 +08:00
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
2016-08-13 00:17:13 +08:00
|
|
|
* PostgreSQL
|
2019-12-19 22:22:44 +08:00
|
|
|
* plpythonu (for PG12+, plpython3u) and postgis extensions
|
2016-08-13 00:17:13 +08:00
|
|
|
* python-scipy system package (see [src/py/README.md](https://github.com/CartoDB/crankshaft/blob/develop/src/py/README.md))
|
2016-03-09 02:35:02 +08:00
|
|
|
|
2016-08-13 00:17:13 +08:00
|
|
|
# Development Process
|
2016-03-09 02:35:02 +08:00
|
|
|
|
2016-08-13 00:17:13 +08:00
|
|
|
We use the branch `develop` as the main integration branch for development. The `master` is reserved to handle releases.
|
2016-03-16 01:48:46 +08:00
|
|
|
|
2016-08-13 00:17:13 +08:00
|
|
|
The process is as follows:
|
|
|
|
|
2019-12-19 22:22:44 +08:00
|
|
|
1. Create a new **topic branch** from `develop` for any new feature or bugfix and commit their changes to it:
|
2016-08-17 16:39:53 +08:00
|
|
|
|
|
|
|
```shell
|
|
|
|
git fetch && git checkout -b my-cool-feature origin/develop
|
|
|
|
```
|
2016-08-13 00:17:13 +08:00
|
|
|
1. Code, commit, push, repeat.
|
|
|
|
1. Write some **tests** for your feature or bugfix.
|
2016-08-13 00:34:13 +08:00
|
|
|
1. Update the [NEWS.md](https://github.com/CartoDB/crankshaft/blob/develop/NEWS.md) doc.
|
2016-08-13 00:17:13 +08:00
|
|
|
1. Create a pull request and mention relevant people for a **peer review**.
|
|
|
|
1. Address the comments and improvements you get from the peer review.
|
|
|
|
|
|
|
|
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).
|
2016-03-17 00:19:21 +08:00
|
|
|
|
2016-03-16 01:48:46 +08:00
|
|
|
|
2016-03-17 00:42:28 +08:00
|
|
|
## Development Guidelines
|
2016-03-09 02:35:02 +08:00
|
|
|
|
2016-03-17 00:42:28 +08:00
|
|
|
For a detailed description of the development process please see
|
2016-08-13 00:17:13 +08:00
|
|
|
the [CONTRIBUTING.md](https://github.com/CartoDB/crankshaft/blob/develop/CONTRIBUTING.md) guide.
|
2016-03-11 02:13:46 +08:00
|
|
|
|
2016-03-17 00:19:21 +08:00
|
|
|
|
2016-08-13 00:17:13 +08:00
|
|
|
## Testing
|
2016-03-11 02:13:46 +08:00
|
|
|
|
2016-08-13 00:17:13 +08:00
|
|
|
The tests (both for SQL and Python) are executed by running, from the top directory:
|
2016-03-16 01:48:46 +08:00
|
|
|
|
2016-08-13 00:17:13 +08:00
|
|
|
```shell
|
2016-03-17 00:42:28 +08:00
|
|
|
sudo make install
|
|
|
|
make test
|
2016-03-16 01:48:46 +08:00
|
|
|
```
|
2016-03-09 02:35:02 +08:00
|
|
|
|
2016-03-11 02:13:46 +08:00
|
|
|
## Release
|
2016-03-09 02:35:02 +08:00
|
|
|
|
2016-08-13 00:17:13 +08:00
|
|
|
The release process is described in the
|
|
|
|
[RELEASE.md](https://github.com/CartoDB/crankshaft/blob/develop/RELEASE.md) guide and is the responsibility of the designated *release manager*.
|