Skip to content

Commit

Permalink
Merge pull request #2086 from informatici/develop
Browse files Browse the repository at this point in the history
Merge with develop
  • Loading branch information
mwithi authored Nov 12, 2024
2 parents f6070bd + f39d81e commit c2416c7
Show file tree
Hide file tree
Showing 88 changed files with 3,347 additions and 1,579 deletions.
80 changes: 66 additions & 14 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,74 @@ name: Java CI with Maven

on: [push, pull_request]

env:
MAVEN_ARGS: '-B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
java-package: jdk
- name: Checkout core
run: git clone --depth=50 --branch=develop https://github.com/informatici/openhospital-core.git openhospital-core
- name: Install core
run: cd openhospital-core && mvn install -DskipTests=true && cd ..
- name: Build GUI with Maven
run: mvn -B package --file pom.xml
- uses: actions/checkout@v4

- name: Debug GitHub variables
run: |
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
echo "GITHUB_HEAD_REPOSITORY: ${GITHUB_HEAD_REPOSITORY}"
echo "GITHUB_HEAD_REF: ${GITHUB_HEAD_REF}"
echo "GITHUB_REPOSITORY: ${GITHUB_REPOSITORY}"
echo "GITHUB_REF: ${GITHUB_REF}"
echo "GITHUB_ACTOR: ${GITHUB_ACTOR}"
- name: Determine PR source branch and fork repository
id: vars
run: |
# Set default FORK_REPO and BRANCH_NAME values.
BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF##*/}}"
FORK_REPO="${GITHUB_HEAD_REPOSITORY:-${GITHUB_ACTOR}/openhospital-core}"
CHECK_BRANCH_URL="https://github.com/${GITHUB_ACTOR}/openhospital-core/tree/$BRANCH_NAME"
echo "Checking branch existence with: curl -s -o /dev/null -w \"%{http_code}\" $CHECK_BRANCH_URL"
# Determine FORK_REPO with fallback logic
if [[ -n "${GITHUB_HEAD_REPOSITORY}" ]]; then
echo "Using ${GITHUB_HEAD_REPOSITORY}."
FORK_REPO=${GITHUB_HEAD_REPOSITORY}
elif curl -s -o /dev/null -w "%{http_code}" $CHECK_BRANCH_URL | grep -q "200"; then
echo "Using ${GITHUB_ACTOR}/openhospital-core"
FORK_REPO=${GITHUB_ACTOR}/openhospital-core
else
echo "Using informatici/openhospital-core."
FORK_REPO="informatici/openhospital-core"
fi
# Export FORK_REPO and BRANCH_NAME to GITHUB_ENV for the next step
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
echo "FORK_REPO=$FORK_REPO" >> $GITHUB_ENV
- name: Log variables
run: |
echo "FORK_REPO: ${{ env.FORK_REPO }}"
echo "BRANCH_NAME: ${{ env.BRANCH_NAME }}"
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
java-package: jdk

- name: Checkout core
run: |
git clone --depth=1 --no-single-branch https://github.com/${{ env.FORK_REPO }}.git openhospital-core
pushd openhospital-core
git checkout -B ${{ env.BRANCH_NAME }} origin/${{ env.BRANCH_NAME }} || git checkout develop
popd
- name: Install core
run: |
pushd openhospital-core
mvn install -DskipTests=true
popd
- name: Build GUI with Maven
run: mvn -B package --file pom.xml
777 changes: 399 additions & 378 deletions .ide-settings/eclipse/OpenHospital-Java-CodeStyle-Formatter.xml

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions .ide-settings/eclipse/OpenHospital.importorder
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#Organize Import Order
#Fri Jul 31 13:21:30 EDT 2020
5=
4=com
3=org
#Wed Mar 13 13:21:30 EDT 2024
6=
5=com
4=org
3=jakarta
2=javax
1=java
0=\#

