A set of modules for automated identification of species.
There are multiple proxy modules for communicating with various services and a single indicia_ai module offering a uniform interface to all the available services.
Refer to the README of each module for a detailed description. It is the intention that users will only interact with the indicia_ai module.
The module has a dependancy on the Indicia iForm module. If this is not already present on your website then it will need adding. Some familiarity with composer is assumed.
Edit the composer.json file in the root of your website and add a repository thus:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/Indicia-Team/drupal-8-modules-indicia-ai"
}
]
At a command prompt, change directory to the root of your site and execute
composer require indicia/indicia-ai
Edit the composer.json file in the root of your website and add repositories thus:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/Indicia-Team/drupal-8-modules-indicia-ai"
},
{
"type": "vcs",
"url": "https://github.com/Indicia-Team/drupal-8-module-iform"
},
{
"type": "vcs",
"url": "https://github.com/Indicia-Team/client_helpers"
},
{
"type": "vcs",
"url": "https://github.com/Indicia-Team/media"
}
]
Still in composer.json, add installer paths thus:
"extra": {
"installer-paths": {
"web/modules/custom/iform/{$name}": [
"indicia/client_helpers",
"indicia/media"
],
"web/modules/custom/{$name}": ["type:drupal-custom-module"]
}
},
At a command prompt, change directory to the root of your site and execute
composer require indicia/indicia-ai drupal/iform indicia/client_helpers indicia/media
Repositories and installer-paths are not inherited from the composer files of dependencies which is why we need to add them in the root composer.json file.
After installing the module,
- Select Extend from the admin menu and enable the Indicia AI module and the submodules corresponding to all the classifiers you want to use,
Refer to the README for each module for information about configuration.
You will particularly want to look at the Indicia AI README which explains how to make requests for classification.
The IForm module must also be enabled and configured if it is not already. Configuration requires going to Configuration > Indicia Integration > Indicia settings and making the following settings
- Indicia warehouse, check BRC Live Wareshouse 1
- Indicia Website ID, set to
1
if there is no Indicia configuration specific to the website where you have installed the Indicia AI module. - Password, set to
password
if Indicia Website ID = 1, else the password present on the warehouse for your website.
A DDEV configuration is provided for local development. To set this up
-
If not already present install DDEV.
-
Git clone the module from github.
-
At a command prompt, change to the folder where you just cloned the module and run
ddev start
. -
Run
ddev poser
.- When asked to trust php-http/discovery, respond with y(es).
- When asked to trust tbachert/spi, respond with n(o)
-
Run
ddev symlink-project
. -
With a browser, navigate to the url given by DDEV, probably https://drupal-8-modules-indicia-ai.ddev.site and complete the normal Drupal installation
Additional ddev commands are courtesy of https://github.com/ddev/ddev-drupal-contrib
For information on step debugging, see the configuration instructions.
Follow the configuration instructions above to enable and configure the module.