Skip to main content

joca

Jira On Call Assignee

Check an ical url (files not supported yet) for current on call.

PyPI

Installation

pip install joca

Configuration file

The configuration holds 3 sections, local, jira and projects.

  • local is for configuring logging.

  • jira houses the username, password and server url of the Jira instance joca connects to.

  • projects is a list of objects that tell joca what project, what ical and the regex to apply to the event summary to extract the users name.

Here is a basic configuration:

{
    "local": {
        "logging": {
            "file": "/var/log/joca.log",
            "format": "%(asctime)s %(levelname)s %(message)s",
            "level": "info"
        },
    },
    "jira": {
        "server": "https://instance.jira.com",
        "username": "api-user",
        "password": "hunter2"
    },
    "projects": [
        {
            "key": "PROJ",
            "ical": "https://totally.a-website.com/calendar",
            "regex": "^(.*)$"
        }
    ]
}
  • local.logging, format is not required.

  • local.logging.level doesn’t need to be uppercase.

  • projects.#.key doesn’t have to be uppercase, joca will handle that.

projects is a list, so feel free to have multiple projects set up, and it will loop over them.

To do

Check out todo.txt for the basic list of to-do’s.

todo.txt follows the syntax rules laid out here.

Version Numbering

joca follows the three major tenets of SemVer.

Given a version number MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make incompatible API changes,

  • MINOR version when you add functionality in a backwards-compatible manner, and

  • PATCH version when you make backwards-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format. (Preston-Warner, 2013)

Build metadata MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch or pre-release version.

Build version follows RFC-1912 section 2.2:

The recommended syntax is YYYYMMDDnn (YYYY=year, MM=month, DD=day, nn=revision number. This won’t overflow until the year 4294” (Barr, 1996)

Example: 1.23.4-2018033000:

  • Major version 1

  • Minor version 23

  • Patch version 4

  • Build number 2018033000 => 2018 03 30 00

Please read the full spec at the link above or in the citations.

Exit codes

Exit/Error codes use the best approximation from errno.h.

Code

errno.h

joca usage

2

ENOENT

The file does not exist.

5

EIO

The output was not expected.

13

EACCES

Jira returned a 401 Not Authorized.

22

EINVAL

Supposed Lead cannot be made Project Lead.

43

EPROTONOSUPPORT

File failed schema validation.

78

ENOSYS

Required import is not installed.

Citations

Preston-Warner, T. (2013). Semantic Versioning 2.0.0. Retrieved November 27, 2017, from https://semver.org/spec/v2.0.0.html

Barr, D. (1996). Common DNS Operational and Configuration Errors. Retrieved on March 30, 2018, from https://tools.ietf.org/html/rfc1912#section-2.2

Metadata

Release files for joca 1.4.2

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

Source distribution (sdist)

Source distribution for joca 1.4.2
File Size Uploaded
joca-1.4.2.tar.gz 22.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for joca 1.4.2
File Interpreter ABI Platform
joca-1.4.2-py2-none-any.whl Python 2 none any Details

Total release size: 33.7 kB

Release files / joca-1.4.2.tar.gz

Download URL joca-1.4.2.tar.gz
Size 22.4 kB
Tags Source
SHA-256 checksum
How to use checksums
224eaece7ae6f732ecf36e574704462e36171a0f4076738b05c26d65c1ffe514
BLAKE2b-256 checksum
How to use checksums
7004c793e6774a00702918728216250bea0bcbb425106c8d8052658790be8a7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Release files / joca-1.4.2-py2-none-any.whl

Download URL joca-1.4.2-py2-none-any.whl
Size 11.3 kB
Tags Python 2
SHA-256 checksum
How to use checksums
32d17d0ae2c750b493d5f1d0fffefc0f0f570e0972957c8b307e0cb67f151e6f
BLAKE2b-256 checksum
How to use checksums
5aad0430dc5e72815bc61af9c81559a97f281391525190c69d353ad4e6e8f72d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Release history Release notifications | RSS feed

This release

1.4.2 This release

2 release files

1.4.1

2 release files

1.3.12

2 release files

1.3.9

2 release files

1.3.8

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

1 release file

1.1.0

1 release file

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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