28 changes: 26 additions & 2 deletions .ide-settings/idea/OpenHospital-code-style-configuration.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<code_scheme name="Open Hospital profile" version="173">
<code_scheme name="Open Hospital profile" version="174">
<option name="RIGHT_MARGIN" value="160" />
<option name="FORMATTER_TAGS_ENABLED" value="false" />
<JavaCodeStyleSettings>
<option name="SPACE_AFTER_CLOSING_ANGLE_BRACKET_IN_TYPE_ARGUMENT" value="true" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
Expand All @@ -14,6 +16,8 @@
<emptyLine />
<package name="javax" withSubpackages="true" static="false" />
<emptyLine />
<package name="jakarta" withSubpackages="true" static="false" />
<emptyLine />
<package name="org" withSubpackages="true" static="false" />
<emptyLine />
<package name="com" withSubpackages="true" static="false" />
Expand All @@ -23,22 +27,38 @@
<package name="" withSubpackages="true" static="false" />
</value>
</option>
<option name="ALIGN_MULTILINE_RECORDS" value="false" />
<option name="ALIGN_TYPES_IN_MULTI_CATCH" value="false" />
<option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
<option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
<option name="JD_ADD_BLANK_AFTER_DESCRIPTION" value="false" />
<option name="JD_P_AT_EMPTY_LINES" value="false" />
<option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
</JavaCodeStyleSettings>
<editorconfig>
<option name="ENABLED" value="false" />
</editorconfig>
<codeStyleSettings language="JAVA">
<option name="RIGHT_MARGIN" value="160" />
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="KEEP_BLANK_LINES_BETWEEN_PACKAGE_DECLARATION_AND_HEADER" value="1" />
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
<option name="BLANK_LINES_AROUND_METHOD" value="0" />
<option name="BLANK_LINES_AROUND_METHOD_IN_INTERFACE" value="0" />
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
<option name="BLANK_LINES_AFTER_ANONYMOUS_CLASS_HEADER" value="1" />
<option name="INDENT_CASE_FROM_SWITCH" value="false" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_RESOURCES" value="false" />
<option name="ALIGN_MULTILINE_FOR" value="false" />
<option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACES" value="true" />
<option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="RESOURCE_LIST_WRAP" value="5" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="THROWS_LIST_WRAP" value="1" />
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
Expand All @@ -47,10 +67,14 @@
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
<option name="TERNARY_OPERATION_WRAP" value="5" />
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<option name="WRAP_COMMENTS" value="true" />
<option name="ASSERT_STATEMENT_COLON_ON_NEXT_LINE" value="true" />
<option name="VARIABLE_ANNOTATION_WRAP" value="2" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="16" />
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="true" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ or any similar SQL database (e.g. MariaDB).

### Launch within IDE

Be sure to have configured properly the classpath for the project (see [5 Installing Open Hospital 1.14.0 in Eclipse EE](https://github.com/informatici/openhospital-doc/blob/develop/doc_admin/AdminManual.adoc#5-installing-open-hospital-1-14-0-in-eclipse-ee))
Be sure to have configured properly the classpath for the project (see [5 Installing Open Hospital 1.14.2 in Eclipse EE](https://github.com/informatici/openhospital-doc/blob/develop/doc_admin/AdminManual.adoc#5-installing-open-hospital-1-14-2-in-eclipse-ee))

Before running the application, you should generate the config files with the `g)` option, or manually copying and renaming the files `*.dist` files in `rsc/` folder and edit them accordingly:

| Dist file | Property file | Properties to fill in |
|--------------------------|---------------------|---------------------------------------------------------------|
| database.properties.dist | database.properties | DBSERVER, DBPORT, DBNAME, DBUSER, DBPASS |
| dicom.properties.dist | dicom.properties | OH_PATH_SUBSTITUTE/DICOM_DIR, DICOM_SIZE |
| log4j.properties.dist | log4j.properties | LOG_DEST, DBSERVER, DBPORT, DBNAME, DBUSER, DBPASS, LOG_LEVEL |
| settings.properties.dist | settings.properties | OH_LANGUAGE,(SINGLEUSER=)YES_OR_NO, PHOTO_DIR, OH_DOC_DIR |
| Dist file | Property file | Properties to fill in |
|-------------------------------|--------------------------|---------------------------------------------------------------|
| database.properties.dist | database.properties | DBSERVER, DBPORT, DBNAME, DBUSER, DBPASS |
| dicom.properties.dist | dicom.properties | OH_PATH_SUBSTITUTE/DICOM_DIR, DICOM_SIZE |
| log4j2-spring.properties.dist | log4j2-spring.properties | LOG_DEST, DBSERVER, DBPORT, DBNAME, DBUSER, DBPASS, LOG_LEVEL |
| settings.properties.dist | settings.properties | OH_LANGUAGE,(SINGLEUSER=)YES_OR_NO, PHOTO_DIR, OH_DOC_DIR |

*For further information, please refer to the Admin and User manuals in the [Doc project][openhospital-doc].*

Expand Down
Loading

0 comments on commit c2416c7

Please sign in to comment.