Metadata-Version: 2.0
Name: c2cgeoportal-admin
Version: 2.3.3.dev1
Summary: c2cgeoportal admin
Home-page: http://www.camptocamp.com/solutions/geospatial/
Author: Camptocamp
Author-email: info@camptocamp.com
License: UNKNOWN
Description-Content-Type: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Framework :: Pyramid
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Requires-Dist: c2cgeoform
Requires-Dist: c2cwsgiutils
Requires-Dist: colander
Requires-Dist: deform
Requires-Dist: iso8601 (==0.1.11)
Requires-Dist: passwordgenerator
Requires-Dist: pyproj
Requires-Dist: pyramid
Requires-Dist: pyramid-debugtoolbar
Requires-Dist: pyramid-jinja2
Requires-Dist: pyramid-tm
Requires-Dist: sqlalchemy
Requires-Dist: zope.event
Requires-Dist: translationstring
Provides-Extra: testing
Requires-Dist: flake8; extra == 'testing'
Requires-Dist: pytest; extra == 'testing'
Requires-Dist: pytest-cov; extra == 'testing'
Requires-Dist: pytest-selenium; extra == 'testing'
Requires-Dist: WebTest (>=1.3.1); extra == 'testing'
Requires-Dist: waitress; extra == 'testing'

# c2cgeoportal_admin

### Checkout

```
git clone git@github.com:camptocamp/c2cgeoportal.git
cd admin
```

### Set up the database
```
sudo -u postgres psql -c "CREATE USER \"www-data\" WITH PASSWORD 'www-data';"

DATABASE=c2cgeoportal
sudo -u postgres psql -c "CREATE DATABASE $DATABASE WITH OWNER \"www-data\";"
sudo -u postgres psql -d $DATABASE -c "CREATE EXTENSION postgis;"
```

Optionally update sqlachemy.url in development.ini or production.ini then:
```
admin/.build/venv/bin/python3 commons/c2cgeoportal_commons/testing/initializedb.py # to create the database
# or
sudo -u postgres psql -d c2cgeoportal -f ./docker/demo-dump.sql # to create and populate the database (demo data)
```

### Run the development web server
```
make serve
```

Open http://localhost:6543/users/

## Run the tests

### Install the selenium chrome driver

https://sites.google.com/a/chromium.org/chromedriver/downloads

### Requires Chrome Version > 65

### Create the test database
```
sudo -u postgres psql -c "CREATE USER \"www-data\" WITH PASSWORD 'www-data';"

DATABASE=geomapfish_tests
sudo -u postgres psql -c "CREATE DATABASE $DATABASE WITH OWNER \"www-data\";"
sudo -u postgres psql -d $DATABASE -c "CREATE EXTENSION postgis;"
```

### Run the tests
```
make test
```

Note that you can run all tests but selenium ones (really fast):
```
.build/venv/bin/pytest -m "not selenium"
```


