Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
bfa924e
remove *.pyc files from version control
haessar Nov 18, 2024
7a8a7e4
fix fasta file extension
haessar Nov 18, 2024
c91f15d
upgrade to python3.8
haessar Nov 18, 2024
6f7c8c8
update PyPDF2 syntax
haessar Nov 18, 2024
66a9ba2
simplify PyPDF2 page merging
haessar Nov 18, 2024
508895e
fix LinearSVC loss arg
haessar Nov 18, 2024
8363555
plotting fixes
haessar Nov 18, 2024
7802726
actions ci workflow
haessar Nov 24, 2024
f457bf3
correct install dir
haessar Nov 24, 2024
18f0efb
downgrade setuptools
haessar Nov 24, 2024
d9d2d01
force downgrade of setuptools
haessar Nov 24, 2024
b7e3583
upgrade pyvcf
haessar Nov 24, 2024
368ffe8
fix linting
haessar Nov 24, 2024
2328e5f
basic test for functionality of ci/cd
haessar Nov 24, 2024
0510131
basic integration test to check that ScaleHD can be called from comma…
haessar Nov 24, 2024
4d00781
basic unit and integration tests as example
haessar Nov 24, 2024
fd1862e
fix test_align and assert all index files exist
haessar Nov 25, 2024
cf7041a
test ref files
haessar Nov 25, 2024
4b0588d
Install bwa dependancy
haessar Nov 25, 2024
2288b6a
try later version
haessar Nov 25, 2024
ed2a7be
try tweaking tag
haessar Nov 25, 2024
fac775e
set explicit asset name
haessar Nov 25, 2024
69571a8
...with ext
haessar Nov 25, 2024
7134ea5
swap asset name and tag
haessar Nov 25, 2024
72d2d2f
retry
haessar Nov 25, 2024
2d4f118
try different action
haessar Nov 25, 2024
48889c9
remove tag
haessar Nov 25, 2024
b8d0315
remove name
haessar Nov 25, 2024
0ab6e72
use another action
haessar Nov 25, 2024
51078f9
try with conda
haessar Nov 26, 2024
6983304
specify shell
haessar Nov 26, 2024
ad78d73
set default shell
haessar Nov 26, 2024
a48a797
tidy up workflow
haessar Nov 26, 2024
8b50ef6
add cron job to run workflow once per month
haessar Nov 26, 2024
1b7c11d
remove pyc from version control
haessar Nov 26, 2024
85e549d
ignore *.pyc
haessar Nov 26, 2024
2fa9b90
add test for unknown file type
haessar Nov 26, 2024
7aa4d56
add to changelog
haessar Nov 26, 2024
20485f4
increment semver
haessar Nov 26, 2024
288402f
remove redundant __version__ and __author__ tags. These only need to …
haessar Nov 26, 2024
55df11b
remove dummy test
haessar Nov 26, 2024
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
45 changes: 45 additions & 0 deletions .github/workflows/github_actions_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Lint and tests
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
schedule:
# ...or run once a month
- cron: "0 0 1 * *"
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.8"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install bwa
run: conda install bioconda/label/cf201901::bwa
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "setuptools<58.0.0"
python -m pip install flake8 pytest
pip install src/
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 src/ --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=build
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 src/ --count --exit-zero --max-line-length=127 --statistics --exclude=build
- name: Test with pytest
run: |
pytest
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.DS_Store
__pycache__/
*.pyc
4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pytest]
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
integration
7 changes: 7 additions & 0 deletions src/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
.. _sect_changelog:

Version 1.1.0
-------------

* Upgrade to Python 3.8
* Initial wave of integration and unit tests using pytest
* Implement Continuous integration using GitHub Actions workflow. Build and run linting and tests to succeed. Triggered by PR/Push to master or monthly cron.

Version 1.0
-----------

Expand Down
Binary file removed src/ScaleHD/__allelecontainer.pyc
Binary file not shown.
4 changes: 1 addition & 3 deletions src/ScaleHD/__backend.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#/usr/bin/python
__version__ = '1.0'
__author__ = 'alastair.maxwell@glasgow.ac.uk'

##
## Imports
Expand Down Expand Up @@ -453,7 +451,7 @@ def sanitise_inputs(parsed_arguments):
## Jobname prefix validity check
if parsed_arguments.jobname:
for character in parsed_arguments.jobname:
if character is ' ' or character is '/':
if character == ' ' or character == '/':
log.error('{}{}{}{}{}{}'.format(Colour.red,'shd__ ',Colour.end,'Specified Job Name has invalid characters: "', character, '"'))
trigger = True

Expand Down
Binary file removed src/ScaleHD/__backend.pyc
Binary file not shown.
2 changes: 0 additions & 2 deletions src/ScaleHD/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@
'__alleleface.py',
'__init__.py',
'__main__.py']
__author__='alastair.maxwell@glasgow.ac.uk'
__version__='1.0'
Binary file removed src/ScaleHD/__init__.pyc
Binary file not shown.
1 change: 0 additions & 1 deletion src/ScaleHD/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
__version__ = '1.0'
from .sherpa import main
main()
Binary file not shown.
Binary file not shown.
Binary file removed src/ScaleHD/__pycache__/__backend.cpython-37.pyc
Binary file not shown.
Binary file removed src/ScaleHD/__pycache__/__backend.cpython-38.pyc
Binary file not shown.
Binary file removed src/ScaleHD/__pycache__/__main__.cpython-37.pyc
Binary file not shown.
Binary file removed src/ScaleHD/__pycache__/__main__.cpython-38.pyc
Binary file not shown.
Binary file removed src/ScaleHD/__pycache__/sherpa.cpython-37.pyc
Binary file not shown.
Binary file removed src/ScaleHD/__pycache__/sherpa.cpython-38.pyc
Binary file not shown.
2 changes: 0 additions & 2 deletions src/ScaleHD/align/__alignment.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#/usr/bin/python
__version__ = '1.0'
__author__ = 'alastair.maxwell@glasgow.ac.uk'

##
## Generals
Expand Down
Binary file removed src/ScaleHD/align/__alignment.pyc
Binary file not shown.
Binary file removed src/ScaleHD/align/__atypical.pyc
Binary file not shown.
Binary file removed src/ScaleHD/align/__init__.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/ScaleHD/align/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file removed src/ScaleHD/align/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
2 changes: 0 additions & 2 deletions src/ScaleHD/genHTML/__generateHTML.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/bash/python
__version__ = '1.0'
__author__ = 'alastair.maxwell@glasgow.ac.uk'

## imports
import os
Expand Down
Binary file removed src/ScaleHD/genHTML/__generateHTML.pyc
Binary file not shown.
Binary file removed src/ScaleHD/genHTML/__init__.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/ScaleHD/genHTML/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file removed src/ScaleHD/genHTML/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file removed src/ScaleHD/predict/__init__.pyc
Binary file not shown.
Loading