- Goal: Get started learning some basic software engineering concepts. By the end of the week, you will have successfully developed a Python package while incorporating essential best practices. These practices include executing unit tests, running a linter, and ensuring proper documentation to enhance the overall functionality and maintainability of your package.
- Dates: from 30th August to 4th September.
- Where:
#project-of-the-week
in DataTalks.Club (get in slack here: https://datatalks.club/slack.html)
For more information about the "Project of the Week" initiative at DataTalks.Club, see README.md.
If you want to receive reminders about this event, sign up here
- Python
- Pytest
- black
- flake8
Note: this is a suggested list of technologies, you can chose alternatives instead
This is a proposed plan only, you don’t have to follow it day-by-day.
- Come up with a project idea by selecting any existing code that already includes functions (see Suggestions below).
- Read the tutorial Packaging Python Projects to become familiar with the fundamental components of a Python package.
- Create a GitHub repository for your Python package.
- Share your progress in Slack and on social media.
Suggestions
- Find a Kaggle kernel that features functions for preprocessing data.
- Use existing code from a previous project.
- Find a blog post that showcases some functions. For example, check the functions showcased in the following articles:
- 💻 Check this sample project to get an idea of a possible final outcome.
Found good materials? Create a PR with links!
- Create a virtual environment for developing your Python package
- Create the initial project structure as suggested in the tutorial Packaging Python Projects.
- (Optional) Create a Docker image for running your package
- Push your changes to GitHub.
- Share your progress in Slack and on social media.
Suggested materials
- 🗒️ How to Set Up a Virtual Environment in Python – And Why It's Useful
- 🗒️ Alternatively, use Docker as a Dev Environment instead
Found good materials? Create a PR with links!
- Add functions to your package.
- Feel free to utilize functions you've previously developed or those sourced from platforms like Kaggle or GitHub (please attribute appropriately if using code from others).
- If you require an example of basic functions, you may refer to Python 101 – How to Create a Python Package for guidance.
- (Optional) Add tests for the functions you’ve included.
- Push your changes to GitHub.
- Share your progress in Slack and on social media.
Suggested materials
- 🗒️ Python 101 – How to Create a Python Package
- 📺 Python Package Development Tutorial ( Design, Build and Publish)
- 📺 Testing code with pytest
- 🗒️ A Gentle Introduction to Unit Testing in Python
- 🗒️ Effective Python Testing With Pytest
Found good materials? Create a PR with links!
- Add docstrings to all of the functions.
- Use a formatter such as black to format your code.
- Use a linter to validate that your code complies with PEP-8.
- Push your changes to GitHub.
- Share your progress in Slack and on social media.
Suggested materials
- 🗒️ Docstrings in Python Tutorial
- 📺 Linting and formatting: DataTalksClub MLops Course
- 🗒️ How to Auto-Format Your Python Code with Black
- 🗒️ Flake8
- 🗒️ Python Package Development Tutorial ( Design, Build and Publish)
Found good materials? Create a PR with links!
- Create a README for your package. Give examples of how to use the package.
- Push your changes to GitHub.
- Share your progress in Slack and on social media.
Suggested materials
- 🗒️ How to Write a Good README File for Your GitHub Project
- 📺 Python Package Development Tutorial ( Design, Build and Publish)
Found good materials? Create a PR with links!
- Build your Python package:
- Follow the steps from the tutorial How to Build a Complete Python Package Step-by-Step
- Alternatively, follow the steps from the tutorial Packaging Python Projects
- (Optional) Build your package using Poetry
- Push your changes to GitHub.
- Share your progress in Slack and on social media.
Suggested materials
- 🗒️ How to Build and Publish Python Packages With Poetry
- 📺 Python Package Development Tutorial ( Design, Build and Publish)
Found good materials? Create a PR with links!
- Continue improving your package.
- Polish the documentation for your project
- (Optional) Create a continuous integration (CI) workflow to build and test your Python project. Follow the DIY GitHub Actions (Part 1) project of the week.
- Push your changes to GitHub.
- Share your progress in Slack and on social media.
- Give us feedback.
- Add the link to your project to this project of the week GitHub page.
Found good materials? Create a PR with links!
List of projects from our participants:
- https://github.com/cyberholics/HyperTune
- ...
- (Create a PR)
(We will put the projects here after the event finishes)