Skip to content

Commit

Permalink
Merge pull request #39 from fabianazioti/realease04
Browse files Browse the repository at this point in the history
add test dependency
  • Loading branch information
raphaelrpl authored Dec 16, 2020
2 parents d9297c4 + 46798b5 commit 4085677
Show file tree
Hide file tree
Showing 8 changed files with 499 additions and 19 deletions.
29 changes: 21 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,44 @@ branches:
only:
- master
- b-0.2
- b-0.4.0


dist: bionic

python:
- "3.7"

env:
matrix:
- SQLALCHEMY_DATABASE_URI="postgresql://postgres:postgres@127.0.0.1:5432/bdc_lccs"
addons:
apt:
packages:
- postgresql-12
- postgresql-client-12

env:
global:
- SQLALCHEMY_DATABASE_URI="postgresql://postgres:lccs_db@localhost:5432/bdc_lccs"

before_install:
- pip install --upgrade pip
- pip install --upgrade setuptools
- sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf
- sudo cp /etc/postgresql/{9.3,12}/main/pg_hba.conf
- sudo pg_ctlcluster 12 main restart

install:
- pip install -e .[tests,docs]
- docker pull postgis/postgis:12-3.0
- docker run --name bdc_lccs -p 127.0.0.1:5432:5432 -e POSTGRES_PASSWORD=postgres -d postgis/postgis:12-3.0
- docker ps -a

before_script:
- psql -c "ALTER USER postgres PASSWORD 'lccs_db';" -U postgres
- lccs_db db init
- lccs_db db create-namespaces
- lccs_db alembic upgrade
- lccs_db db load-scripts


script:
- ./run-tests.sh

after_success:
- docker stop bdc-pg
- docker rm bdc-pg
- coveralls
6 changes: 3 additions & 3 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
Changes
=======

Version 0.4.0-0 (2020-12-15)
Version 0.4.0-0 (2020-12-16)
----------------------------

- Compatibility with `LCC-DB Version 0.4.0 <https://github.com/brazil-data-cube/lccs-db>`_.

- Support for the `LCCS-WS specification version 0.4.0-0 <https://github.com/brazil-data-cube/lccs-ws-spec>`_.

- Improved Sphinx template.

- Fixed small typos in documentation.




Version 0.2.0 (2020-04-16)
--------------------------

Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
'pytest-pep8>=1.0',
'pydocstyle>=4.0',
'isort>4.3',
'check-manifest>=0.40'
'check-manifest>=0.40',
'requests-mock>=1.7.0',
]

docs_require = [
Expand Down
64 changes: 64 additions & 0 deletions tests/json_schemas/classes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"links": [
{
"href": "http://localhost:5000/classification_system/PRODES/classes",
"rel": "self",
"title": "Classes of the classification system PRODES",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES",
"rel": "parent",
"title": "Link to classification system",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_systems",
"rel": "parent",
"title": "Link to classification systems",
"type": "application/json"
},
{
"href": "http://localhost:5000/",
"rel": "root",
"title": "API landing page",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Desflorestamento",
"rel": "child",
"title": "Classification System Classes",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Floresta",
"rel": "child",
"title": "Classification System Classes",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Hidrografia",
"rel": "child",
"title": "Classification System Classes",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Não Floresta",
"rel": "child",
"title": "Classification System Classes",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Nuvem",
"rel": "child",
"title": "Classification System Classes",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes/Resíduo",
"rel": "child",
"title": "Classification System Classes",
"type": "application/json"
}
]
}
39 changes: 39 additions & 0 deletions tests/json_schemas/classification_system.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"authority_name": "INPE",
"description": "Sistema de Classificação Anual de Desmatamento",
"id": 1,
"links": [
{
"href": "http://localhost:5000/classification_system",
"rel": "parent",
"title": "Link to this document",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES",
"rel": "self",
"title": "The classification_system",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/classes",
"rel": "classes",
"title": "The classes related to this item",
"type": "application/json"
},
{
"href": "http://localhost:5000/classification_system/PRODES/styles",
"rel": "styles",
"title": "The styles related to this item",
"type": "application/json"
},
{
"href": "http://localhost:5000/",
"rel": "root",
"title": "API landing page.",
"type": "application/json"
}
],
"name": "PRODES",
"version": "1.0"
}
Loading

0 comments on commit 4085677

Please sign in to comment.