Skip to content

Commit

Permalink
Merge pull request #659 from NUM-Forschungsdatenplattform/release/1.22.0
Browse files Browse the repository at this point in the history
Merge release branch '1.22.0'
  • Loading branch information
mafasva authored Dec 3, 2024
2 parents ccb0047 + 1026cd6 commit 00c7efe
Show file tree
Hide file tree
Showing 205 changed files with 6,303 additions and 4,472 deletions.
400 changes: 400 additions & 0 deletions .config/checkstyle.xml

Large diffs are not rendered by default.

168 changes: 168 additions & 0 deletions .config/intellij-codestyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
<code_scheme name="NUM-Codestyle" version="1">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</value>
</option>
<option name="INSERT_INNER_CLASS_IMPORTS" value="true" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="100" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="100" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value />
</option>
<option name="IMPORT_LAYOUT_TABLE">
<value>
<package name="org.highmed" withSubpackages="true" static="false" />
<emptyLine />
<package name="" withSubpackages="true" static="false" />
<emptyLine />
<package name="java" withSubpackages="true" static="false" />
<package name="javax" withSubpackages="true" static="false" />
<emptyLine />
<package name="static org.highmed" withSubpackages="true" static="false" />
<emptyLine />
<package name="" withSubpackages="true" static="true" />
</value>
</option>
<option name="RIGHT_MARGIN" value="150" />
<option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
<option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
<option name="JD_P_AT_EMPTY_LINES" value="false" />
<option name="JD_KEEP_EMPTY_PARAMETER" value="false" />
<option name="JD_KEEP_EMPTY_EXCEPTION" value="false" />
<option name="JD_KEEP_EMPTY_RETURN" value="false" />
<option name="JD_INDENT_ON_CONTINUATION" value="true" />
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="0" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_FOR" value="false" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="THROWS_KEYWORD_WRAP" value="1" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
<option name="TERNARY_OPERATION_WRAP" value="1" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="1" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="WRAP_COMMENTS" value="true" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
<option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
<XML>
<option name="XML_ALIGN_ATTRIBUTES" value="false" />
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
<option name="XML_SPACE_INSIDE_EMPTY_TAG" value="true" />
</XML>
<codeStyleSettings language="JAVA">
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="KEEP_BLANK_LINES_BETWEEN_PACKAGE_DECLARATION_AND_HEADER" value="0" />
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
<option name="ALIGN_MULTILINE_CHAINED_METHODS" value="false" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_FOR" value="false" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="CALL_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="THROWS_KEYWORD_WRAP" value="1" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
<option name="TERNARY_OPERATION_WRAP" value="1" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="FOR_STATEMENT_WRAP" value="1" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="WRAP_COMMENTS" value="true" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
<option name="ENUM_CONSTANTS_WRAP" value="2" />
<option name="WRAP_ON_TYPING" value="0" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JSON">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
</code_scheme>
4 changes: 3 additions & 1 deletion .github/workflows/build-for-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ 'feature/**' ]
pull_request:
branches: [ develop, main ]
types: [ opened, ready_for_review]
types: [ opened, ready_for_review ]
pull_request_target:
branches: [ develop, main ]
types: [ closed ]
Expand All @@ -24,6 +24,8 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Run Checkstyle
run: mvn validate
- name: Run unit tests
run: mvn clean test
- name: Run integration tests
Expand Down
47 changes: 39 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,57 @@
# Num-portal
The num-portal repository includes the backend for the Routine Data Platform (RDP).

## Building and running locally
To get the backend running first a postgres instance needs to be running.

1. Postgres should be up and running, instructions below
To start a local instance of PostgreSQL:

```
docker run --name postgres -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 postgres
```
Then you can start the project with the setting for the application-local.yml:

In the root folder of the project, open cmd and run:

1. Build app: `mvn clean install`
2. Run: `spring_profiles_active=local mvn spring-boot:run`

## Database
After that you can visit the swagger website:

Start a local instance of PostgreSQL:
### Swagger

```
docker run --name postgres -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 postgres
```
http://localhost:8090/swagger-ui/index.html

## Swagger
## Contributing

http://localhost:8090/swagger-ui/index.html
Pull requests are welcome.
For major changes, please open an issue first to discuss what you would like to change.
After that and the approval of HiGHmed e.V. ([email protected]) you can add the code in a Branch.
1. Create a branch named 'feature/name-of-branch' because of pipeline requirements
2. Check you code with our provided [checkstyle](/.config/checkstyle.xml)
3. Update the previously tests
4. PRs can only be merged once the [build_for_development pipeline](/.github/workflows/build-for-development.yml) has been successfully completed

### Checkstyle

To integrate checkstyle in your IDE (IntelliJ) you need the checkstyle-plugin.
And for intelliJ we include a [intellij-codestyle.xml](/.config/intellij-codestyle.xml) file

#### IntelliJ Steps

1. Add the file in Settings -> Editor -> Code Style -> Java
2. For the checkstyle-plugin you can add the file [checkstyle](/.config/checkstyle.xml) under Settings -> Tools -> Checkstyle -> Configuration File

### Feature

Within the backend, controllers that are defined as Featurable can be activated and deactivated.

Example:

```
(@ConditionalOnProperty(value = “feature.search-by-manager”, havingValue = “true”)
```
They are defined within the application.yml. This configuration is then picked up in the frontend and deactivated features are not displayed there.

## License

Expand Down
19 changes: 15 additions & 4 deletions local-env/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
volumes:
- ./keycloak.conf:/opt/keycloak/conf/keycloak.conf
ports:
- 8180:8080
- "8180:8080"
networks:
- num-portal
depends_on:
Expand All @@ -23,7 +23,7 @@ services:
image: postgres:16.2
restart: always
ports:
- 5432:5432
- "5432:5432"
networks:
- num-portal
environment:
Expand All @@ -35,7 +35,7 @@ services:
image: dpage/pgadmin4:8.9
restart: always
ports:
- 8888:80
- "8888:80"
networks:
- num-portal
environment:
Expand All @@ -48,7 +48,7 @@ services:
ehrbase:
image: ehrbase/ehrbase:2.5.0
ports:
- 8080:8080
- "8080:8080"
networks:
- num-portal
env_file:
Expand All @@ -62,10 +62,21 @@ services:
DB_PASS: ${DB_PASS}
depends_on:
- postgres
clamav:
image: clamav/clamav:1.3.2
container_name: clamav
ports:
- "3310:3310"
volumes:
- clamav-db:/var/lib/clamav
environment:
- CLAMD_CONF_FILE=/etc/clamav/clamd.conf
- FRESHCLAM_CONF_FILE=/etc/clamav/freshclam.conf

volumes:
pgdata:
pgadmin-data:
clamav-db:
networks:
num-portal:
driver: bridge
Loading

0 comments on commit 00c7efe

Please sign in to comment.