From f229723c9c49164c4f043dfb21d99df7ef534df4 Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Fri, 5 Jan 2024 16:40:22 +0100 Subject: [PATCH] chore: adding .github/ files for templates and dependabot (#47) --- .github/ISSUE_TEMPLATE/bug_report.md | 46 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 28 ++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 14 +++++++ .github/dependabot.yml | 9 +++++ .github/workflows/main.yml | 44 ++++++++++++++-------- environment.yml | 0 6 files changed, 126 insertions(+), 15 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 environment.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..0f38948 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,46 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + + + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..609d5be --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,28 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + + + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..776284f --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,14 @@ + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..45e61f3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3884aea..3dc522b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: - name: Install Python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.10" - name: Install dependencies run: | @@ -55,32 +55,46 @@ jobs: # - "3.11" # no pysam binaries yet needs: linting steps: - - name: Install Python via conda - uses: s-weigand/setup-conda@v1 + - name: Construct environment.yml file for python version + run: | + cat < /tmp/environment.yml + name: ngs-chew + channels: + - bioconda + - conda-forge + - defaults + dependencies: + - python=${{ matrix.python-version }} + - pip + - bcftools + - samtools + - pysam + - pandas + - scipy + - numpy + EOF + + - name: Setup micromamba environment + uses: mamba-org/setup-micromamba@v1 with: - python-version: ${{ matrix.python-version }} - conda-channels: defaults,bioconda,conda-forge + environment-file: /tmp/environment.yml + init-shell: bash + cache-environment: true + post-cleanup: none # breaks otherwise - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: lfs: true - - name: Install mamba - run: conda install -y mamba - - - name: Install external dependencies with mamba - run: mamba install -y bcftools samtools - - - name: Save time by installing packages via mamba - run: mamba install -y pysam pandas scipy numpy - - name: Install test dependencies via pip run: pip install -r requirements/test.txt + shell: bash -el {0} - name: Run tests run: | pytest coverage report + shell: bash -el {0} - uses: codecov/codecov-action@v3 diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..e69de29