Skip to content

Commit

Permalink
Merge pull request #14 from pgdurand/prepV5
Browse files Browse the repository at this point in the history
Prep v5
  • Loading branch information
pgdurand authored Jan 6, 2023
2 parents 5224aed + ed32b72 commit c8df6c9
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 126 deletions.
3 changes: 0 additions & 3 deletions TODOs.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
- MaJ descripteurs avec dépendances ; temporairement virer pfam (marche plus ?)
- MaJ doc: formatdb->makeblastdb

remote: warning: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: warning: See http://git.io/iEPt8g for more information.
remote: warning: File tests/junit/databank/fasta_multi2/fasta4.faa is 64.63 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
Expand Down
24 changes: 5 additions & 19 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,8 @@

<property name="rootpkg" value="bzh.plealog.dbmirror.main" />
<property name="KLMirrorClass" value="${rootpkg}.CmdLineInstaller" />
<property name="KLUIMirrorClass" value="${rootpkg}.UiInstaller" />
<property name="KLQueryMirrorClass" value="${rootpkg}.CmdLineQuery" />
<property name="KLMirrorAnnot" value="${rootpkg}.Annotate" />
<property name="KLMirrorInfo" value="${rootpkg}.DumpBankList" />
<property name="KLMirrorDelete" value="${rootpkg}.DeleteBank" />
<property name="KLMirrorCheck" value="${rootpkg}.AutoCheckDescriptors" />

<property name="KANT_ZIP" value="ant-1.9.4.zip" />

<path id="class.path">
<pathelement path="${classpath}" />
<fileset dir="${jar}">
Expand Down Expand Up @@ -216,17 +211,8 @@
<!-- ============================================================= -->
<!-- Compile code and make software dustribution package -->
<target name="makedistrib" depends="makejar">
<!-- Copy the DBMS scripts for Mac, Linux and Windows -->
<copy file="${scripts}/bdm.sh" todir="${Dscripts}">
<filterset>
<filter token="APP_MAIN_CLASS" value="${KLMirrorClass}" />
</filterset>
</copy>
<copy file="${scripts}/bdm.bat" todir="${Dscripts}">
<filterset>
<filter token="APP_MAIN_CLASS" value="${KLMirrorClass}" />
</filterset>
</copy>
<!-- Copy the DBMS scripts for Mac, Linux -->
<copy file="${scripts}/bdm.sh" todir="${Dscripts}" />
<copy file="${scripts}/test_bdm.sh" todir="${Dscripts}" />
<!-- Galaxy wrapper to list available DBs -->
<copy file="${scripts}/beedeem_info.xml" todir="${Dconf}/system">
Expand Down Expand Up @@ -266,7 +252,7 @@
<!-- in case Ant will not be available on the target system,
we provide it. -->
<mkdir dir="${distrib}/ant" />
<copy file="${scripts}/ant-1.9.4.zip" todir="${distrib}/ant" />
<copy file="${scripts}/${KANT_ZIP}" todir="${distrib}/ant" />
<!-- Package the whole stuff in a zip (natively readable on
all OS, including Windows)
-->
Expand Down
43 changes: 0 additions & 43 deletions scripts/bdm.bat

This file was deleted.

12 changes: 8 additions & 4 deletions scripts/bdm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@
# Proxy configuration: update configuration file:
# ${beedeemHome}/conf/system/network.config.

# *** Bank installation scripts of BeeDeeM (conf/scripts) requires BASH 5
BASH_VER=$(bash --version | grep ", version" | cut -d' ' -f4 | cut -d'.' -f1)
if [ "$BASH_VER" -lt "5" ]; then
echo "/!\ ERROR: BeeDeeM requires BASH release 5 (yours is: $BASH_VER)"
# *** Bank installation scripts of BeeDeeM (conf/scripts) requires realpath:
# available in BASH 5 for macOS
# or available from Linux:coreutils
which realpath
if [ ! $? -eq 0 ]; then
echo "/!\ ERROR: realpath command not found"
echo " macOS: install bash 5"
echo " Linux: install coreutils"
exit 1
fi

Expand Down
52 changes: 5 additions & 47 deletions scripts/deploy-std.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This is the Ant configuration file used to deploy, install and configure
the DataBank Manager System (BeeDeeM).
Copyright (c) 2007-2022, Patrick G. Durand
Documentation:
https://pgdurand.gitbook.io/beedeem/installation/installation#legacy-installation
Copyright (c) 2007-2023, Patrick G. Durand
-->

<project name="BeeDeeM_installer" default="help" basedir=".">
Expand All @@ -13,10 +17,6 @@
<os family="unix"/>
</condition>

<condition property="winOS">
<os family="windows"/>
</condition>

<!-- ============================================================= -->
<target name="help">
<echo>This is the Ant project file to install BeeDeeM.</echo>
Expand Down Expand Up @@ -81,7 +81,6 @@

<!-- ============================================================= -->
<target name="copyScripts">
<antcall target="copyScriptsWin" />
<antcall target="copyScriptsUnix" />
</target>

Expand All @@ -97,37 +96,13 @@

</filterset>
</copy>
<antcall target="updateWinPath">
<param name="sourceF" value="${installDir}/${kscript}.tmp"/>
<param name="targetF" value="${installDir}/${kscript}.${kext}"/>
</antcall>
<antcall target="updateUnixPath">
<param name="sourceF" value="${installDir}/${kscript}.tmp"/>
<param name="targetF" value="${installDir}/${kscript}"/>
</antcall>
<delete file="${installDir}/${kscript}.tmp"/>
</target>

<!-- ============================================================= -->
<target name="copyScriptsWin" if="winOS">
<!-- Copy and configure the KDBMS starter script (Windows) -->
<antcall target="prepareScript">
<param name="kscript" value="bdm"/>
<param name="kext" value="bat"/>
</antcall>
<!-- Copy and configure the DBMS main config file-->
<copy file="${installDir}/scripts/dbms.config" tofile="${installDir}/conf/dbms.tmp">
<filterset>
<filter token="BIOBASE_ROOTDIR" value="${biobaseRootDir}"/>
</filterset>
</copy>
<antcall target="updateWinPath">
<param name="sourceF" value="${installDir}/conf/dbms.tmp"/>
<param name="targetF" value="${installDir}/conf/dbms.config"/>
</antcall>
<delete file="${installDir}/conf/dbms.tmp"/>
</target>

<!-- ============================================================= -->
<target name="copyScriptsUnix" if="unixOS">
<!-- Copy and configure the KDBMS starter script (Unix) -->
Expand All @@ -148,23 +123,6 @@
</copy>
</target>

<!-- ============================================================= -->
<target name="updateWinPath" if="winOS">
<path id="distribClass.path">
<fileset dir="${installDir}/bin">
<include name="**/*.jar"/>
</fileset>
</path>
<java fork="true"
classname="bzh.plealog.dbmirror.main.SetupConfiguration"
classpathref="distribClass.path" >
<arg value="${sourceF}"/>
<arg value="${targetF}"/>
<arg value="\"/>
<arg value="\\"/>
</java>
</target>

<!-- ============================================================= -->
<target name="updateUnixPath" if="unixOS">
<copy file="${sourceF}" tofile="${targetF}"/>
Expand Down
33 changes: 24 additions & 9 deletions scripts/test_bdm.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# =================================================
# Test script for BeeDeeM legacy installer.
# Test script for BeeDeeM legacy installer or Conda.
# To be used directly on the command-line.
# DO NOT use for Singularity/Docker installations.
#
Expand All @@ -10,21 +10,28 @@
# Step 1: install BeeDeeM as stated at:
# https://pgdurand.gitbook.io/beedeem/installation/installation#legacy-installation
#
# Step 2: run test as follows:
# ./test_bdm.sh
# Step 2: run test as follows:
# cd /path/to/beedeem
# export PATH=$PWD:$PATH
# ./test_bdm
# --
# P. Durand (SeBiMER, Ifremer), last updated on Jan 2023
# =================================================


# == TEST 1 ===========================================
echo "*** TEST 1: Start simple bank installation"
# set log mode to console (otherwise default is a log file located in KL_WORKING_DIR

# set BeeDeeM log mode to console (otherwise default is a log file located in KL_WORKING_DIR)
export KL_LOG_TYPE=console

# Set the bank to install
# This is a '.dsc' file located in BeeDeeM installation path at ${beedeem-home}/conf/descriptors
DESCRIPTOR="SwissProt_human"

# start BeeDeeM with 'install' command
./bdm install -desc ${DESCRIPTOR}
bdm install -desc ${DESCRIPTOR}

# check whether command succeeded or not
if [ $? -eq 0 ]; then
echo "TEST 1: SUCCESS"
Expand All @@ -33,26 +40,34 @@ else
exit 1
fi


# == TEST 2 ===========================================
echo "*** TEST 2: list installed bank"
# reset log mode to file

# reset BeeDeeM log mode to file (default)
export KL_LOG_TYPE=file

# start BeeDeeM with 'info' command
./bdm info -d all -f txt
bdm info -d all -f txt

if [ $? -eq 0 ]; then
echo "TEST 2: SUCCESS"
else
echo "TEST 2: FAILED. Review log file in: @KL_WORKING_DIR@"
exit 1
fi


# == TEST 3 ===========================================
# Change default log file name to something else
# Change default BeeDeeM log file name to something else
export KL_LOG_FILE=query.log

SW_ENTRY="ZZZ3_HUMAN"
echo "*** TEST 3: query bank for entry: $SW_ENTRY"

# start BeeDeeM with 'query' command
./bdm query -d protein -f txt -i $SW_ENTRY
bdm query -d protein -f txt -i $SW_ENTRY

if [ $? -eq 0 ]; then
echo "TEST 3: SUCCESS"
else
Expand Down
1 change: 0 additions & 1 deletion src/bzh/plealog/dbmirror/util/log/LoggerCentral.java
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ private static void configureRollingFileLogger(Level aLevel, String logName) {
userPath = getLogAppPath();
szLogFileName = userPath + _logAppFile;
szLogFilePattern = userPath + "%d{MM-dd-yy}-" + _logAppFile;
System.out.println("**** LogFile: "+szLogFileName);
try {
cleanSystemLogs(userPath, _logAppFile);
} catch (Exception e) {
Expand Down

0 comments on commit c8df6c9

Please sign in to comment.