A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

ecoSecrets

An open-source web application that aims to facilitate biodiversity studies that use autonomous data collection devices such as camera traps.
https://github.com/naturalsolutions/ecosecrets

Category: Biosphere
Sub Category: Terrestrial Wildlife

Keywords

biodiversity camera-traps data opensource picture python react wildlife

Keywords from Contributors

geonature biodiversity-informatics camera traps opendata citizen-participation citizen-science geonature-citizen biodiversity-catalogue biodiversity-data

Last synced: about 18 hours ago
JSON representation

Repository metadata

ecoSecrets is a web application which enables users to manage their camera traps data

README.md

ecoSecrets - a web application enabling users to manage their camera traps data

ecoSecrets is an open-source web application that aims to facilitate biodiversity studies that
use autonomous data collection devices such as camera traps.
This web-application is in development and offers several features that meet the needs
of biodiversity stakeholders:

  • project management: to delimit the studies according to their context
  • management of study sites: to identify spatial scope
  • device management: to specify technical characteristics of the tools used in the
    field and their availability
  • deployment management: to characterize spatio-temporal limits of data acquisition
  • media management: to standardize and optimize the storage of collected data
  • media processing: to enable the addition of annotations to the raw data

We would be delighted if you use it, or even contribute in its development.

A demo is available here. Don't hesitate to
try it out! User : admin ; password : password


Documentation (in french for now): ecoSecrets documentation



Installation

Prerequisite

Docker and docker-compose must be installed on the server/machine (cf. official website).

Application downloading

Replace the X.Y.Z mention by the name of the release you want to install.

cd
wget https://github.com/naturalsolutions/ecosecrets/archive/refs/tags/X.Y.Z.zip
unzip X.Y.Z.zip
rm X.Y.Z.zip
mv ecosecrets-X.Y.Z ecosecrets/

Settings

Copy the .env.sample inside the docker directory to .env:

cd ecosecrets
cp docker/.env.sample docker/.env
nano docker/.env

Edit freely this .env file to change credentials for instance. Here are the main parameters you usually want to modify:

  • ENV : uncomment it to activate the production mode (only if your app has been configured with a domain name)
  • DOMAIN : localhost, an IP address or a domain name (according to your context)
  • PROTOCOL : modify it to "https" if you want to activate HTTPS
  • HTTP_HTTPS_PORT : usually 80 for HTTP protocol and 443 for HTTPS
  • DB_USER : the name you want for the DB user
  • DB_PASSWORD : the password you want for the DB user
  • DB_NAME : the name you want for the DB
  • MINIO_ROOT_USER : the name you want for the Minio user
  • MINIO_ROOT_PASSWORD : the password you want for the Minio user

In the current version (0.1.1), you can't modify the APP_USER and the APP_PASSWORD directly in this file. You will be able to modify the admin password trough Keycloak later on.

Launching

./scripts/docker.sh up -d

With the default settings, the app will run on http://localhost:8889/ but the port of each service will be avaible to debug. This URL must be adapted to your context (depending on chosen protocol, domain and port).

Sample data (for testing only)

Sample data can be generated by using the following command:

./scripts/docker.sh exec api python -c "from src.connectors.database import init_db; init_db()"

Authentication

ecoSecrets uses Keycloak version 21.1.0 as authentication system.

A keycloak service is provided in the docker-compose.yml file. This also sets
up the keycloak instance to create a new realm, add clients (frontend and
backend) and create an admin user (credentials: admin / password).

