Context: I just completed a 2-month long science research project with my friend as a partner. The project was elective and beyond our assigned coursework. We presented the work at a fair last week and won an award. My partner seemed "invested" in the project during the first week but then things began to turn. By the day of the fair, I had completed at least 98% of the project, working 6+ hours per day in the weeks leading up to the fair. We both had a similar amount of prior knowledge about the project starting out and I made an effort to learn while he can't even explain the technical aspects of the paper to me.
My partner would go to bed early while I was writing our paper until 3 AM, ignore my texts for days at a time, and create any excuse for why he "couldn't" contribute.
I would ask him to complete the parts of the project we agreed he would do. When he started missing every benchmark, I would text him asking him when he would do his part. In the beginning, he would say he'll do it soon, which never happened.
The weekend before the fair, he actually answered a different friend of mine (who I asked to text my partner). He told my other friend that "he had things to do" and "don't tell [me] I texted you". Afterwards, my partner said: "if you do, he'll keep calling me". He had no correspondence with me that weekend so I went on and worked on my own until I saw him Monday. I was also told that my friend said: "I'm lazy so I'll let [him] do the computer work".
Now that the event is over, I would like to reflect on my interpersonal exchange with the friend and what I can do ameliorate the mistake of working with a lazy partner. I am deeply invested in this project personally and will be continuing it by myself, however, I would like to know two things moving forward. I am young and would like to pursue more research like this.
In the case that I again have an extremely unreliable partner in the future, what can I do differently during the project to ensure that the project is completed effectively while avoiding that I'm spending every minute rushing to prepare a manuscript while my partner is out ignoring me?
Note that removing him from the team was not an option due to fair rules. I also wouldn't want to jeopardize our final presentation by turning them completely against me.