Skip to content

CorrelAid/gleif-level2-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GLEIF Level-2 Visualization (Server)

The code was written during a hackathon between GLEIF and CorrelAid. 🚀 The goal of the project was to visualize relational data between legal entitles that are registered at GLEIF. More information about the open data available at GLEIF can be found here: https://www.gleif.org/en/lei-data/access-and-use-lei-data. Furthermore, an introductory blog post can be found here: https://correlaid.org/en/blog/gleif-hackathon/.

This is the server of the project. The client can be found here: https://github.com/CorrelAid/gleif-level2-client.

Limitations

Due to the nature of hackathons the current version of the tool includes the following limitations:

  • The documentation of the code might be partially incomplete. If you come across an issue, please file an issue within this repository.
  • The backend reacts quite slowly due to the focus on functionality during the hackathon.
  • There might be some edge-cases that are not yet handled.

License

The tool is licensed under CC0.

Prerequisites

You need a data directory with the following files:

  • gleif_lei.csv (LEI-CDF)
  • gleif_rr.csv (RR-CDF)

If you're on Linux, you can use the data/download.sh script, for Mac users there is the data/download_mac.sh script. They are to be executed in the data directory. Both scripts will download the current files from the GLEIF website and remove most of the columns from the lei dataset in order to make it small enough for most local RAMs.
If you're on Windows operating system, you'll need to download the files manually and find a way to reduce the file size of the lei dataset.

API docs

You can find the Swagger API docs under http://localhost:8000/docs after you have started the app either directly on your machine or with docker (see below).

Local development

without docker

run

e.g. in conda / venv: -> with reload enabled

uvicorn app:api --reload --root-path src

This makes the API available under http://localhost:8000/.

test

pytest

with docker

build

docker-compose build

test

run the tests within a docker container:

./test.sh

run

to run:

docker-compose up

or demonized:

docker-compose up -d

This makes the API available under http://localhost:8000/.

logs

docker-compose logs -f

server

For development purposes, we had a server / virtual machine in the Azure cloud. Things should work similarly on your server.

clone repository to your server

git clone git@github.com:CorrelAid/gleif-level2-server.git

or

git clone https://github.com/CorrelAid/gleif-level2-server.git

depending on your GitHub authentication preferences.

build docker images

docker-compose build 

start stack

docker-compose up -d

This makes the API available under http://localhost:8000/ on your server. Configure a reverse proxy (e.g. Nginx) to make the API available to other machines.

logs

docker-compose logs -f

stop stack

docker-compose down

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published