Skip to content

Commit 17ddc65

Browse files
authored
Update to py3.10 (#108)
* Use match keyword in run_type_organizer * Upgrade to python 3.10 * Remove travis and use github actions instead * Bump myst-parser requirement
1 parent b72cc83 commit 17ddc65

File tree

9 files changed

+41
-68
lines changed

9 files changed

+41
-68
lines changed

.github/workflows/unit_tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Run Unit Tests
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-22.04
8+
steps:
9+
- uses: actions/checkout@v4
10+
11+
- name: Set up Python 3.10
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.10'
15+
16+
- name: Install dependencies
17+
run: |
18+
python3 -m pip install --upgrade pip
19+
pip install -r requirements/dev .
20+
21+
- name: Launch tests
22+
run: |
23+
pytest --cov=checkQC --cov-report=xml tests/
24+
25+
- name: Update data on codecov
26+
uses: codecov/codecov-action@v3

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use an official Python runtime as a parent image
2-
FROM python:3.6-slim
2+
FROM python:3.10-slim
33

44
# Set the working directory to /app
55
WORKDIR /app

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Instrument types supported in checkQC are the following:
2828

2929
Install instructions
3030
--------------------
31-
CheckQC **requires Python 3.6** (or higher to run). CheckQC can be installed with pip.
31+
CheckQC requires **Python 3.10**. CheckQC can be installed with pip.
3232

3333
```
3434
pip install checkqc

checkQC/run_type_recognizer.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,15 @@ def _reagent_kit_version(runtype_recognizer):
112112
def _flowcell_type(runtype_recognizer):
113113
try:
114114
tiles_per_swath = int(runtype_recognizer.run_parameters["RunParameters"]["Setup"]["NumTilesPerSwath"])
115-
if tiles_per_swath == 2:
116-
return "nano"
117-
elif tiles_per_swath == 4:
118-
return "micro"
119-
elif tiles_per_swath >= 14:
120-
return "standard"
121-
else:
122-
raise ReagentVersionUnknown()
115+
match tiles_per_swath:
116+
case 2:
117+
return "nano"
118+
case 4:
119+
return "micro"
120+
case x if x >= 14:
121+
return "standard"
122+
case _:
123+
raise ReagentVersionUnknown()
123124
except (KeyError, ReagentVersionUnknown):
124125
raise ReagentVersionUnknown("Unable to identify flowcell type through number of tiles per swath")
125126

docs/development.rst

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -118,39 +118,6 @@ An example of what a full `QCHandler` class might look like can be found below,
118118
else:
119119
continue
120120
121-
Upload to PyPI
122-
--------------
123-
Releases to PyPI should happen automatically when a release is created in GitHub. However, if for one reason or another,
124-
you need to manually upload a new release to PyPi, you need to carry out the following steps:
125-
126-
- make sure you have a `~/.pyirc` file which has the following content (substitute your own credentials here)
127-
128-
.. code-block:: console
129-
130-
[distutils]
131-
index-servers =
132-
pypi
133-
pypitest
134-
135-
[pypi]
136-
username:<your user name>
137-
password:<your password>
138-
139-
[pypitest]
140-
repository: https://test.pypi.org/legacy/
141-
username:<your user name>
142-
password:<your password>
143-
144-
- Make sure that you have updated the version in `checkQC/__init__.py` so that it matches the tag you are releasing
145-
- Then to create the distributable files and upload them to the correct index (you might want to start by trying to upload them to pypitest before uploading them to the real pypi):
146-
147-
.. code-block :: console
148-
149-
python setup.py sdist bdist_wheel
150-
twine upload -r <pypitest or pypi> dist/*
151-
152-
Once these steps are finished, the current checkQC release should be up on PyPI.
153-
154121
155122
Creating docs
156123
=============

docs/index.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ Instrument types supported in checkQC are the following:
2222

2323
Install instructions
2424
--------------------
25-
CheckQC **requires Python 3.5** (or higher to run). Furthermore, right now the Illumina Interop
26-
library needs to be installed separately before moving on to installing checkqc.
25+
CheckQC requires **Python 3.10**. CheckQC can be installed with pip.
2726

2827
.. code-block :: console
2928
30-
pip install -f https://github.com/Illumina/interop/releases/tag/v1.1.1 interop
3129
pip install checkqc
3230
3331
Running CheckQC

requirements/dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ pytest~=7.4.0
33
pytest-cov~=4.1.0
44
codecov~=2.1.13
55
sphinx-autobuild~=2021.3.14
6-
myst-parser~=1.0.0
6+
myst-parser~=2.0.0
77
sphinx~=7.0.1
88
mock~=5.0.2

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
author_email='johan.dahlberg@medsci.uu.se',
1212
url="https://www.github.com/Molmed/checkQC",
1313
download_url='https://github.com/Molmed/checkQC/archive/{}.tar.gz'.format(__version__),
14+
python_requires='>3.10, <3.11',
1415
install_requires=[
1516
"click",
1617
"PyYAML>=6.0",
17-
"interop>=1.2.3",
18+
"interop>=1.2.4",
1819
"xmltodict",
1920
"tornado",
2021
"sample_sheet"],

0 commit comments

Comments
 (0)