.. You should enable this project on travis-ci.org and coveralls.io to make
these badges work. The necessary Travis and Coverage config files have been
generated for you.
.. image:: https://travis-ci.org/datopian/ckanext-react_usmetadata.svg?branch=master
:target: https://travis-ci.org/datopian/ckanext-react_usmetadata
=============
ckanext-react_usmetadata
Embeds the React USMetadata App using custom paths
Requirements
Tested with GSA Inventory App and CKAN 2.5 and greater
Installation
The CKAN extension installs like a regular CKAN extension.
To update the embedded react application:
- Backup and remove this public folder
- Go to the react application directory
yarn build
- `cp -r build/static/* /path/to/ckanext-react_usmetadata/ckanext/react_usmetadata/public/
- type
ls public/js. The file names contain a hash value for example:
- runtime~main.7ba465df.js
- main.b0613878.chunk.js
- 2.758f1cc0.chunk.js
(Note that you can ignore the
.js.map files. Just leave them alone)
Copy the updated filenames for future reference.
- Do the same for the
public/css folder, recording the new filenames
- Open
/path/to/ckanext-react_usmetadata/templates/snippets/usmetadata_app.html
- Replace the
<script> and <link> tags with the new filenames from the previous steps.
- Test and commit the changes.
Development Installation
To install ckanext-react_usmetadata for development, activate your CKAN virtualenv and
do::
git clone https://github.com/datopian/ckanext-react_usmetadata.git
cd ckanext-react_usmetadata
python setup.py develop
pip install -r dev-requirements.txt
Running the Tests
To run the tests, do::
nosetests --nologcapture --with-pylons=test.ini
To run the tests and produce a coverage report, first make sure you have
coverage installed in your vi