From bc584f810a8468c52cb90a3d4b9041d3bbc5cff5 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 13 Apr 2016 17:06:27 +0200 Subject: [PATCH 1/8] Remove references to python --- README.md | 4 +--- RELEASE.md | 11 ++++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index cec3000..32805f9 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,7 @@ shall always be done in a topic branch created from the `develop` branch. Tests, documentation and peer code reviews are required for all modifications. -The tests (both for SQL and Python) are executed by running, -from the top directory: - +The tests are executed by running this from the top directory: ``` sudo make install make test diff --git a/RELEASE.md b/RELEASE.md index f13a660..7e4086d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -15,9 +15,7 @@ To do so [Semantic Versioning 2.0](http://semver.org/) is in order. Thew `NEWS.md` will be updated. The next command must be executed to produce the main installation -script for the new release, `release/observatory--X.Y.Z.sql` and -also to copy the python package to `release/python/X.Y.Z/observatory`. - +script for the new release, `release/observatory--X.Y.Z.sql`: ``` make release ``` @@ -58,12 +56,11 @@ sudo make deploy RELEASE_VERSION=X.Y.Z Intended for use by the release manager. * `sudo make deploy` will install the current release X.Y.Z from the - `release/` files into PostgreSQL and a Python virtual environment - `envs/X.Y.Z`. + `release/` files into PostgreSQL. Intended for use by the release manager and deployment jobs. * `sudo make deploy RELEASE_VERSION=X.Y.Z` will install specified version previously generated in `release/` - into PostgreSQL and a Python virtual environment `envs/X.Y.Z`. - Intended for use by the release manager and deployment jobs. + into PostgreSQL. + Intended to be used by the release manager and deployment jobs. ``` From e37f5afdabbe099e667825414c35f39a6eceedaf Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 13 Apr 2016 17:13:04 +0200 Subject: [PATCH 2/8] Minor doc improvements (code org) --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 32805f9..259f201 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,21 @@ # Observatory extension -CartoDB extension that implements the functions needed by the Observatory Service. +CartoDB extension that implements the row-level functions needed by the Observatory Service. ## Code organization -* *doc* documentation -* *src* source code -* - *src/pg* contains the PostgreSQL extension source code -* *release* reseleased versions +``` +. +├── doc # documentation +├── release # released versions +└── src # source code + └── pg + ├── sql + └── test + ├── expected + ├── fixtures + └── sql +``` # Development workflow From 6974c99a9b247647ec21f09dbeb3949fdfd113fb Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 13 Apr 2016 17:20:46 +0200 Subject: [PATCH 3/8] Fix relative links in markdown --- CONTRIBUTING.md | 2 +- README.md | 4 ++-- RELEASE.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1c3c8c2..14310db 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Development process -Please read the Working Process/Quickstart Guide in [[README.md]] first. +Please read the Working Process/Quickstart Guide in [README.md](README.md) first. For any modification of the observatory-extension, such as adding new features, refactoring or bug-fixing, a topic branch must be created out of the `develop` diff --git a/README.md b/README.md index 259f201..efe8b8b 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ and developers must not commit or merge into it. ## Development Guidelines For a detailed description of the development process please see -the [[CONTRIBUTING.md]] guide. +the [CONTRIBUTING.md](CONTRIBUTING.md) guide. Any modification to the source code shall always be done in a topic branch created from the `develop` branch. @@ -60,5 +60,5 @@ make test ## Release The release and deployment process is described in the -[[RELEASE.md]] guide and it is the responsibility of the designated +[RELEASE.md](RELEASE.md) guide and it is the responsibility of the designated release manager. diff --git a/RELEASE.md b/RELEASE.md index 7e4086d..0ed3c13 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,7 +1,7 @@ # Release & Deployment Process -Please read the Working Process/Quickstart Guide in [README.md]] -and the Development guidelines in [[CONTRIBUTING.md]]. +Please read the Working Process/Quickstart Guide in [README.md](README.md) +and the Development guidelines in [CONTRIBUTING.md](CONTRIBUTING.md). The release process of a new version of the extension shall be performed by the designated *Release Manager*. From 554c566d1941e2f414d4ec7f7ea1a626a96e254c Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 13 Apr 2016 17:23:45 +0200 Subject: [PATCH 4/8] Some small readability improvements --- CONTRIBUTING.md | 9 ++++----- RELEASE.md | 2 -- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 14310db..e951e91 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,9 +27,10 @@ make it available to PostgreSQL. Run the tests with `make test`. Update extension in a working database with: - -* `ALTER EXTENSION observatory VERSION TO 'current';` - `ALTER EXTENSION observatory VERSION TO 'dev';` +``` +ALTER EXTENSION observatory VERSION TO 'current'; +ALTER EXTENSION observatory VERSION TO 'dev'; +``` Note: we keep the current development version install as 'dev' always; we update through the 'current' alias to allow changing the extension @@ -58,7 +59,6 @@ to the release process for a new revision of the extension. ## Relevant development tasks available in the Makefile -``` * `make help` show a short description of the available targets * `sudo make install` will generate the extension scripts for the development @@ -67,4 +67,3 @@ to the release process for a new revision of the extension. * `make test` will run the tests for the installed development extension. Intended for use by developers. -``` diff --git a/RELEASE.md b/RELEASE.md index 0ed3c13..cc2a79e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -48,7 +48,6 @@ sudo make deploy RELEASE_VERSION=X.Y.Z ## Relevant release & deployment tasks available in the Makefile -``` * `make help` show a short description of the available targets * `make release` will generate a new release (version number defined in @@ -63,4 +62,3 @@ sudo make deploy RELEASE_VERSION=X.Y.Z previously generated in `release/` into PostgreSQL. Intended to be used by the release manager and deployment jobs. -``` From 0c813d081c4696571713b8fff83b6178febfeca5 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 13 Apr 2016 18:15:19 +0200 Subject: [PATCH 5/8] Ignore develop artifacts Ignore artifacts produced by `sudo make install`. --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index e43b0f9..4e3e7f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ .DS_Store +src/pg/observatory--current--dev.sql +src/pg/observatory--dev--current.sql +src/pg/observatory--dev.sql From 2f4f9412b03a813c7128bd41d5e65352a41a1d88 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 13 Apr 2016 18:16:35 +0200 Subject: [PATCH 6/8] Ignore test results directory Ignore contents of directory produced by `make test`. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4e3e7f4..de0c685 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ src/pg/observatory--current--dev.sql src/pg/observatory--dev--current.sql src/pg/observatory--dev.sql +src/pg/test/results From c35c453c251733f004deeda6f24f997ef6e50fa9 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 13 Apr 2016 18:17:23 +0200 Subject: [PATCH 7/8] Add plpythonu to install test Add `plpythonu` extension as it's a dependency to `cartodb` extension. --- src/pg/test/expected/01_install_test.out | 1 + src/pg/test/sql/01_install_test.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/src/pg/test/expected/01_install_test.out b/src/pg/test/expected/01_install_test.out index 99da48c..4851fd3 100644 --- a/src/pg/test/expected/01_install_test.out +++ b/src/pg/test/expected/01_install_test.out @@ -1,5 +1,6 @@ -- Install dependencies CREATE EXTENSION postgis; +CREATE EXTENSION plpythonu; CREATE EXTENSION cartodb; -- Install the extension CREATE EXTENSION observatory VERSION 'dev'; diff --git a/src/pg/test/sql/01_install_test.sql b/src/pg/test/sql/01_install_test.sql index 58502b1..f46a6e0 100644 --- a/src/pg/test/sql/01_install_test.sql +++ b/src/pg/test/sql/01_install_test.sql @@ -1,5 +1,6 @@ -- Install dependencies CREATE EXTENSION postgis; +CREATE EXTENSION plpythonu; CREATE EXTENSION cartodb; -- Install the extension From a5be7656396259399445edc508b4d1c94bc40639 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 13 Apr 2016 18:35:34 +0200 Subject: [PATCH 8/8] Ignore just a dir called (not a file) --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index de0c685..a108123 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ src/pg/observatory--current--dev.sql src/pg/observatory--dev--current.sql src/pg/observatory--dev.sql -src/pg/test/results +src/pg/test/results/