Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.0.0 release PR - "Ardent adenine" #10

Merged
merged 77 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 70 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
3eae330
Johannes over-simplification
alneberg Apr 13, 2023
83c8612
Tidying up a bit
alneberg Apr 13, 2023
3d6a18f
Added back option to gzip output
alneberg Apr 13, 2023
b862026
Started adjusting the readme
alneberg Apr 13, 2023
bfe147b
Readme table formatting
alneberg Apr 13, 2023
743ca2d
more readme changes
alneberg Apr 13, 2023
2ff5e62
Wrote the performance guide
alneberg Apr 13, 2023
532faac
Version 0.2.0
alneberg Apr 14, 2023
94bd11f
Added background and for developers sections to README
alneberg Apr 14, 2023
86135d8
Use file-format crate to check for gzipped file
alneberg Apr 18, 2023
b379998
Added 'written by' to authors list in clap
alneberg Apr 18, 2023
6d3fe05
Failed splitting, cannot reach file_io from umi_external
alneberg Apr 18, 2023
c1f4dcb
Managed to use modules
alneberg Apr 20, 2023
d00f40f
Added a gitignore
alneberg Apr 20, 2023
723b08b
Adding some basic error handling.
MatthiasZepper May 3, 2023
b2c502b
Implemented some basic error handling.
MatthiasZepper May 3, 2023
abc07d0
Merge pull request #5 from alneberg/johannes_simple
MatthiasZepper May 5, 2023
2202ab3
Merge pull request #6 from MatthiasZepper/johannes-simplification
MatthiasZepper May 5, 2023
aef2bac
Further refactor: Subcommand structure to allow for easy addition of …
MatthiasZepper May 5, 2023
c62c17a
Implemented a simple counter for the records.
MatthiasZepper May 5, 2023
029c087
Switching the CLI arguments from strings to Option<PathBuf> and imple…
MatthiasZepper May 8, 2023
e1c7402
Cleaner code for output checks and suffix updates.
MatthiasZepper May 8, 2023
18323d3
file_io::append_to_path() must work without owning the provided PathB…
MatthiasZepper May 8, 2023
01a2db5
Finished autogeneration of the file name extension, used a Regex to m…
MatthiasZepper May 8, 2023
71ec566
Implemented fixing the read numbers for both reads and using a custom…
MatthiasZepper May 9, 2023
aa2ab19
Readme updates.
MatthiasZepper May 9, 2023
eba0854
Fixing issues highlighted by Clippy.
MatthiasZepper May 25, 2023
0d5c6d4
Addressed the clippy warning 'Large size difference between variants'…
MatthiasZepper May 25, 2023
b3a8890
Readme updates.
MatthiasZepper Jun 2, 2023
a11c3d4
Github unfortunately doesn't render simple style commands in the Readme.
MatthiasZepper Jun 2, 2023
a0193ee
Increase Logoheader size.
MatthiasZepper Jun 2, 2023
7b68fb5
Merge pull request #7 from MatthiasZepper/further_refactor
MatthiasZepper Jun 2, 2023
d46c288
Remove a possible .gz extension, if the --gzip/-z flag is not active.
MatthiasZepper Jun 14, 2023
7d1d90b
Add the first unit test. More to come.
MatthiasZepper Jun 15, 2023
32067ef
Added more tests, this time for check_outputpath function
MatthiasZepper Jun 15, 2023
43cd017
Consolidate nested if/else to match in file_io::check_outputpath().
MatthiasZepper Jul 6, 2023
715da32
Move extension handling and correction into new separate function.
MatthiasZepper Jul 7, 2023
29c3456
Integrate a custom header.
MatthiasZepper Jul 7, 2023
872a331
Collapse else if clause in rectify_extension().
MatthiasZepper Jul 10, 2023
8fddde6
Add test data, 10 simulated reads pairs from Escherichia phage phiX17…
MatthiasZepper Jul 10, 2023
5da1b9f
Replace tempdir crate with assert_fs.
MatthiasZepper Jul 10, 2023
e8bb6ac
Make colors of the header optional.
MatthiasZepper Jul 11, 2023
7ad8caf
Refactor errors so they accept an optional path.
MatthiasZepper Jul 11, 2023
32b348a
Consistently replace OutputFile with Result<OutputFile> in all functi…
MatthiasZepper Jul 11, 2023
4a8e0da
Add a new ReadWriteError to RuntimeErrors.
MatthiasZepper Jul 11, 2023
9f99ad3
Write error messages to Stderr instead of Stdout and color with owo-c…
MatthiasZepper Jul 11, 2023
7bf84d4
Created a custom error parsing for clap:Error enum that allows custom…
MatthiasZepper Jul 11, 2023
41c4aef
Again error styling.
MatthiasZepper Jul 12, 2023
628d98d
Adapt the append_umi_to_path() function to additional edge cases with…
MatthiasZepper Jul 12, 2023
9c800f4
Write the first two integration tests.
MatthiasZepper Jul 12, 2023
059354c
Add two more integration tests.
MatthiasZepper Jul 12, 2023
63fb9df
Refactor integration tests for clearer structure.
MatthiasZepper Jul 12, 2023
c3db246
Added tests for gz file extension.
MatthiasZepper Jul 12, 2023
77d1842
Add more integration tests: Existing and non-existing output.
MatthiasZepper Jul 12, 2023
35efe00
Remove a needless_late_init warning from clippy in file_io.rs
MatthiasZepper Jul 12, 2023
2263a22
Create validated output files to be used in tests and correct header …
MatthiasZepper Jul 13, 2023
7e94bb9
Create TestResults struct to hold the paths to the validated program …
MatthiasZepper Jul 13, 2023
8ff1570
Wrote an auxiliary function verify_file_contents() for the tests, so …
MatthiasZepper Jul 13, 2023
7a84a3a
Finished the integration tests to test file output.
MatthiasZepper Jul 13, 2023
96db94d
Merge pull request #8 from MatthiasZepper
MatthiasZepper Jul 14, 2023
053f147
Create new Testing workflow comprising Clippy and Tarpaulin.
MatthiasZepper Jul 14, 2023
a2e4785
Devise a new release action that includes cross-plattform builds. Hea…
MatthiasZepper Jul 14, 2023
734c2c7
Refurbish the Docker image build action.
MatthiasZepper Jul 14, 2023
16099a2
Change EventTriggers to test workflows in my fork.
MatthiasZepper Jul 14, 2023
9b7ccdc
Bugfixes in the GithubAction workflows. Fingers crossed...
MatthiasZepper Jul 15, 2023
c71aeb2
Slight tweaks to the GithubActions and the Dockerfile.
MatthiasZepper Jul 17, 2023
dc56395
Switch to ructions from actions-rs, since the latter seem to be unmai…
MatthiasZepper Jul 17, 2023
282db79
Extract version from Cargo.toml with grep to have it in the filenames.
MatthiasZepper Jul 18, 2023
e855e1c
Modify tarpaulin command to incluce integration tests
MatthiasZepper Jul 18, 2023
e69f639
Update the Github Actions...
MatthiasZepper Jul 18, 2023
5a77497
Readme updates to inclue binaries and Docker.
MatthiasZepper Jul 18, 2023
7b1f5e0
Implement exceptions to the prompts for /dev/null and FIFOs.
MatthiasZepper Jul 31, 2023
eff67b2
Fix the 'all variants have the same postfix' warning. I appreciated t…
MatthiasZepper Jul 31, 2023
c95b357
Include instructions for singletons in README.md and change version t…
MatthiasZepper Aug 1, 2023
7d99e79
Dropping support for implicit compressed output by specifing .gz exte…
MatthiasZepper Aug 1, 2023
da8cff3
Match on Ok() instead of Some() in rectify_extension() to avoid going…
MatthiasZepper Aug 1, 2023
3213396
Typofix in README.md
alneberg Aug 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions .github/workflows/clippy.yml

