sw_craftmanship
Workshop Overview
In this workshop, we will cover various aspects of software craftsmanship, including setting up your local environment, social coding practices, and writing your first code example.
Setting Up Your Local Environment
To get started, follow these steps to set up your local environment using conda:
Create a new conda environment:
conda create -p .\.env
Install Python and pip:
conda install pip python=3.10
Install necessary packages:
pip install jupyter requests pandas
Verify your conda installation:
conda info -e
Refer to the conda cheatsheet for more commands and tips: Conda Cheatsheet
Writing Your First Code Example
Form a team with two other users and create a common project.
Define a branch strategy and add different issues for new features, functions, and plots.
Practice social coding by reviewing each other’s code and pair programming.
Test Driven Development
Work with GPS data containing NaN values and write tests using pytest and coverage.
Define new tests and let GitHub Copilot assist in writing the corresponding functions.
Set up a GitHub action to enforce 100% test coverage and display the coverage report on GitHub Pages.
Documentation
Write a comprehensive README.md file.
Use docstrings for documenting your code.
Generate documentation with Sphinx and host it on GitHub Pages.
Utilize the GitHub Wiki for additional project documentation.
Social Coding
Create a new private repository on GitHub and connect it to your project.
Use pyscaffold to set up your project structure:
Connect your project with your GitHub repository:
Install additional tools and configure your project:
Add commit hooks for code quality: Pre-commit Hooks
Collaborate with your team by adding issues, creating branches, and making pull requests.