/metadata-scala

Capyfile metadata indexing service

Primary LanguageScalaMIT LicenseMIT

Metadata (Scala)

Release Tagging codecov

Documentation

Document URL
CLI documentation CLI.md
Database models Database.md
CONTRIBUTING CONTRIBUTING.md
OpenAPI specification Specification

Development

Local database

  1. Run the docker-compose command:
docker-compose -f docker-compose.dev.yml up
  1. (Optional) Open the pgadmin page in http://localhost:5050/ and login with the following credentials:
Email Password
postgres@postgres.com postgres

Note that sometimes the pgadmin container doesn't start properly, so you'll need to run the command again. This usually occurs the first time you run the command.

  1. (Optional) Create a new server in pgadmin with the following credentials:
Field Value
Host postgres-db
Port 5432
Maintenance database metadata
User postgres
Password postgres

Create packages

You can create new packages with default folders (domain, application, infraestructure and test) using the following command:

make create

After running the command you'll be prompted to enter the name of the package.

Remove packages

You can remove packages using the following command:

make remove

After running the command you'll be prompted to enter the name of the package.

Testing

  1. Make sure you have sbt installed in your computer:
sbt --version
  1. Setup the local database:
docker-compose up
  1. Run the tests and generate the coverage report:
sbt clean coverage test coverageReport

Or:

make coverage
  1. (Optional) Open the html coverage file located in:
cd target/scala-2.13/scoverage-report

Coverage

circle square