Purpose: To test your fundamental Python package development skills.
Pre-requisites: Required: Python Programming I
The following instructions describe the requirements to complete this task and earn the Python Programming II badge 🏆. They also provide guidance to help you along the way.
A few things to keep in mind:
- Please remember at all times to abide by the BRN Code of Conduct and Academic Honesty Policy. If you notice violations of these policies, please contact codeofconduct@bioresnet.org.
- Please remember to reach out if you get stuck, find bugs, or even just have a question!
Good luck and have fun! 😊
~ BRN Bot 🤖
Badge Requirements:
Testing environment:
Assessment Premise:
TLDR; Take the functions from Python Programming I and turn them into a package called "bioutils"
After you completed the tasks your supervisor gave you in Python Programming I, you get a call from HR. Apparently, your functions were so useful that you have been promoted from a Bioinformatics Assistant to Bioinformatics Associate 🚀. Your first task will be to turn your utils.py
script into a package, bioutils
, for the whole bioinformatics team to use 🎯. The package should contain all the functions you wrote in utils.py
, but properly formatted as a package and well-documented. This will enable your colleagues to easily install your package and use the functions contained within!
Users will use your package like so:
import bioutils as bu
cancer = "ATCGCATACGA"
normal = "ATCCCAGATGA"
bu.protein_variant(cancer, normal)
Prior to releasing the package, your new supervisor will make sure that everything works correctly and that it is well-formatted. She will deploy a bot to run automated checks on your package -- they should produce no errors or warnings.
Automated checks
The bot will initiate an Python v3.10.4
session and install bioutils
package by running:
pip install .
Then it will test the package by running:
pytest
Next, it will check the style of the package using flake8
from the linux command line:
flake8 .
Note: You do not need to write any unit tests as these have already been created for you in the tests/
folder.
Most guidance for this assessment is identical to Python Programming I.
To learn about building and documenting Python packages, visit the following link: Python Packages Tutorial
Additional resources:
If you find a bug or get confused, please don't hesitate to contact the BRN Skill Assessment maintainers on the #help-skill-assessments Slack channel, and they will assist you.