{"id":21614920,"url":"https://github.com/eea/gemet","last_synced_at":"2025-04-11T06:53:50.160Z","repository":{"id":15557389,"uuid":"18292530","full_name":"eea/gemet","owner":"eea","description":"GEMET - GEneral Multilingual Environmental Thesaurus","archived":false,"fork":false,"pushed_at":"2023-04-21T21:46:17.000Z","size":5329,"stargazers_count":5,"open_issues_count":13,"forks_count":1,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-03-25T04:42:12.419Z","etag":null,"topics":["django","docker","eionet","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eea.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-31T12:37:43.000Z","updated_at":"2022-04-01T08:49:58.000Z","dependencies_parsed_at":"2023-02-18T12:03:44.292Z","dependency_job_id":null,"html_url":"https://github.com/eea/gemet","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eea%2Fgemet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eea%2Fgemet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eea%2Fgemet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eea%2Fgemet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eea","download_url":"https://codeload.github.com/eea/gemet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248358555,"owners_count":21090402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","docker","eionet","python"],"created_at":"2024-11-24T22:10:02.973Z","updated_at":"2025-04-11T06:53:50.129Z","avatar_url":"https://github.com/eea.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"GEMET\n=====\n\n.. image:: https://coveralls.io/repos/github/eea/gemet/badge.svg?branch=master\n    :target: https://coveralls.io/github/eea/gemet?branch=master\n\n.. image:: https://travis-ci.org/eea/gemet.svg?branch=master\n    :target: https://travis-ci.org/eea/gemet\n\n.. image:: https://dockerbuildbadges.quelltext.eu/status.svg?organization=eeacms\u0026repository=gemet\n    :target: https://hub.docker.com/r/eeacms/gemet/builds\n\n.. contents ::\n\nProject Name\n############\nThe Project Name is GEMET - GEneral Multilingual Environmental Thesaurus\nhttp://www.eionet.europa.eu/gemet\n\nInstalling with Docker\n#########################\n\nCreate settings files from .example files:\n\n    cp gemet/local_settings.py.example gemet/local_settings.py\n    cp gemet/local_test_settings.py.example gemet/local_test_settings.py\n\nInstall Docker and docker-compose, then run:\n\n    docker-compose up -d\n\nNow you should be able to attach to the app container:\n\n    docker exec -it gemet.app bash\n\nAnd run the Django server for development:\n\n    python manage.py runserver 0:8888\n\nInstalling without Docker\n#########################\n\nPrerequisites - System packages\n-------------------------------\n\nThese packages should be installed as superuser (root).\n\nDebian based systems\n~~~~~~~~~~~~~~~~~~~~\nInstall these before setting up an environment::\n\n    apt-get install python-setuptools python-dev \\\n    libldap2-dev python-virtualenv git\n\n\nProduct directory\n-----------------\n\nCreate the product directory::\n\n    mkdir -p /var/local/gemet\n    mkdir /var/local/gemet/logs\n\nCreate a new user::\n\n    adduser edw\n\nChange the product directory's owner::\n\n    chown edw:edw /var/local/gemet -R\n\n\nInstall dependencies\n--------------------\nWe should use Virtualenv for isolated environments. The following commands will\nbe run as an unprivileged user in the product directory::\n\n1. Clone the repository::\n\n    git clone https://github.com/eea/gemet -o origin gemet\n    cd gemet\n\n2.1. Create \u0026 activate a virtual environment::\n\n    virtualenv --no-site-packages sandbox\n    echo '*' \u003e sandbox/.gitignore\n    source sandbox/bin/activate\n\n2.2 Make sure setuptools \u003e= 0.8 is installed::\n\n    pip install -U setuptools\n\n3. Install dependencies::\n\n    pip install -r requirements-dep.txt\n\n4. Create a local configuration file::\n\n    cd gemet\n    cp local_settings.py.example local_settings.py\n\n    # Follow instructions in local_settings.py to adapt it to your needs.\n\n6. Set up the Postgres database::\n\n    # Replace [user] and [password] with your Postgres credentials and [db_name]\n    # with the name of the database:\n\n    psql -U[user]\n    \u003e\u003e CREATE DATABASE [db_name] CHARACTER SET utf8 COLLATE utf8_general_ci;'\n\n   **The database charset MUST be utf8.**\n\n7. Update local configuration file with database credentials and database name\n\n   - ``default`` section in ``DATABASES`` dict.\n\n8. Create initial database structure::\n\n    ./manage.py migrate\n\n9. Load fixtures data into the database::\n\n   ./manage.py loaddata gemet/thesaurus/fixtures/data.json\n\n10. Generate EIONET static templates::\n\n    ./manage.py fetchtemplates\n\n11. Import data, see `Data Import`_ below.\n\n.. _`Data Import`: https://github.com/eea/gemet#data-import\n\n\nBuild production\n################\n\nSetup production environment using an unprivileged user::\n\n    cd /var/local/gemet\n    source sandbox/bin/activate\n\nChange the local_settings.py file by setting debug mode off::\n\n    DEBUG = False\n    ALLOWED_HOSTS = ['localhost']  # Add allowed hosts to the list as needed\n\nConfigure supervisord and set the WSGI server port::\n\n    cp gemet/supervisord.conf.example supervisord.conf\n    supervisorctl reload 1\u003e/dev/null || ./bin/supervisord\n\n\nBuild staging\n#############\n\nSetup staging environment using an unprivileged user::\n\n    cd /var/local/gemet\n    source sandbox/bin/activate\n\nChange the local_settings.py file by setting debug mode off::\n\n    DEBUG = False\n    ALLOWED_HOSTS = ['localhost']  # Add allowed hosts to the list as needed\n\nConfigure supervisord and set the WSGI server port (a different one from the\nproduction, for example 8010)::\n\n    cp gemet/supervisord.conf.example supervisord.conf\n    supervisorctl reload 1\u003e/dev/null || ./bin/supervisord\n\n\nConfiguration\n#############\n\nDetails about configurable settings can be found in ``settings.py``.\n\n\nData Import\n###########\n\n1. Considering you have a dump of the old database (``gemet.sql``), import it in a\n**separate** database::\n\n    psql -U[user] [db_name] \u003c gemet.sql\n\n2. Update the ``import`` section from ``DATABASES`` dict in the local\nconfiguration file with the name of the database used for import\n(``gemet_old`` from the previous example).\n\n3. Run the management command for data import::\n\n    ./manage.py import\n\n4. Fix romanian characters::\n\n    ./manage.py fix_romanian\n\n5. Insert data that enables search to work properly::\n\n    ./manage.py insertdata\n\n6. Create reversed relations for all concepts::\n\n    ./manage.py fixrelations\n\n7. Import new terms from the spreadsheet::\n\n    ./manage.py importspreadsheet [spread_sheet_name]\n\n\nOther commands\n##############\n\n1. Some romanian terms, definitions etc. are written with the wrong diacritical marks (cedillas instead of commas).\nThe following custom management command fixes those characters and prints the number of objects changed::\n\n    ./manage.py fix_romanian\n\n\n2. Check the consistency of an excel file (.xlsx extension) containing new terms.\n\nThe custom command assures:\n\n* Old terms used in the file are defined in the database.\n* New terms used in broader, narrow relations etc. of other terms are also defined in the file.\n* An error containing the cell of the term is printed if it does not respect those rules.\n\nRun the command providing a valid excel file::\n\n     ./manage.py check_spreadsheet file_name.xlsx\n\n\nDocumentation\n#############\n\nThe documentation has been created using `Sphinx`_. The source directories for the three sections of documentation can be found in the `docs`_ directory.\n\n.. _`Sphinx`: http://www.sphinx-doc.org/en/stable/\n.. _`docs`: https://github.com/eea/gemet/tree/master/docs\n\nIn order to get the HTML output, you should run the following command inside one of the documentation directories (``api``, ``new_api`` or ``overview``)::\n\n    make html\n\nThese static HTML files can be served via a web server (Apache, Nginx, etc).\n\nDocs contents\n~~~~~~~~~~~~~\n\n* ``api`` - old version of the API user guide, kept for reference;\n* ``new_api`` - current documentation for the GEMET API; duplicated in `this file`_ and published on ``Web services`` page;\n* ``overview`` - quick overview of the technical solution;\n\n.. _`this file`: https://github.com/eea/gemet/blob/master/gemet/thesaurus/templates/api.html\n\n\nDevelopment hints\n=================\n\nRequirements\n------------\nThese packages should be installed as superuser(root)::\n\n    apt-get install libxml2-dev libxslt1-dev\n\nUse ``requirements-dev.txt`` instead of ``requirements-dep.txt``::\n\n    pip install -r requirements-dev.txt\n\n\nRunning unit tests\n------------------\n\n0. Before running the tests make sure you have configured the test database\nparameters::\n\n    cd gemet/\n    cp test_settings.py.example test_settings.py\n\n    # Parameters values should match the ones used for the 'default' database\n    # entry in local_settings.py\n\n1. For the GEMET web application::\n\n    ./manage.py test\n\n2. For the API::\n\n    python apitests/main.py\n\nTwo optional parameters exist:\n\n* ``--public``, which runs the tests against the production website;\n* ``--get``, which calls the API methods through GET requests.\n\n3. Running tests with coverage measurement\n\nAdd to your local_settings.py TEST_RUNNER and NOSE_ARGS from\nlocal_settings.example and run::\n\n    ./manage.py test\n\n\nSentry settings\n===============\n\nSentry is used to track errors in real-time.\n\nCreate an account and a project on `Sentry`_ .\n\nInstall the proper version of raven used by sentry::\n\n    pip install -r requirements-dep.txt\n\nConfigure local settings with your project's dsn.\n\n.. _`Sentry`: https://sentry.io\n\n\nContacts\n========\n\nThe project owner is Søren Roug (soren.roug at eaa.europa.eu)\n\nOther people involved in this project are:\n\n* Iulia Chiriac (iulia.chiriac at eaudeweb.ro)\n* Andrei Melis (andrei.melis at eaudeweb.ro)\n* Diana Boiangiu (diana.boiangiu at eaudeweb.ro)\n* Cornel Nițu (cornel.nitu at eaudeweb.ro)\n* Alex Eftimie (alex.eftimie at eaudeweb.ro)\n* Mihai Tabără (mihai.tabara at eaudeweb.ro)\n* Mihai Zamfir (mihai.zamfir at eaudeweb.ro)\n\n\nResources\n=========\n\nHardware\n--------\nMinimum requirements:\n * 2048MB RAM\n * 2 CPU 1.8GHz or faster\n * 4GB hard disk space\n\nRecommended:\n * 4096MB RAM\n * 4 CPU 2.4GHz or faster\n * 8GB hard disk space\n\n\nSoftware\n--------\nAny recent Linux version, apache2, Postgres server, Python 3.8\n\n\nCopyright and license\n=====================\n\nThis project is free software; you can redistribute it and/or modify it under\nthe terms of the EUPL v1.1.\n\nMore details under `LICENSE.txt`_.\n\n.. _`LICENSE.txt`: https://github.com/eea/gemet/blob/master/LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feea%2Fgemet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feea%2Fgemet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feea%2Fgemet/lists"}