This file was deleted.

35 changes: 18 additions & 17 deletions .github/workflows/dockerhub.yml → .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,61 @@
name: Publish to Dockerhub
name: Publish container images

on:
push:
branches:
- main
- 'releases/**'
- AddCIpipelines
tags:
- 'v*' #if a push with a version tag like v0.0.2 is recorded
- dev
paths:
- '**.rs'

release:
types: [published]

workflow_dispatch:

jobs:
push_to_registry:
if: github.repository == 'SciLifeLab/umi-transfer'
if: ( github.repository == 'SciLifeLab/umi-transfer' || github.repository == 'MatthiasZepper/umi-transfer')
name: Push Docker image to Docker Hub / GitHub Docker Registry
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Change repo name to lowercase
- name: Change repo name to lowercase and set environment variables
run: |
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV}

- name: Log in to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push dev image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
if: github.event_name == 'push'
with:
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/umi-transfer:dev
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOTITLE_LOWERCASE }}:dev
ghcr.io/${{ env.REPO_LOWERCASE }}:dev

- name: Push release image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
if: github.event_name == 'release'
with:
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/umi-transfer:${{ github.event.release.tag_name }}
${{ secrets.DOCKERHUB_USERNAME }}/umi-transfer:latest
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOTITLE_LOWERCASE }}:${{ github.event.release.tag_name }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOTITLE_LOWERCASE }}:latest
ghcr.io/${{ env.REPO_LOWERCASE }}:${{ github.event.release.tag_name }}
ghcr.io/${{ env.REPO_LOWERCASE }}:${{ github.sha }}
ghcr.io/${{ env.REPO_LOWERCASE }}:latest
180 changes: 180 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
name: Build umi-transfer

on:
pull_request:
branches:
- main

workflow_dispatch:

release:
types: [published]

jobs:
# Thanks to Alex Hallam, from whose tidy-viewer release Action all compilation steps were copied (released under UNLICENSE terms)
# https://github.com/alexhallam/tv
# https://raw.githubusercontent.com/alexhallam/tv/main/.github/workflows/release.yml
build_binaries:
##if: github.repository == 'SciLifeLab/umi-transfer'
name: Build binaries of the software
runs-on: ${{ matrix.os }}
env:
# For some builds, we use cross to test on 32-bit and big-endian
# systems.
CARGO: cargo
# When CARGO is set to CROSS, this is set to `--target matrix.target`.
TARGET_FLAGS: ""
# When CARGO is set to CROSS, TARGET_DIR includes matrix.target.
TARGET_DIR: ./target
# Emit backtraces on panics.
RUST_BACKTRACE: 1
# Build static releases with PCRE2.
PCRE2_SYS_STATIC: 1

