From 78796521259a52f72757ad98d9304153316366cb Mon Sep 17 00:00:00 2001 From: pdelboca Date: Thu, 4 Mar 2021 11:45:42 -0300 Subject: [PATCH 1/2] Update Docs and Makefile --- Makefile | 30 +-- README.rst | 336 +------------------------ api-demo.sh | 19 -- ckanext/versions/cli.py | 2 + ckanext/versions/logic/action.py | 15 +- ckanext/versions/tests/fixtures.py | 1 + ckanext/versions/tests/test_auth.py | 38 ++- ckanext/versions/tests/test_helpers.py | 7 +- test.ini | 2 +- 9 files changed, 60 insertions(+), 390 deletions(-) delete mode 100755 api-demo.sh diff --git a/Makefile b/Makefile index b8f17ca..ece65d1 100644 --- a/Makefile +++ b/Makefile @@ -6,32 +6,20 @@ SHELL := bash PIP := pip ISORT := isort FLAKE8 := flake8 -NOSETESTS := nosetests +PYTEST := pytest SED := sed -PASTER := paster +CKAN := ckan TEST_INI_PATH := ./test.ini -CKAN_PATH := ../../src/ckan +CKAN_PATH := ../ckan -prepare-config: - $(SED) "s@use = config:.*@use = config:$(CKAN_PATH)/test-core.ini@" -i $(TEST_INI_PATH) -test: prepare-config +test: $(PIP) install -r dev-requirements.txt $(ISORT) -rc -df -c $(PACKAGE_DIR) $(FLAKE8) $(PACKAGE_DIR) - $(PASTER) --plugin=ckan db init -c $(CKAN_PATH)/test-core.ini - $(NOSETESTS) --ckan \ - --with-pylons=$(TEST_INI_PATH) \ - --nologcapture \ - --with-doctest - -coverage: prepare-config test - $(NOSETESTS) --ckan \ - --with-pylons=$(TEST_INI_PATH) \ - --nologcapture \ - --with-coverage \ - --cover-package=ckanext.versions \ - --cover-inclusive \ - --cover-erase \ - --cover-tests + $(CKAN) -c $(CKAN_PATH)/test-core.ini db init + $(PYTEST) --ckan-ini=$(TEST_INI_PATH) \ + -s \ + --cov=ckanext.versions \ + ckanext/versions diff --git a/README.rst b/README.rst index 776c688..8f2ac76 100644 --- a/README.rst +++ b/README.rst @@ -2,21 +2,24 @@ ckanext-versions ============= -This CKAN extension adds an ability to create and manage named dataset -versions in CKAN. +This CKAN extension adds an ability to create and manage named resources +versions in CKAN. Currently under development so there are no stable versions of it. -Internally, this extension will use CKAN's VDM revisions to preserve +Internally, this extension will use CKAN's 2.9 activities to preserve old revisions of metadata, and ensure uploaded data resources are unique -and do not replace or override each other as dataset resources are modified. +and do not replace or override each other as resources are modified. -As interface, this extension exposes a minimal UI to access and manage -dataset versions, and a few new API actions described below. +Although the extension has it's own Uploader this extensions it is designed to be +used with `ckanext-blob-storage `_ + +As interface, this extension exposes a few new API actions described below. (no +UI work yet) ------------ Requirements ------------ -ckanext-versions has been tested to work with CKAN 2.8. It may work with -other versions as well. +ckanext-versions has been tested to work only with CKAN 2.9. It is not compatible +with CKAN 2.8 or older versions. ------------ Installation @@ -42,322 +45,12 @@ To install ckanext-versions: 4. Initialize the database tables required for this extension by running:: - paster --plugin=ckanext-versions versions init-db + ckan -c /etc/ckan/default/production.ini versions initdb 4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:: sudo service apache2 reload ------------ -API Actions ------------ -This extension exposes a number of new API actions to manage and use -dataset versions. - -The HTTP method is GET for list / show actions and POST for create / delete -actions. - -You will need to also pass in authentication information such as cookies or -tokens - you should consult the `CKAN API Guide -`_ for details. - -The following ``curl`` examples all assume the ``$API_KEY`` environment -variable is set and contains a valid CKAN API key, belonging to a user with -sufficient privileges; Output is indented and cleaned up for readability. - -``dataset_version_list`` -^^^^^^^^^^^^^^^^^^^^^^^^ -List versions for a dataset. - -**HTTP Method**: ``GET`` - -**Query Parameters**: - -* ``dataset=`` - The UUID or unique name of the dataset (required) - -**Example**:: - - $ curl -H "Authorization: $API_KEY" \ - https://ckan.example.com/api/3/action/dataset_version_list?dataset=my-awesome-dataset - - { - "help": "http://ckan.example.com/api/3/action/help_show?name=dataset_version_list", - "success": true, - "result": [ - { - "id": "5942ab7a-67cb-426c-ad99-dd4519530bc7", - "package_id": "3b5a4f83-8770-4e8c-9630-c8abf6aa20f4", - "package_revision_id": "7316fb6c-07e7-43b7-ade8-ac26c5693e6d", - "name": "Version 1.2", - "description": "Updated to include latest study results", - "creator_user_id": "70587302-6a93-4c0a-bb3e-4d64c0b7c213", - "created": "2019-10-27 15:29:53.452833" - }, - { - "id": "87d6f58a-a899-4f2d-88a4-c22e9e1e5dfb", - "package_id": "3b5a4f83-8770-4e8c-9630-c8abf6aa20f4", - "package_revision_id": "1b9fc99e-8e32-449e-85c2-24c893d9761e", - "name": "Corrected for inflation", - "description": "With Avi Bitter", - "creator_user_id": "70587302-6a93-4c0a-bb3e-4d64c0b7c213", - "created": "2019-10-27 15:29:16.070904" - }, - { - "id": "3e5601e2-1b39-43b6-b197-8040cc10036e", - "package_id": "3b5a4f83-8770-4e8c-9630-c8abf6aa20f4", - "package_revision_id": "e30ba6a8-d453-4395-8ee5-3aa2f1ca9e1f", - "name": "Version 1.0", - "description": "Added another resource with index of countries", - "creator_user_id": "70587302-6a93-4c0a-bb3e-4d64c0b7c213", - "created": "2019-10-27 15:24:25.248153" - } - ] - } - -``dataset_version_show`` -^^^^^^^^^^^^^^^^^^^^^^^^ -Show info about a specific dataset version. - -Note that this will show the version information - not the dataset metadata or -data (see `package_show_version`_) - -**HTTP Method**: ``GET`` - -**Query Parameters**: - - * ``id=`` - The UUID of the version to show (required) - -**Example**:: - - $ curl -H "Authorization: $API_KEY" \ - https://ckan.example.com/api/3/action/dataset_version_show?id=5942ab7a-67cb-426c-ad99-dd4519530bc7 - - { - "help": "http://ckan.example.com/api/3/action/help_show?name=dataset_version_show", - "success": true, - "result": { - "id": "5942ab7a-67cb-426c-ad99-dd4519530bc7", - "package_id": "3b5a4f83-8770-4e8c-9630-c8abf6aa20f4", - "package_revision_id": "7316fb6c-07e7-43b7-ade8-ac26c5693e6d", - "name": "Version 1.2", - "description": "Updated to include latest study results", - "creator_user_id": "70587302-6a93-4c0a-bb3e-4d64c0b7c213", - "created": "2019-10-27 15:29:53.452833" - } - } - -``dataset_version_create`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Create a new version for the specified dataset *current* revision. You are -required to specify a name for the version, and can optionally specify a -description. - -**HTTP Method**: ``POST`` - -**JSON Parameters**: - - * ``dataset=`` - UUID or name of the dataset (required, string) - * ``name``=`` - Name for the version. Version names must be - unique per dataset (required, string) - * ``description=`` - Long description for the version; Can be - markdown formatted (optional, string) - -**Example**:: - - $ curl -H "Authorization: $API_KEY" \ - -H "Content-type: application/json" \ - -X POST \ - https://ckan.example.com/api/3/action/dataset_version_create \ - -d '{"dataset":"3b5a4f83-8770-4e8c-9630-c8abf6aa20f4", "name": "Version 1.3", "description": "With extra Awesome Sauce"}' - - { - "help": "https://ckan.example.com/api/3/action/help_show?name=dataset_version_create", - "success": true, - "result": { - "id": "e1a77b78-dfaf-4c05-a261-ff01af10d601", - "package_id": "3b5a4f83-8770-4e8c-9630-c8abf6aa20f4", - "package_revision_id": "96ad6e02-99cf-4598-ab10-ea80e864e505", - "name": "Version 1.3", - "description": "With extra Awesome Sauce", - "creator_user_id": "70587302-6a93-4c0a-bb3e-4d64c0b7c213", - "created": "2019-10-28 08:14:01.953796" - } - } - -``dataset_version_delete`` -^^^^^^^^^^^^^^^^^^^^^^^^^^ -Delete a dataset version. This does not delete the metadata revision, just the -named version pointing to it, and any data not pointed to by any other version. - -**HTTP Method**: ``POST`` - -**JSON Parameters**: - - * ``id=`` - The UUID of the version to delete (required, - string) - -**Example**:: - - $ curl -H "Authorization: $API_KEY" \ - -H "Content-type: application/json" \ - -X POST \ - https://ckan.example.com/api/3/action/dataset_version_delete \ - -d '{"id":"e1a77b78-dfaf-4c05-a261-ff01af10d601"}' - - { - "help": "https://ckan.example.com/api/3/action/help_show?name=dataset_version_delete", - "success": true, - "result": null - } - -``package_show_version`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Show a dataset (AKA package) in a given version. This is identical to the -built-in ``package_show`` action, but shows dataset metadata for a given -version, and adds some versioning related metadata. - -This is useful if you've used ``dataset_version_list`` to get all -named versions for a dataset, and now want to show that dataset in a specific -version. - -If ``version_id`` is not specified, the latet version of the dataset will be -returned, but will include a list of versions for the dataset. - -**HTTP Method**: ``GET`` - -**Query Parameters**: - - * ``id=`` - The name or UUID of the dataset (required) - * ``version_id=`` - A version UUID to show (optional) - -**Examples**: - -Fetching dataset metadata in a specified version:: - - $ curl -H "Authorization: $API_KEY" \ - 'https://ckan.example.com/api/3/action/package_show_version?id=3b5a4f83-8770-4e8c-9630-c8abf6aa20f4&version_id=5942ab7a-67cb-426c-ad99-dd4519530bc7' - - { - "help": "https://ckan.example.com/api/3/action/help_show?name=package_show_version", - "success": true, - "result": { - "maintainer": "Bob Paulson", - "relationships_as_object": [], - "private": true, - "maintainer_email": "", - "num_tags": 2, - - "version_metadata": { - "id": "5942ab7a-67cb-426c-ad99-dd4519530bc7", - "package_id": "3b5a4f83-8770-4e8c-9630-c8abf6aa20f4", - "package_revision_id": "7316fb6c-07e7-43b7-ade8-ac26c5693e6d", - "name": "Version 1.2", - "description": "Without Avi Bitter", - "creator_user_id": "70587302-6a93-4c0a-bb3e-4d64c0b7c213", - "created": "2019-10-27 15:29:53.452833" - }, - - "id": "3b5a4f83-8770-4e8c-9630-c8abf6aa20f4", - "metadata_created": "2019-10-27T15:23:50.612130", - "owner_org": "68f832f7-5952-4cac-8803-4af55c021ccd", - "metadata_modified": "2019-10-27T20:14:42.564886", - "author": "Joe Bloggs", - "author_email": "", - "state": "active", - "version": "1.0", - "type": "dataset", - "resources": [ - { - "cache_last_updated": null, - "cache_url": null, - "mimetype_inner": null, - /// ... standard resource attributes ... - } - ], - "num_resources": 1, - - /// ... more standard dataset attributes ... - } - } - -Note the ``version_metadata``, which is only included with dataset metadata if -the ``version_id`` parameter was provided. - -Fetching the current version of dataset metadata in a specified version:: - - { - "help": "https://ckan.example.com/api/3/action/help_show?name=package_show_version", - "success": true, - "result": { - "license_title": "Green", - "relationships_as_object": [], - "private": true, - "id": "3b5a4f83-8770-4e8c-9630-c8abf6aa20f4", - "metadata_created": "2019-10-27T15:23:50.612130", - "metadata_modified": "2019-10-27T20:14:42.564886", - "author": "Joe Bloggs", - "author_email": "", - "state": "active", - "version": "1.0", - "creator_user_id": "70587302-6a93-4c0a-bb3e-4d64c0b7c213", - "type": "dataset", - "resources": [ - { - "mimetype": "text/csv", - "cache_url": null, - "hash": "", - "description": "", - "name": "https://data.example.com/dataset/287f7e34-7675-49a9-90bd-7c6a8b55698e/resource.csv", - "format": "CSV", - /// ... standard resource attributes ... - } - ], - "num_resources": 1, - "tags": [ - { - "vocabulary_id": null, - "state": "active", - "display_name": "bar", - "id": "686198e2-7b9c-4986-bb19-3cf74cfe2552", - "name": "bar" - }, - { - "vocabulary_id": null, - "state": "active", - "display_name": "foo", - "id": "82259424-aec6-428c-a682-0b3f6b8ee67d", - "name": "foo" - } - ], - - "versions": [ - { - "id": "5942ab7a-67cb-426c-ad99-dd4519530bc7", - "package_id": "3b5a4f83-8770-4e8c-9630-c8abf6aa20f4", - "package_revision_id": "7316fb6c-07e7-43b7-ade8-ac26c5693e6d", - "name": "Version 1.2", - "description": "Fixed some inaccuracies in data", - "creator_user_id": "70587302-6a93-4c0a-bb3e-4d64c0b7c213", - "created": "2019-10-27 15:29:53.452833" - }, - { - "id": "87d6f58a-a899-4f2d-88a4-c22e9e1e5dfb", - "package_id": "3b5a4f83-8770-4e8c-9630-c8abf6aa20f4", - "package_revision_id": "1b9fc99e-8e32-449e-85c2-24c893d9761e", - "name": "version 1.1", - "description": "Adjusted for country-specific inflation", - "creator_user_id": "70587302-6a93-4c0a-bb3e-4d64c0b7c213", - "created": "2019-10-27 15:29:16.070904" - } - ], - - /// ... more standard dataset attributes ... - } - } - - -Note the ``version`` list, only included when showing the latest -dataset version via ``package_show_version``. --------------- Config Settings @@ -385,11 +78,6 @@ To run the tests, do:: make test -To run the tests and produce a coverage report, first make sure you have -coverage installed in your virtualenv (``pip install coverage``) then run:: - - make test coverage - Note that for tests to run properly, you need to have this extension installed in an environment that has CKAN installed in it, and configured to access a local PostgreSQL and Solr instances. diff --git a/api-demo.sh b/api-demo.sh deleted file mode 100755 index d2d8fe2..0000000 --- a/api-demo.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -x - -# See https://docs.ckan.org/en/2.8/api/#authentication-and-api-keys -API_KEY="" - -# Get the dataset ID -curl -H "Authorization: $API_KEY" "http://localhost:5000/api/3/action/package_show?name_or_id=my-version-dataset" - -# Check that there are no versions for now -curl -H "Authorization: $API_KEY" "http://localhost:5000/api/3/action/dataset_version_list?dataset=f3860fa7-acd7-4c40-80c5-5c7a8f3c092f" - -# Create a version for the current revision of my-version-dataset -curl -H "Authorization: $API_KEY" -X POST "http://localhost:5000/api/3/action/dataset_version_create" -d "dataset=my-version-dataset&name=Release01&description='initial release'" - -# List versions for the dataset -curl -H "Authorization: $API_KEY" "http://localhost:5000/api/3/action/dataset_version_list?dataset=f3860fa7-acd7-4c40-80c5-5c7a8f3c092f" - -# Show the revision in the version to get the dataset -curl -H "Authorization:$API_KEY" "http://ckan-dev:5000/api/3/action/package_show_revision?id=my-version-dataset&revision_id=7c91a05c-09fe-4713-9141-3033ef12c2d6" diff --git a/ckanext/versions/cli.py b/ckanext/versions/cli.py index 42a2cc0..0a44619 100644 --- a/ckanext/versions/cli.py +++ b/ckanext/versions/cli.py @@ -4,6 +4,7 @@ from ckanext.versions.model import create_tables, tables_exist + @click.group() def versions(): '''versions commands @@ -23,6 +24,7 @@ def initdb(ctx): create_tables() click.secho('Dataset versions tables created', fg="green") + @versions.command() @click.pass_context def cleandb(ctx): diff --git a/ckanext/versions/logic/action.py b/ckanext/versions/logic/action.py index ace0215..5c6c6ff 100644 --- a/ckanext/versions/logic/action.py +++ b/ckanext/versions/logic/action.py @@ -6,12 +6,10 @@ from datetime import datetime from ckan import model as core_model -from ckan.logic.action.get import package_show as core_package_show from ckan.logic.action.get import resource_show as core_resource_show from ckan.plugins import toolkit from sqlalchemy.exc import IntegrityError -from ckanext.versions.logic import helpers as h from ckanext.versions.model import Version log = logging.getLogger(__name__) @@ -93,12 +91,13 @@ def version_create(context, data_dict): assert context.get('auth_user_obj') # Should be here after `check_access` latest_revision_id = dataset.latest_related_revision.id - version = Version(package_id=dataset.id, - package_revision_id=latest_revision_id, - name=name, - description=data_dict.get('description', None), - created=datetime.utcnow(), - creator_user_id=context['auth_user_obj'].id) + version = Version( + package_id=dataset.id, + package_revision_id=latest_revision_id, + name=name, + description=data_dict.get('description', None), + created=datetime.utcnow(), + creator_user_id=context['auth_user_obj'].id) # I'll create my own session! With Blackjack! And H**kers! session = model.meta.create_local_session() diff --git a/ckanext/versions/tests/fixtures.py b/ckanext/versions/tests/fixtures.py index b7d4dc4..460aa19 100644 --- a/ckanext/versions/tests/fixtures.py +++ b/ckanext/versions/tests/fixtures.py @@ -2,6 +2,7 @@ from ckanext.versions.model import create_tables, tables_exist + @pytest.fixture def versions_setup(): if not tables_exist(): diff --git a/ckanext/versions/tests/test_auth.py b/ckanext/versions/tests/test_auth.py index 2cb3d7b..69be8e0 100644 --- a/ckanext/versions/tests/test_auth.py +++ b/ckanext/versions/tests/test_auth.py @@ -14,7 +14,7 @@ def _get_context(self, user): } def setup(self): - #TODO: Refactor to a new pytest approach + # TODO: Refactor to a new pytest approach self.org_admin = factories.User() self.org_editor = factories.User() self.org_member = factories.User() @@ -40,7 +40,7 @@ def setup(self): self.public_dataset = factories.Dataset(owner_org=self.org['id'], private=False) - @pytest.mark.parametrize("user_type, dataset_type",[ + @pytest.mark.parametrize("user_type, dataset_type", [ ('org_admin', 'private_dataset'), ('org_admin', 'public_dataset'), ('org_editor', 'private_dataset'), @@ -58,7 +58,7 @@ def test_create_is_authorized(self, user_type, dataset_type): context=context, dataset=dataset['id']) - @pytest.mark.parametrize("user_type, dataset_type",[ + @pytest.mark.parametrize("user_type, dataset_type", [ ('org_member', 'private_dataset'), ('org_member', 'public_dataset'), ('other_org_admin', 'private_dataset'), @@ -72,9 +72,12 @@ def test_create_is_unauthorized(self, user_type, dataset_type): dataset = getattr(self, dataset_type) context = self._get_context(user) with pytest.raises(toolkit.NotAuthorized): - helpers.call_auth('version_create',context=context,dataset=dataset['id']) + helpers.call_auth( + 'version_create', + context=context, + dataset=dataset['id']) - @pytest.mark.parametrize("user_type, dataset_type",[ + @pytest.mark.parametrize("user_type, dataset_type", [ ('org_admin', 'private_dataset'), ('org_admin', 'public_dataset'), ('org_editor', 'private_dataset'), @@ -92,7 +95,7 @@ def test_delete_is_authorized(self, user_type, dataset_type): context=context, dataset=dataset['id']) - @pytest.mark.parametrize("user_type, dataset_type",[ + @pytest.mark.parametrize("user_type, dataset_type", [ ('org_member', 'private_dataset'), ('org_member', 'public_dataset'), ('other_org_admin', 'private_dataset'), @@ -106,9 +109,12 @@ def test_delete_is_unauthorized(self, user_type, dataset_type): dataset = getattr(self, dataset_type) context = self._get_context(user) with pytest.raises(toolkit.NotAuthorized): - helpers.call_auth('version_delete', context=context, dataset=dataset['id']) + helpers.call_auth( + 'version_delete', + context=context, + dataset=dataset['id']) - @pytest.mark.parametrize("user_type, dataset_type",[ + @pytest.mark.parametrize("user_type, dataset_type", [ ('org_admin', 'private_dataset'), ('org_admin', 'public_dataset'), ('org_editor', 'private_dataset'), @@ -129,7 +135,7 @@ def test_list_is_authorized(self, user_type, dataset_type): context=context, dataset=dataset['id']) - @pytest.mark.parametrize("user_type, dataset_type",[ + @pytest.mark.parametrize("user_type, dataset_type", [ ('other_org_admin', 'private_dataset'), ]) def test_list_is_unauthorized(self, user_type, dataset_type): @@ -140,9 +146,12 @@ def test_list_is_unauthorized(self, user_type, dataset_type): dataset = getattr(self, dataset_type) context = self._get_context(user) with pytest.raises(toolkit.NotAuthorized): - helpers.call_auth('version_list', context=context, dataset=dataset['id']) + helpers.call_auth( + 'version_list', + context=context, + dataset=dataset['id']) - @pytest.mark.parametrize("user_type, dataset_type",[ + @pytest.mark.parametrize("user_type, dataset_type", [ ('org_admin', 'private_dataset'), ('org_admin', 'public_dataset'), ('org_editor', 'private_dataset'), @@ -163,7 +172,7 @@ def test_show_is_authorized(self, user_type, dataset_type): context=context, dataset=dataset['id']) - @pytest.mark.parametrize("user_type, dataset_type",[ + @pytest.mark.parametrize("user_type, dataset_type", [ ('other_org_admin', 'private_dataset'), ]) def test_show_is_unauthorized(self, user_type, dataset_type): @@ -174,4 +183,7 @@ def test_show_is_unauthorized(self, user_type, dataset_type): dataset = getattr(self, dataset_type) context = self._get_context(user) with pytest.raises(toolkit.NotAuthorized): - helpers.call_auth('version_show', context=context, dataset=dataset['id']) + helpers.call_auth( + 'version_show', + context=context, + dataset=dataset['id']) diff --git a/ckanext/versions/tests/test_helpers.py b/ckanext/versions/tests/test_helpers.py index d8f6ff3..53dc162 100644 --- a/ckanext/versions/tests/test_helpers.py +++ b/ckanext/versions/tests/test_helpers.py @@ -1,5 +1,4 @@ import pytest - from ckan.tests import factories from ckanext.versions.logic import helpers @@ -9,7 +8,7 @@ class TestHelpers(object): def setup(self): - #TODO: Refactor to a new pytest approach + # TODO: Refactor to a new pytest approach self.admin_user = factories.Sysadmin() self.org = factories.Organization( @@ -32,7 +31,7 @@ def test_dataset_has_link_resources(self): self.dataset['resources'].extend([upload_resource, link_resource]) - assert helpers.has_link_resources(self.dataset) == True + assert helpers.has_link_resources(self.dataset) is True def test_dataset_does_not_has_link_resources(self): upload_resource = factories.Resource( @@ -42,4 +41,4 @@ def test_dataset_does_not_has_link_resources(self): self.dataset['resources'].append(upload_resource) - assert helpers.has_link_resources(self.dataset) == False + assert helpers.has_link_resources(self.dataset) is False diff --git a/test.ini b/test.ini index ac8c466..1964d0d 100644 --- a/test.ini +++ b/test.ini @@ -34,7 +34,7 @@ handlers = console [logger_ckan] qualname = ckan handlers = -level = INFO +level = WARN [logger_sqlalchemy] handlers = From 5373e4cf5e60bc14960d6c7d19d70412a64d91f5 Mon Sep 17 00:00:00 2001 From: pdelboca Date: Thu, 4 Mar 2021 11:57:19 -0300 Subject: [PATCH 2/2] Remove old gitlab ci file --- .gitlab-ci.yml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 0ce368b..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,19 +0,0 @@ -variables: - POSTGRES_DB: ckan_test - POSTGRES_USER: ckan - POSTGRES_PASSWORD: ckan - - CKAN_SQLALCHEMY_URL: postgres://ckan:ckan@postgres/ckan_test - CKAN_SOLR_URL: http://ckan__solr:8983/solr/ckan - -default: - services: - - postgres:9.3 - - ckan/solr - -test:ckan-2.8: - image: openknowledge/ckan-dev:2.8 - script: - - pip install -r requirements.txt - - pip install . - - make test CKAN_PATH=/srv/app/src/ckan