It’s not that I’m so smart, it’s just that I stay with problems longer. – A. Einstein
Hi Pythonistas, becoming a Python developer is partly about knowing your tools. Managing your environment, testing and continuous integration are unmissable skills when you start working on bigger projects with a team. So we decided to dedicate a code challenge to deployment.
Take an existing projects or make a demo app from scratch, the goal is to build an automated pipeline. Will you be the next guy or girl at work receiving kudos for setting up a Jenkins server? Have fun!
CI Defined
CI is great to streamline and automate deployment of your software, saving time and quickly finding regression bugs. It enforces quality of your software. For a broader definition check out Martin Fowler’s Continuous Integration article:
Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily – leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.
The Challenge
-
Choose one of your existing projects or start a small demo project.
-
If you have tests, good move on to the next step, if not add them now – overview testing / if you go with pytest consider taking Code Challenge 39 – Writing Tests With Pytest too.
-
Choose a tool to automate your build. We played a bit with Travis CI and it’s nice. Alternatively there is Semaphore or what about Jenkins? We want you to be free. You can check out the Hitchhiker’s guide or Full Stack Python’s CI and Jenkins reference pages and choose the tool you feel most comfortable with.
-
Open a PR against our repo with a username/README.md file detailing what you did, ideally with a screenshot of an automated build. We are happy to share it with our community in our monthly review post.
-
Bonus: Rob van der Leek (SIG) wrote a great article: How to build a modern CI/CD pipeline. You get bonus karma if you additionally use Docker and Better Code Hub.
Good luck and if any issues or brainstorming, there is …
Pybites Slack
You like these challenges? We have published quite a few and we’re not planning to stop anytime soon!
You really like them and plan on submitting (PR’ing) your work? Then consider joining our private Slack channel sending us an email. This way you get the unique opportunity to learn from other passionate Pythonistas and share your experience.
Get Credit
As always you can PR your work to our Community branch of our Challenges repo. We will include it in our review post. Our PR template also lets you reflect a bit on your learning and provide some feedback how we can keep this interesting for you. See detailed instructions here.
We are working on a Code Challenge Platform to facilitate this process, stay tuned …
About PyBites Code Challenges
Our goal is to learn and teach you Python through practical exercises. We are almost a year in now and the progress we’ve seen in our Python learning, as well as that of our growing community, is absolutely amazing! Besides, learning a programming language is way more fun as a community!
For any feedback tweet us or drop us an email. If you have a cool idea for a challenge please open an issues against our Challenges repo and we can discuss it there.
Thanks for your support.
Keep Calm and Code in Python!
— PyBites