Before contributing code, please set up our git hook: cp code-formatting/pre-commit.sh .git/hooks/pre-commit
To skip formatting on a block of code, wrap in spotless:off, spotless:on comments
curl -X POST -H "Content-Type: text/plain" --data-binary @path/to/your/file.tsv http://localhost:8080/anvil/upload-tsv
To set up a local development database, follow these steps:
-
Run the
docker-compose.postgres.ymlfile to start the required services:docker-compose -f docker-compose.postgres.yml up --build -d
-
Execute the
db/schema.sqlscript to create thedictschema and all necessary database tables. -
(Optional) If you have a dump file generated with
pg_dump, you can restore it usingpg_restore. If the backup is from ourBDCdatabase, the following command will work:pg_restore \ --host="localhost" \ --port="5432" \ --username="username" \ --dbname="dictionary_db" \ --jobs=10 \ --verbose \ --no-owner \ ./dictionary_db
You will be prompted to enter the database password after executing this command.
-
Now you can run the Spring Boot application with
devas the active profile.
If you do not have pg_restore and pg_dump, you can install them by following these steps:
-
Install
postgresql@16, which includes bothpg_restoreandpg_dump:brew install postgresql@16
-
Link the installed PostgreSQL version:
brew link postgresql@16
-
Add PostgreSQL to your
zshrcorbashprofile. Forzshrc, use the following command:echo 'export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH"' >> ~/.zshrc
-
Verify the versions of
pg_dumpandpg_restore:pg_dump --version pg_restore --version
If the command doesn’t work immediately, you may need to restart your terminal.