Skip to content

Commit

Permalink
patch: update readme/docs
Browse files Browse the repository at this point in the history
usually wouldn't patch this but it's part of a larger standardisation release
  • Loading branch information
alycejenni authored Dec 1, 2022
2 parents fec49aa + cb7253f commit eb3d4fa
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[![Tests](https://img.shields.io/github/workflow/status/NaturalHistoryMuseum/ckanext-video/Tests?style=flat-square)](https://github.com/NaturalHistoryMuseum/ckanext-video/actions/workflows/main.yml)
[![Coveralls](https://img.shields.io/coveralls/github/NaturalHistoryMuseum/ckanext-video/main?style=flat-square)](https://coveralls.io/github/NaturalHistoryMuseum/ckanext-video)
[![CKAN](https://img.shields.io/badge/ckan-2.9.1-orange.svg?style=flat-square)](https://github.com/ckan/ckan)
[![CKAN](https://img.shields.io/badge/ckan-2.9.7-orange.svg?style=flat-square)](https://github.com/ckan/ckan)
[![Python](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8-blue.svg?style=flat-square)](https://www.python.org/)
[![Docs](https://img.shields.io/readthedocs/ckanext-video?style=flat-square)](https://ckanext-video.readthedocs.io)

Expand All @@ -27,38 +27,40 @@ Path variables used below:
- `$INSTALL_FOLDER` (i.e. where CKAN is installed), e.g. `/usr/lib/ckan/default`
- `$CONFIG_FILE`, e.g. `/etc/ckan/default/development.ini`

1. Clone the repository into the `src` folder:
## Installing from PyPI

```bash
cd $INSTALL_FOLDER/src
git clone https://github.com/NaturalHistoryMuseum/ckanext-video.git
```
```shell
pip install ckanext-video
```

2. Activate the virtual env:
## Installing from source

```bash
. $INSTALL_FOLDER/bin/activate
```
1. Clone the repository into the `src` folder:
```shell
cd $INSTALL_FOLDER/src
git clone https://github.com/NaturalHistoryMuseum/ckanext-video.git
```

3. Install the requirements from requirements.txt:
2. Activate the virtual env:
```shell
. $INSTALL_FOLDER/bin/activate
```

```bash
cd $INSTALL_FOLDER/src/ckanext-video
pip install -r requirements.txt
```
3. Install via pip:
```shell
pip install $INSTALL_FOLDER/src/ckanext-video
```

4. Run setup.py:
### Installing in editable mode

```bash
cd $INSTALL_FOLDER/src/ckanext-video
python setup.py develop
```
Installing from a `pyproject.toml` in editable mode (i.e. `pip install -e`) requires `setuptools>=64`; however, CKAN 2.9 requires `setuptools==44.1.0`. See [our CKAN fork](https://github.com/NaturalHistoryMuseum/ckan) for a version of v2.9 that uses an updated setuptools if this functionality is something you need.

5. Add 'video' to the list of plugins in your `$CONFIG_FILE`:
## Post-install setup

```ini
ckan.plugins = ... video
```
1. Add 'video' to the list of plugins in your `$CONFIG_FILE`:
```ini
ckan.plugins = ... video
```

<!--installation-end-->

Expand All @@ -79,23 +81,21 @@ After enabling this extension in the list of plugins, the Embedded Video view sh
# Testing

<!--testing-start-->
There is a Docker compose configuration available in this repository to make it easier to run tests.
There is a Docker compose configuration available in this repository to make it easier to run tests. The ckan image uses the Dockerfile in the `docker/` folder.

To run the tests against ckan 2.9.x on Python3:

1. Build the required images
```bash
docker-compose build
```
1. Build the required images:
```shell
docker-compose build
```

2. Then run the tests.
The root of the repository is mounted into the ckan container as a volume by the Docker compose
configuration, so you should only need to rebuild the ckan image if you change the extension's
dependencies.
```bash
docker-compose run ckan
```
The ckan image uses the Dockerfile in the `docker/` folder.
```shell
docker-compose run ckan
```
<!--testing-end-->

0 comments on commit eb3d4fa

Please sign in to comment.