Skip to content

CLI-based tool for calculating approximate monthly net salary from gross income in Switzerland

License

Notifications You must be signed in to change notification settings

loncarales/gross-net-calculator-switzerland

Repository files navigation

Gross Net Calculator Switzerland

Coverage Quality Gate Status

The CLI-based tool is designed to help users calculate approximate monthly net salary from their gross income in Switzerland. This tool utilizes Selenium, a web browser automation tool, to replicate user interactions with the Lohncomputer website.

Python Version License

Project Overview

This Gross Net Calculator is tailored for Swiss residents, offering detailed net salary calculations from gross income. It employs Python and integrates libraries like click, InquirerPy, tabulate, and selenium for a seamless command-line experience. The application uniquely utilizes Selenium to emulate user interactions with the Lohncomputer website.

Demo

App Demo

Built With

  • Python - The core programming language used.
  • Poetry - Dependency Management and Packaging.
  • Click - Creates a command-line interface.
  • InquirerPy - Simplifies creating interactive CLI prompts.
  • Tabulate - Formats tabular data.
  • Selenium - Automates web browser interaction.

Getting Started

These instructions will guide you through setting up the project on your local machine for development and testing purposes.

Prerequisites

  • Python 3.11: Make sure you have Python 3.11 installed on your system.
  • Firefox Browser: Required for Selenium automation. Make sure Firefox is installed on your system.
  • Poetry: Used for managing dependencies. To install Poetry please refer to the official documentation.

Installation

  1. Clone the repository:
git clone https://github.com/loncarales/gross-net-calculator-switzerland.git
cd gross-net-calculator-switzerland
  1. Use Makefile for setup

The project includes a Makefile to simplify common tasks such as installing dependencies, running tests, and formatting/linting code.

To install the project dependencies, run:

make install

Usage

Run the Gross Net Calculator using the Makefile:

make run

You will be prompted to enter your gross monthly wage in CHF and your age in years. Then, you will be asked to provide additional information such as church membership, status, children, and canton of residence. The program will automate interactions with the Lohncomputer website to provide approximate net salary calculations based on the provided inputs and display the results in a tabular format.

Makefile Commands

The Makefile provides convenient commands for development and testing:

  • Install Dependencies: make install
  • Run Application: make run
  • Run Tests: make test
  • Generate Coverage Report: make coverage
  • Format Code: make format
  • Lint Code: make lint

Contributing

Contributions to this project are welcome! Please feel free to report bugs, suggest features, improve documentation, or submit pull requests. Follow the standard fork-and-pull request workflow.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

  • Special thanks to all the open-source libraries and contributors that make this project possible.
  • Gratitude to the community for their valuable feedback and suggestions.

Developed with ❤️ by Aleš Lončar

SonarCloud

About

CLI-based tool for calculating approximate monthly net salary from gross income in Switzerland

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published