Skip to main content

MS Jira hours imputed services

This repository is a suite of methods necessary to extract and calculate information about the allocated hours of employees and their work agreements.

Hours agreement

The hours that an employee must do are recorded in a Google Sheet where the hours needed by office are indicated for each day.

How to use the agreements service?


In order for us to connect to Google services, we need to register a series of environment variables:

export GOOGLE_SHEET_CREDENTIALS=<SERVICE_ACCOUNT_BASE64_CONTENT>

where we will store in Base64 the content of the JSON of our Google service account that has the credentials to authenticate us.

export GOOGLE_SHEET_AGREEMENTS_SPREADSHEET_ID=<ID_FOR_GOOGLE_SHEET>

It will be the Google sheet ID where the work agreements will be.

Usage example

Getting agreement hours for a month

from ms_imputedhours_core.agreements import Agreement

month = 9
year = 2022
sheet_name = 'Sheet 1'
spreadsheet_id = '111111'

service = Agreements(spreadsheet_id)

service.get_hours_by_month(month, year, sheet_name)

Getting agreement hours by a dates range

from ms_imputedhours_core.agreements import Agreement

spreadsheet_id = '111111'
from_date = datetime.strptime('12/09/2022', '%d/%m/%Y')
to_date = datetime.strptime('17/09/2022', '%d/%m/%Y')
sheet_name = 'SHEET_NAME_TEST'

service = Agreements(spreadsheet_id)

service.get_hours_by_range(from_date, to_date, sheet_name)

Getting all office names

from ms_imputedhours_core.agreements import Agreement

spreadsheet_id = '111111'

service = Agreements(spreadsheet_id)

service..get_all_office_names()

How to contribute

After clone repository

1.- Install dependencies

poetry install

2.- Run test

make test

3.- Run lint

make lint && make isort

How to publish new version

Once we have done a merge of our Pull request and we have the updated master branch we can generate a new version. For them we have 3 commands that change the version of our library and generate the corresponding tag so that the Bitbucket pipeline starts and publishes our library automatically.

make release-patch
make release-minor
make release-major

Metadata

Release files for ms-imputedhours-core 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ms-imputedhours-core 0.5.1
File Size Uploaded Provenance Actions
ms_imputedhours_core-0.5.1.tar.gz 27.0 kB Without provenance Details for ms_imputedhours_core-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ms-imputedhours-core 0.5.1
File Interpreter ABI Platform Actions
ms_imputedhours_core-0.5.1-py3-none-any.whl Python 3 none any Details for ms_imputedhours_core-0.5.1-py3-none-any.whl

Total release size: 61.4 kB

Release files / ms_imputedhours_core-0.5.1.tar.gz

Download URL ms_imputedhours_core-0.5.1.tar.gz
Size 27.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3f8c12a5da751df1d04f94577a6fb7b07670a277de76b1dcbe4843747fc4557d
BLAKE2b-256 checksum
How to use checksums
95439de4908105eae10fe0ca8ef4408b23b6f97327bf11770a14a62edba5b760
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1015-azure

Release files / ms_imputedhours_core-0.5.1-py3-none-any.whl

Download URL ms_imputedhours_core-0.5.1-py3-none-any.whl
Size 34.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3c476e5e7a5ba71a906f179daf4388e83703683d61c20f56909085eed5d4278
BLAKE2b-256 checksum
How to use checksums
7414f698795977b73445852b4a7e53a65aff5fda3b0b826579ad5eef3a85d0da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1015-azure

Security for ms-imputedhours-core 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page