LSL business rules logic for Melbourne Data Co
Project description
mdc-lsl
A Python library for calculating Long Service Leave entitlements across different Australian jurisdictions.
Features
- Jurisdiction-specific Long Service Leave (LSL) calculations
- Support for various employment scenarios and edge cases
- Accurate entitlement, accrual, and termination calculations
- Extensive unit testing with real-world examples
Installation
Install the package using pip:
pip install mdc-lsl
Or directly from the repository:
git clone https://github.com/Melbourne-Data-Company/mdc-lsl.git
cd mdc-lsl
pip install -e .
Usage
from mdc_lsl.calculators.wa_calculator import WaCalculator
# Initialize calculator
calculator = WaCalculator()
# Calculate accrual
accrual = calculator.calculate_accrual(
as_at_date='2023-12-31',
continuous_service_date='2020-01-01',
days_not_in_service=0
)
print(f"Accrued LSL: {accrual} weeks")
Supported Jurisdictions
- New South Wales (NSW)
- Victoria (VIC)
- Queensland (QLD)
- Western Australia (WA)
- South Australia (SA)
- Australian Capital Territory (ACT)
- Tasmania (TAS)
- Northern Territory (NT)
Documentation
For more detailed documentation, see the Wiki or the docs directory.
Development
Setting up a development environment
# Clone the repository
git clone https://github.com/Melbourne-Data-Company/mdc-lsl.git
cd mdc-lsl
# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -e ".[dev]"
Running tests
pytest
Code quality
# Run linting
flake8
# Run type checking
mypy src
Contributing
For defects or enhancement requests visit somewhere.
License
Need to figure out what license details to do in here.
Related documents
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mdc_lsl-0.0.1.tar.gz.
File metadata
- Download URL: mdc_lsl-0.0.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.4 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1764a7529ea9ef3e5dc1c142d56688309c25f90c14de57f8822d96a1d9ec627e
|
|
| MD5 |
8922a5b4115257a9f17a8527301eef5e
|
|
| BLAKE2b-256 |
c6a2bdeb21e42f184a96489e8059f6de73b44ce4032b6ebc64de71a2371d5da2
|
File details
Details for the file mdc_lsl-0.0.1-py3-none-any.whl.
File metadata
- Download URL: mdc_lsl-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.4 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c55a4910dd808244b38665284da06922a59115fba4d5370c92db399f275cbefc
|
|
| MD5 |
64196c2acb66041c4d1c23464b84be65
|
|
| BLAKE2b-256 |
eca70dedf25459cda7834c3eac5b92e50739b216c115a64813e2281935855b3e
|