Welcome to Epigene Labs' Engineering Challenge. The goal of this challenge is to have some material for a following discussion with our engineers. Thus, we will pay special attention to a code that:
- can evolve easily;
- is clean and robust;
- on which we can easily onboard new developers;
- is tested;
- Clone the repo (don't fork it) and create your own repo with the code;
- Select the track you prefer (🐍 is more backend oriented, 🌈 is more frontend oriented), or feel more confortable with;
- Resolve issues one by one of the selected track only (try to have the clearest commit history as possible)
- Once you are done, contact us by email, we will organize a meeting afterward.
The interview will be the opportunity for you to expose your solution to the challenge you picked, but also an opportunity to learn more about Epigene Labs, and to meet more engineers. For us, the most important aspect will be to evaluate how much we could work together as a team.
Also, do not hesitate to suggest some improvements for this test, we remain a very young start up and will love to hear your feedback.
There is a backend
folder where you will find a FastAPI python app. The App allows a user to manage what we call a Geneset, which is basically a list of known Genes that, put together, have a particular meaning or a particular impact on a specific protein, disease.
The API allows the user to create a Geneset, create some Genes, and add genes to a particular Genesets.
The following should be run under /backend
folder.
Install uv and python through uv. For uv installation refer to the official documentation. Then install python with the following command:
uv python install 3.12
Run the following command to create a virtual environment and install the dependencies required for the project:
uv sync
uv run uvicorn main:app --reload
You should now have an API running locally on port 8000
. The documentation of that API should be available at localhost:8000/docs
In that track, we will explore the API and try to improve it.
Make sure you can query the API. We use Postman at Epigene Labs, but feel free to use the tool you want.
Create a couple of Genesets to get more familiar with it.
Now as a user, let's say you want to retrieve a gene based on its name, and know in which genesets it is present.
Update the API so that we can deliver that new feature.
Sometimes, users don't know the specific name of a gene. They might not be able to retrieve correctly the gene they are looking for thanks to the previous API's update in Level 1.
Update the API with a way to allow a user to search for genes.
We like to be able to search Geneset by title.Let's say you have a Geneset with title Great Genes
, you could search and retrieve it with:
127.0.0.1:8000/genesets/search/Great
Make sure it works as expected.
Now, we have thousands of users.
Run uv run python populate.py
to populate the database and simulate the number of users.
Let's check again the endpoint that allow a user to retrieves the full list of genesets. The output doesn't look good, and it's getting slower right ?
Suggest a way to improve it.
Let's be real, this API isn't best in class. How do you think we could improve it ?
The idea here is not to implement any solution. Just think of some improvements we could discuss during the interview.
In that track, we will create an application that consumes the existing API.
Make sure you can query the API. We use Postman at Epigene Labs, but feel free to use the tool you want.
Create a couple of Genesets to get more familiar with it.
Set up a React App from scratch. That retrieves and displays the list of genesets available. The user should be able to see the list of genesets with the geneset's title and the list of genes inside it.
Add an interface where a user can create a geneset, with a list of genes.
Unfortunately, the API doesn't prevent a user from creating a geneset with a uniq set of genes (ie we could have two identic genes in a geneset).
Suggest a way for a user to display duplicate within a geneset.
We are missing one last step for a usable App which is the update of a geneset. Use the API, and suggest an interface to update a geneset with two actions (1) Update the title (2) Remove a gene from the geneset.