From 6d5755d549e25b1f9980ac7c3c14f40eb5cf449a Mon Sep 17 00:00:00 2001 From: Ewan Cahen Date: Thu, 24 Oct 2024 16:16:57 +0200 Subject: [PATCH] docs: add info on EditorConfig to READMEs --- authentication/README.md | 4 ++++ backend-tests/README.md | 6 +++++- scrapers/README.md | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/authentication/README.md b/authentication/README.md index 86f667044..3324e8fd5 100644 --- a/authentication/README.md +++ b/authentication/README.md @@ -16,6 +16,10 @@ This module handles authentication from third parties using oAuth2 and OpenID. ## Environment variables Check `.env.example` to see which environment variables are needed. In particular, look for the env variable `RSD_ENVIRONMENT` to allow for easy admin creation when developing and testing out the RSD (this is not safe for production!). +## Contributing + +This module uses [EditorConfig](https://editorconfig.org/) for basic formatting. Please check if your editor [already supports EditorConfig](https://editorconfig.org/#pre-installed) or if you need to [install a plugin](https://editorconfig.org/#download). A GitHub workflow is run on every PR to check if any files violate the formatting settings. + ## Developing locally If you want to develop and run the auth module locally, i.e. outside of Docker, you have to make two changes to files tracked by Git. 1. In `docker-compose.yml`, add the following lines to the `nginx` service: diff --git a/backend-tests/README.md b/backend-tests/README.md index 49a4aad19..ac6ead9e0 100644 --- a/backend-tests/README.md +++ b/backend-tests/README.md @@ -7,7 +7,7 @@ SPDX-License-Identifier: CC-BY-4.0 # Backend tests -This folder contains backend tests for the RSD. It is intended to mainly: +This folder contains backend tests for the RSD. It is intended to mainly: - test the correctness of row level security rules - test the correctness of remote procedure calls (no tests yet) - load test the backend/database (no tests yet) @@ -24,6 +24,10 @@ Tests should be written taking the following principles in account: - each test should be runnable independently of other tests - each test should be repeatable, without e.g. having to clean up the database first +## Contributing + +This module uses [EditorConfig](https://editorconfig.org/) for basic formatting. Please check if your editor [already supports EditorConfig](https://editorconfig.org/#pre-installed) or if you need to [install a plugin](https://editorconfig.org/#download). A GitHub workflow is run on every PR to check if any files violate the formatting settings. + ## Writing tests Each class containing tests should be annotated with `@ExtendWith({SetupAllTests.class})`. This refers to a class containing a global setup method, which runs once to check the connection to the database and to initialise global parameters. diff --git a/scrapers/README.md b/scrapers/README.md index f2bcc20de..b6d0171ab 100644 --- a/scrapers/README.md +++ b/scrapers/README.md @@ -11,6 +11,10 @@ SPDX-License-Identifier: CC-BY-4.0 This module contains the scrapers used by the RSD. The scrapers are written in Java using Maven. +## Contributing + +This module uses [EditorConfig](https://editorconfig.org/) for basic formatting. Please check if your editor [already supports EditorConfig](https://editorconfig.org/#pre-installed) or if you need to [install a plugin](https://editorconfig.org/#download). A GitHub workflow is run on every PR to check if any files violate the formatting settings. + ## Running from within Docker Compose If you have an instance of the RSD, including the scrapers, running with Docker Compose, you can manually run a scraper by running the respective command from the root of the project content: