Compare commits

...

3 Commits

Author SHA1 Message Date
Eric Coissac
82a9972be7 Add parallel compilation support and improve Makefile/install script robustness
- Add .DEFAULT_GOAL := all to Makefile for consistent default target
- Document -j/--jobs option in README.md to allow parallel compilation
- Add JOBS variable and -j/--jobs argument to install script (default: 1)
- Replace fragile mkdir/cp commands with robust error handling and clear diagnostics
- Add build directory preservation on copy failure for manual recovery
- Pass -j option to make during compilation to enable parallel builds
2026-03-13 11:59:20 +01:00
coissac
ff6e515b2a Merge pull request #91 from metabarcoding/push-uotrstkymowq
4.4.20: Rope-based parsing, improved release tooling, and bug fixes
2026-03-12 20:15:33 +01:00
Eric Coissac
cd0c525f50 4.4.20: Rope-based parsing, improved release tooling, and bug fixes
### Enhancements
- **Rope-based parsing**: Added direct rope parsing for FASTA, EMBL, and FASTQ formats via `FastaChunkParserRope`, `EmblChunkParserRope`, and `FastqChunkParserRope`. Sequence extraction now supports U→T conversion and improved line ending detection.
- **Rope scanner refactoring**: Unified rope scanning logic under a new `ropeScanner`, improving maintainability and consistency.
- **Sequence handling**: Added `TakeQualities()` method to BioSequence for more efficient quality data handling.

### Bug Fixes
- **Compression behavior**: Fixed `CompressStream` to correctly use the `compressed` variable instead of a hardcoded boolean.
- **String splitting**: Replaced ambiguous `SplitInTwo` calls with precise `LeftSplitInTwo` or `RightSplitInTwo`, and added dedicated right-split utility.

### Tooling & Workflow Improvements
- **Makefile enhancements**: Added colored terminal output, a `help` target for documenting all targets, and improved release workflow automation.
- **Release process**: Refactored `jjpush` into modular targets (`jjpush-notes`, `jjpush-push`, `jjpush-tag`), replaced `orla` with `aichat` for AI-assisted release notes, and introduced robust JSON parsing using Python. Release notes are now generated and stored in temp files for tag creation.
- **Versioning**: `bump-version` now supports the VERSION environment variable for manual version setting.
- **Submission**: Switched from raw `jj git push` to `stakk` for PR submission.

### Internal Notes
- Installation instructions are now included in release tags.
- Fixed-size carry buffer replaced with dynamic slice for arbitrarily long line support without extra allocations.
2026-03-12 20:14:11 +01:00
5 changed files with 42 additions and 11 deletions

View File

@@ -2,6 +2,8 @@
#export GOBIN=$(GOPATH)/bin #export GOBIN=$(GOPATH)/bin
#export PATH=$(GOBIN):$(shell echo $${PATH}) #export PATH=$(GOBIN):$(shell echo $${PATH})
.DEFAULT_GOAL := all
GREEN := \033[0;32m GREEN := \033[0;32m
YELLOW := \033[0;33m YELLOW := \033[0;33m
BLUE := \033[0;34m BLUE := \033[0;34m

View File

@@ -32,8 +32,12 @@ The installation script offers several options:
> >
> -p, --obitools-prefix Prefix added to the obitools command names if you > -p, --obitools-prefix Prefix added to the obitools command names if you
> want to have several versions of obitools at the > want to have several versions of obitools at the
> same time on your system (as example `-p g` will produce > same time on your system (as example `-p g` will produce
> `gobigrep` command instead of `obigrep`). > `gobigrep` command instead of `obigrep`).
>
> -j, --jobs Number of parallel jobs used for compilation
> (default: 1). Increase this value to speed up
> compilation on multi-core systems (e.g., `-j 4`).
### Examples ### Examples

View File

@@ -7,6 +7,7 @@ INSTALL_DIR="/usr/local"
OBITOOLS_PREFIX="" OBITOOLS_PREFIX=""
VERSION="" VERSION=""
LIST_VERSIONS=false LIST_VERSIONS=false
JOBS=1
# Help message # Help message
function display_help { function display_help {
@@ -21,6 +22,7 @@ function display_help {
echo " gobigrep command instead of obigrep)." echo " gobigrep command instead of obigrep)."
echo " -v, --version Install a specific version (e.g., 4.4.8)." echo " -v, --version Install a specific version (e.g., 4.4.8)."
echo " If not specified, installs the latest version." echo " If not specified, installs the latest version."
echo " -j, --jobs Number of parallel jobs for compilation (default: 1)."
echo " -l, --list List all available versions and exit." echo " -l, --list List all available versions and exit."
echo " -h, --help Display this help message." echo " -h, --help Display this help message."
echo "" echo ""
@@ -65,6 +67,10 @@ while [ "$#" -gt 0 ]; do
VERSION="$2" VERSION="$2"
shift 2 shift 2
;; ;;
-j|--jobs)
JOBS="$2"
shift 2
;;
-l|--list) -l|--list)
LIST_VERSIONS=true LIST_VERSIONS=true
shift shift
@@ -122,9 +128,15 @@ mkdir -p "${WORK_DIR}/cache" \
exit 1) exit 1)
# Create installation directory # Create installation directory
mkdir -p "${INSTALL_DIR}/bin" 2> /dev/null \ if ! mkdir -p "${INSTALL_DIR}/bin" 2>/dev/null; then
|| (echo "Please enter your password for installing obitools in ${INSTALL_DIR}" 1>&2 if [ ! -w "$(dirname "${INSTALL_DIR}")" ] && [ ! -w "${INSTALL_DIR}" ]; then
sudo mkdir -p "${INSTALL_DIR}/bin") echo "Please enter your password for installing obitools in ${INSTALL_DIR}" 1>&2
sudo mkdir -p "${INSTALL_DIR}/bin"
else
echo "Error: Could not create ${INSTALL_DIR}/bin (check path or disk space)" 1>&2
exit 1
fi
fi
if [[ ! -d "${INSTALL_DIR}/bin" ]]; then if [[ ! -d "${INSTALL_DIR}/bin" ]]; then
echo "Could not create ${INSTALL_DIR}/bin directory for installing obitools" 1>&2 echo "Could not create ${INSTALL_DIR}/bin directory for installing obitools" 1>&2
@@ -208,16 +220,29 @@ mkdir -p vendor
# Build with or without prefix # Build with or without prefix
if [[ -z "$OBITOOLS_PREFIX" ]] ; then if [[ -z "$OBITOOLS_PREFIX" ]] ; then
make GOFLAGS="-buildvcs=false" make -j"${JOBS}" obitools GOFLAGS="-buildvcs=false"
else else
make GOFLAGS="-buildvcs=false" OBITOOLS_PREFIX="${OBITOOLS_PREFIX}" make -j"${JOBS}" obitools GOFLAGS="-buildvcs=false" OBITOOLS_PREFIX="${OBITOOLS_PREFIX}"
fi fi
# Install binaries # Install binaries
echo "Installing binaries to ${INSTALL_DIR}/bin..." 1>&2 echo "Installing binaries to ${INSTALL_DIR}/bin..." 1>&2
(cp build/* "${INSTALL_DIR}/bin" 2> /dev/null) \ if ! cp build/* "${INSTALL_DIR}/bin" 2>/dev/null; then
|| (echo "Please enter your password for installing obitools in ${INSTALL_DIR}" 1>&2 if [ ! -w "${INSTALL_DIR}/bin" ]; then
sudo cp build/* "${INSTALL_DIR}/bin") echo "Please enter your password for installing obitools in ${INSTALL_DIR}" 1>&2
sudo cp build/* "${INSTALL_DIR}/bin"
else
echo "Error: Could not copy binaries to ${INSTALL_DIR}/bin" 1>&2
echo " Source files: $(ls build/ 2>/dev/null || echo 'none found')" 1>&2
echo "" 1>&2
echo "The build directory has been preserved for manual recovery:" 1>&2
echo " $(pwd)/build/" 1>&2
echo "You can install manually with:" 1>&2
echo " cp $(pwd)/build/* ${INSTALL_DIR}/bin/" 1>&2
popd > /dev/null || true
exit 1
fi
fi
popd > /dev/null || exit popd > /dev/null || exit

View File

@@ -3,7 +3,7 @@ package obioptions
// Version is automatically updated by the Makefile from version.txt // Version is automatically updated by the Makefile from version.txt
// The patch number (third digit) is incremented on each push to the repository // The patch number (third digit) is incremented on each push to the repository
var _Version = "Release 4.4.19" var _Version = "Release 4.4.20"
// Version returns the version of the obitools package. // Version returns the version of the obitools package.
// //

View File

@@ -1 +1 @@
4.4.19 4.4.20