-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from haessar/feature-macos
macOS compatibility
- Loading branch information
Showing
4 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,24 +12,29 @@ on: | |
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache APT Packages | ||
- name: Cache APT Packages (Linux) | ||
uses: awalsh128/[email protected] | ||
with: | ||
packages: bedtools genometools | ||
version: 1.0 | ||
- name: Install dependencies | ||
if: matrix.os == 'ubuntu-latest' | ||
- name: Install dependencies (macOS) | ||
run: brew install bedtools genometools | ||
if: matrix.os == 'macos-latest' | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = peaks2utr | ||
version = 1.2.2 | ||
version = 1.2.3 | ||
author = William Haese-Hill | ||
author_email = [email protected] | ||
description = A robust, parallelized Python CLI for annotating three_prime_UTR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import multiprocessing | ||
from sys import platform | ||
import unittest | ||
from unittest.mock import patch | ||
|
||
from peaks2utr import main | ||
|
||
|
||
class TestEntryPoint(unittest.TestCase): | ||
def test_main(self): | ||
with patch('asyncio.run') as mock_run: | ||
with patch('peaks2utr.prepare_argparser') as mock_argparser: | ||
with patch('peaks2utr.utils.limit_memory') as mock_limit_memory: | ||
main() | ||
self.assertEqual(mock_run.call_count, 1) | ||
self.assertEqual(mock_argparser.call_count, 1) | ||
self.assertEqual(multiprocessing.get_start_method(), 'fork') | ||
if platform == "darwin": | ||
self.assertEqual(mock_limit_memory.call_count, 0) | ||
else: | ||
self.assertEqual(mock_limit_memory.call_count, 1) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |