FENNEC - Functional Exploration of Natural Networks and Ecological Communities.
The FENNEC is a tool that helps integrate trait data into ecological community analyses.
For that purpose traits are aggregated from various sources.
Those can then be mapped onto user provided community data.
As there are quite a few dependencies and setting everything up properly is highly dependent on the environment, we suggest using docker.
We provide ready to use docker containers with all dependencies bundled for easy setup and usage.
A local setup is not impossible but all current developers use the docker setup.
Therefore, we are best able to assist with that.
If you really need a local setup have a look at the dockerfile to see how things are installed there.
Also feel free to open issues with all the problems you encounter.
You will clone the repository to your local computer and mount it in a fully functional FENNEC docker environment.
This way you can develop locally (using your IDE of choice), view your changes immediately in a realistic running system.
In addition you can transpile code and run the tests without installing additional dependencies.
git clone https://github.com/molbiodiv/fennec --recursive
cd fennec
# your UID is used to run processes in the docker container so files in your repo are not owned by root
export UID=$UID
docker-compose -f docker/fennec/docker-compose-dev.yml up -d
Congratulations! You are good to go.
Point your browser to localhost:3141.
Important: The first time you run docker-compose up all installation/initialization steps will be performed and a database with example data is created.
After that the file .docker.initialized is created in the root of your repository which will skip the initialization on subsequent runs of docker-compose up.
If you need re-initialization remove this file but be aware that this might fail if the database already contains data.
The default config files that were created with init_dev.sh should be ok to get started but you might want to update app/config/parameters.yml with:
github_client_id
github_client_secret
ga_tracking
secret
The first two are required for "Login with GitHub", see this guide for details.
The third one is your Google Analytics tracking ID, with an empty ID, Google Analytics will be disabled.
The secret should be replaced with a random string as documented by symfony.
If you need to modify the docker-compose file (e.g. hard code your user id for better integration into your IDE, or for changing the db volume locations) you can do this:
This file is not under version control so you can modify it as you like and use this file after the -f parameter for all of the docker-compose commands.
The structure of the project is that of a default symfony 3 application.
Changes to the php code should be served immediately on localhost:3141 as we are using the development server.
If you need additional composer packages you can install them with
The js(x) and (s)css code is located in app/Resources/client.
Important: do not edit the js or css files in web/assets directly.
They are generated with the following command (assuming your working directory is the fennec repo):
docker-compose -f docker/fennec/docker-compose-dev.yml exec web /fennec-dev/node_modules/.bin/encore dev
If you need additional npm packages you can install them with
Beware that phinch is included as a git submodule so changes there should not be FENNEC specific.
However, if you change the .coffee files or checkout another version via git re-generate the js files with:
docker-compose -f ~/projects/fennec/docker/fennec/docker-compose-dev.yml exec web coffee -o /fennec-dev/web/assets/Phinch/scripts /fennec-dev/web/assets/Phinch/src
If you want to contribute documentation you can do so by modifying the content of the .rst files in the doc directory.
In case you want to check how the converted html files look you can build with.
docker-compose -f ~/projects/fennec/docker/fennec/docker-compose-dev.local.yml exec web bash -c "cd /fennec-dev/doc; make html"
Then open the (local) html file doc/_build/html/index.html in your favorite browser.
As documentation is hosted at readthedocs those files are not served by FENNEC.
The api doc on the other hand is dynamically created from the php annotations in src/AppBundle/Controller/APIController.php.
Those are served from localhost:3141/api/doc.