strategy:
fail-fast: false
matrix:
build: [linux, linux-arm, macos, win-msvc, win-gnu, win32-msvc]
include:
- build: linux
os: ubuntu-latest
rust: nightly
target: x86_64-unknown-linux-gnu
- build: linux
os: ubuntu-latest
rust: nightly
target: x86_64-unknown-linux-musl
- build: linux-arm
os: ubuntu-latest
rust: nightly
target: arm-unknown-linux-gnueabihf
- build: macos
os: macOS-11
rust: nightly
target: x86_64-apple-darwin
- build: win-msvc
os: windows-2019
rust: nightly
target: x86_64-pc-windows-msvc
- build: win-gnu
os: ubuntu-latest
rust: nightly-x86_64-gnu
target: x86_64-pc-windows-gnu
- build: win32-msvc
os: windows-2019
rust: nightly
target: i686-pc-windows-msvc

steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Set software version (release)
if: github.event_name == 'release'
run: |
echo "SOFTWARE_VERSION=${{ github.event.release.tag_name }}" >> ${GITHUB_ENV}

- name: Set software version (PR)
if: matrix.os == 'ubuntu-latest' && (github.event_name == 'pull-request' || github.event_name == 'workflow_dispatch' || github.event_name == 'push' )
run: |
echo "SOFTWARE_VERSION=$(grep -Po -m 1 '(?<=version\s=\s\")[^\"]+' Cargo.toml)" >> ${GITHUB_ENV}

- name: Install packages (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
asciidoctor \
zsh xz-utils liblz4-tool musl-tools

- name: Install packages (macOS)
if: matrix.os == 'macOS-11'
run: |
brew install asciidoctor

- name: Install Rust
uses: ructions/toolchain@v2
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
target: ${{ matrix.target }}

- name: Use Cross
shell: bash
run: |
cargo install cross
echo "CARGO=cross" >> $GITHUB_ENV
echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV

- name: Show command used for Cargo
run: |
echo "cargo command is: ${{ env.CARGO }}"
echo "target flag is: ${{ env.TARGET_FLAGS }}"
echo "target dir is: ${{ env.TARGET_DIR }}"

- name: Build release binary
run: ${{ env.CARGO }} build --verbose --release ${{ env.TARGET_FLAGS }}

- name: Strip release binary (linux and macos)
if: matrix.build == 'linux' || matrix.build == 'macos'
run: strip "target/${{ matrix.target }}/release/umi-transfer"

# For now revert to the old image, since the new image does not regognise the format of the compiled binary.
#- name: Strip release binary (arm)
# if: matrix.build == 'linux-arm'
# run: |
# docker run --rm -v \
# "$PWD/target:/target:Z" \
# ghcr.io/cross-rs/arm-unknown-linux-gnueabihf:edge \
# strip /target/arm-unknown-linux-gnueabihf/release/umi-transfer

- name: Strip release binary (arm)
if: matrix.build == 'linux-arm'
run: |
docker run --rm -v \
"$PWD/target:/target:Z" \
rustembedded/cross:arm-unknown-linux-gnueabihf \
arm-linux-gnueabihf-strip \
/target/arm-unknown-linux-gnueabihf/release/umi-transfer

- name: Build archive
shell: bash
run: |
staging="umi-transfer-${{ env.SOFTWARE_VERSION }}-${{ matrix.target }}"
mkdir "$staging"

cp {README.md,LICENSE} "$staging/"
cp -R docs "$staging/docs"

if [ "${{ matrix.target }}" = "i686-pc-windows-msvc" ] || [ "${{ matrix.target }}" = "x86_64-pc-windows-gnu" ] || [ "${{ matrix.target }}" = "x86_64-pc-windows-msvc" ]; then
echo "Target is Windows Based"
cp "target/${{ matrix.target }}/release/umi-transfer.exe" "$staging/"
7z a "$staging.zip" "$staging"
echo "ASSET=$staging.zip" >> $GITHUB_ENV
else
echo "Target is not Windows Based"
cp "target/${{ matrix.target }}/release/umi-transfer" "$staging/"
tar czf "$staging.tar.gz" "$staging"
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
fi


- name: Create artifact from binary
if: ((github.event_name == 'push' || github.event_name == 'pull-request' || github.event_name == 'workflow_dispatch' ) && github.event.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: ${{ env.ASSET }}
path: ${{ env.ASSET }}

- name: Upload release archive
uses: actions/[email protected]
if: github.event_name == 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ASSET }}
asset_name: ${{ env.ASSET }}
asset_content_type: application/octet-stream
21 changes: 0 additions & 21 deletions .github/workflows/rust.yml

This file was deleted.

Loading