For now, there is no right implemented in the app. This means that all users
have the same rights in ecoSecrets.
The admin user created above can log into the app and manage users via the administration console of keycloak (http://localhost:8889/auth by default).

You can use your own keycloak instance if you wish, just change in the .env
the keycloak env variables. Be careful, all versions of keycloak may not be supported.

Development

Launch backend tests

Tests are written with pytest and can be launched with the following
command:

./scripts/docker.sh exec api pytest tests --cov-report html:/home/app/src/htmlcov --cov=src

The default config assumes that the backend is accessing the database through
the docker network (via "db" adress) which prevents backend tests from
being run locally (outside a container).

API/backend documentation

The openapi documentation accessible via swagger is available here:

http://localhost:8889/api/v1/docs

ecoSecrets app documentation (in french for now)

The documentation is generated with mkdocs and is exposed on port 8133
to be able to work on it with automatic reloading.

http://localhost:8133

Contributing

To contribute to this project, please fork and create a pull request, describing the new functionality or bug fixed. Please link to an issue if relevant.
We use 'black' and 'isort' for Python code-formatting, this is checked via a GitHub action.

Licence

ecoSecrets
Copyright (C) 2023 Natural Solutions

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 5 days ago

Total Commits: 248
Total Committers: 12
Avg Commits per committer: 20.667
Development Distribution Score (DDS): 0.673

Commits in past year: 74
Committers in past year: 7
Avg Commits per committer in past year: 10.571
Development Distribution Score (DDS) in past year: 0.297

Name Email Commits
ophdlv o****a@n****u 81
Mathilde Leclerc m****c@n****u 73
Maxime Vergez m****z@n****u 34
Javi Blanco j****o@n****u 12
Julien-Gr4z j****i@n****u 11
Maxime Vergez 8****z 10
Ophélie Da Silva 9****v 10
Mathilde Leclerc 1****S 6
George Moon g****n 4
Andria Capai a****i@n****u 3
George Moon g****n@n****u 3
Geoffrey Brun 6****n 1

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 18
Total pull requests: 77
Average time to close issues: 12 months
Average time to close pull requests: about 1 month
Total issue authors: 8
Total pull request authors: 6
Average comments per issue: 3.39
Average comments per pull request: 0.17
Merged pull request: 55
Bot issues: 0
Bot pull requests: 0

Past year issues: 1
Past year pull requests: 30
Past year average time to close issues: N/A
Past year average time to close pull requests: 27 days
Past year issue authors: 1
Past year pull request authors: 3
Past year average comments per issue: 1.0
Past year average comments per pull request: 0.1
Past year merged pull request: 21
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/naturalsolutions/ecosecrets

Top Issue Authors

  • orovellotti (6)
  • ophdlv (3)
  • geobrun (2)
  • MathildeNS (2)
  • mvergez (2)
  • Matthieu-Gallet (1)
  • PNPyrenees (1)
  • schamaille (1)

Top Pull Request Authors

  • MathildeNS (28)
  • ophdlv (21)
  • mvergez (13)
  • georgemoon (8)
  • killianrak (5)
  • geobrun (2)

Top Issue Labels

  • bug (3)
  • enhancement (3)
  • documentation (1)

Top Pull Request Labels

  • enhancement (4)
  • documentation (3)
  • bug (1)

Dependencies

api/Dockerfile docker
  • base latest build
  • production latest build
  • python 3.8-slim build
docker/docker-compose.override.yml docker
  • squidfunk/mkdocs-material 8.3.9
frontend/Dockerfile docker
  • nginx 1.23.2-alpine build
  • node lts-alpine build
frontend/package-lock.json npm
  • 1362 dependencies
frontend/package.json npm
  • @types/leaflet ^1.9.0 development
  • @types/react-leaflet ^2.8.2 development
  • i18next-parser ^7.0.3 development
  • openapi-typescript-codegen ^0.23.0 development
  • @emotion/react ^11.9.3
  • @emotion/styled ^11.9.3
  • @mui/icons-material ^5.8.4
  • @mui/lab ^5.0.0-alpha.89
  • @mui/material ^5.8.7
  • @testing-library/jest-dom ^5.16.4
  • @testing-library/react ^13.3.0
  • @testing-library/user-event ^13.5.0
  • @types/jest ^27.5.2
  • @types/node ^16.11.42
  • @types/react ^18.0.14
  • @types/react-dom ^18.0.5
  • axios ^0.27.2
  • date-fns ^2.29.1
  • i18next ^22.0.6
  • i18next-browser-languagedetector ^7.0.1
  • leaflet ^1.9.2
  • react ^18.2.0
  • react-dom ^18.2.0
  • react-dropzone ^14.2.2
  • react-i18next ^12.0.0
  • react-leaflet ^4.1.0
  • react-router-dom ^6.3.0
  • react-scripts 5.0.1
  • typescript ^4.7.4
  • web-vitals ^2.1.4
api/Pipfile pypi
  • black * develop
  • httpx >=0.23.0 develop
  • isort * develop
  • pytest * develop
  • pytest-cov * develop
  • alembic *
  • boto3 *
  • exif *
  • fastapi *
  • pillow *
  • psycopg2-binary *
  • pydantic *
  • python-multipart *
  • sqlalchemy >=1.4.17,<=1.4.35
  • sqlalchemy-utils *
  • sqlmodel *
  • unipath *
  • uvicorn *
api/Pipfile.lock pypi
  • anyio ==3.6.2 develop
  • attrs ==22.1.0 develop
  • black ==22.10.0 develop
  • certifi ==2022.9.24 develop
  • click ==8.1.3 develop
  • coverage ==6.5.0 develop
  • exceptiongroup ==1.0.4 develop
  • h11 ==0.14.0 develop
  • httpcore ==0.16.1 develop
  • httpx ==0.23.1 develop
  • idna ==3.4 develop
  • iniconfig ==1.1.1 develop
  • isort ==5.10.1 develop
  • mypy-extensions ==0.4.3 develop
  • packaging ==21.3 develop
  • pathspec ==0.10.2 develop
  • platformdirs ==2.5.4 develop
  • pluggy ==1.0.0 develop
  • pyparsing ==3.0.9 develop
  • pytest ==7.2.0 develop
  • pytest-cov ==4.0.0 develop
  • rfc3986 ==1.5.0 develop
  • sniffio ==1.3.0 develop
  • tomli ==2.0.1 develop
  • typing-extensions ==4.4.0 develop
  • alembic ==1.8.1
  • anyio ==3.6.2
  • boto3 ==1.26.14
  • botocore ==1.29.14
  • click ==8.1.3
  • exif ==1.3.5
  • fastapi ==0.87.0
  • greenlet ==2.0.1
  • h11 ==0.14.0
  • idna ==3.4
  • importlib-metadata ==5.0.0
  • importlib-resources ==5.10.0
  • jmespath ==1.0.1
  • mako ==1.2.4
  • markupsafe ==2.1.1
  • pillow ==9.3.0
  • plum-py ==0.8.5
  • psycopg2-binary ==2.9.5
  • pydantic ==1.10.2
  • python-dateutil ==2.8.2
  • python-dotenv ==0.21.0
  • python-multipart ==0.0.5
  • s3transfer ==0.6.0
  • six ==1.16.0
  • sniffio ==1.3.0
  • sqlalchemy ==1.4.35
  • sqlalchemy-utils ==0.38.3
  • sqlalchemy2-stubs ==0.0.2a29
  • sqlmodel ==0.0.8
  • starlette ==0.21.0
  • typing-extensions ==4.4.0
  • unipath ==1.1
  • urllib3 ==1.26.12
  • uvicorn ==0.20.0
  • zipp ==3.10.0
.github/workflows/build_api.yml actions
  • actions/checkout v3 composite
  • docker/build-push-action v4 composite
  • docker/login-action v2 composite
  • docker/metadata-action v4 composite
  • docker/setup-buildx-action v2 composite
.github/workflows/build_frontend.yml actions
  • actions/checkout v3 composite
  • docker/build-push-action v4 composite
  • docker/login-action v2 composite
  • docker/metadata-action v4 composite
  • docker/setup-buildx-action v2 composite
.github/workflows/documentation.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/deploy-pages v2 composite
  • actions/setup-python v4 composite
  • actions/upload-pages-artifact v1 composite
.github/workflows/format_api.yml actions
  • actions/checkout v3 composite
  • isort/isort-action v1.1.0 composite
  • psf/black stable composite
.github/workflows/format_frontend.yml actions
  • actions/checkout v3 composite
.github/workflows/test_api.yml actions
  • actions/checkout v3 composite
docker/docker-compose.prod.yml docker
docker/docker-compose.yml docker
keycloak/Dockerfile docker
  • quay.io/keycloak/keycloak 21.1.0 build
  • registry.access.redhat.com/ubi9 latest build
api/pyproject.toml pypi

Score: 6.148468295917647