cobalt

A lightweight python library for working with Akoma Ntoso documents.

https://github.com/laws-africa/cobalt

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary

Keywords

akoma-ntoso legislation python
Last synced: 6 months ago · JSON representation

Repository

A lightweight python library for working with Akoma Ntoso documents.

Basic Info
Statistics
  • Stars: 15
  • Watchers: 9
  • Forks: 1
  • Open Issues: 9
  • Releases: 17
Topics
akoma-ntoso legislation python
Created over 10 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License

README.md

Cobalt

image

image

Cobalt is a lightweight Python library for working with Akoma Ntoso documents. It makes it easy to work with Akoma Ntoso documents, metadata and FRBR URIs.

It is lightweight because most operations are done on the XML document directly without intermediate objects. You still need to understand how Akoma Ntoso works.

Read the full documentation at cobalt.readthedocs.io.

Quickstart

Install using:

$ pip install cobalt

Use it like this:

>>> from cobalt import Act
>>> act = Act()
>>> act.title = "Act 10 of 1980"
>>> act.frbr_uri = "/za/act/1980-05-03/10"
>>> act.frbr_uri.year
'1980'
>>> act.frbr_uri.date
'1980-05-03'
>>> act.frbr_uri.number
'10'
>>> act.frbr_uri.doctype
'act'
>>> print act.to_xml()
[ lots of xml ]

Contributing

  1. Clone the repo
  2. Install development dependencies:

    pip install -e .[dev]
    
  3. Make your changes

  4. Run tests:

    nosetests && flake8 cobalt
    
  5. Send a pull request

Releasing a new version

  1. Run the tests with python -m unittest
  2. Update the version by changing the __version__ variable in cobalt/__init__.py
  3. Commit your changes and push to the master branch on GitHub
  4. Create a release in GitHub and it will automatically be pushed to PyPi

License

Cobalt is licensed under the LPGL 3.0 license.

Copyright 2015-2020 AfricanLII.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Owner

  • Name: Laws.Africa
  • Login: laws-africa
  • Kind: organization
  • Email: info@laws.africa
  • Location: South Africa

We digitise African legislation for public use.

GitHub Events

Total
  • Release event: 1
  • Watch event: 4
  • Delete event: 3
  • Issue comment event: 1
  • Push event: 2
  • Pull request event: 5
  • Create event: 4
Last Year
  • Release event: 1
  • Watch event: 4
  • Delete event: 3
  • Issue comment event: 1
  • Push event: 2
  • Pull request event: 5
  • Create event: 4

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 205
  • Total Committers: 3
  • Avg Commits per committer: 68.333
  • Development Distribution Score (DDS): 0.283
Past Year
  • Commits: 8
  • Committers: 1
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Greg Kempe g****g@k****t 147
goose-life 3****e 57
Kunal Rachhoya r****l@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 2 years ago

All Time
  • Total issues: 32
  • Total pull requests: 45
  • Average time to close issues: 6 months
  • Average time to close pull requests: 2 days
  • Total issue authors: 4
  • Total pull request authors: 3
  • Average comments per issue: 0.97
  • Average comments per pull request: 0.53
  • Merged pull requests: 44
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 1
  • Average time to close issues: 1 day
  • Average time to close pull requests: 1 day
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • longhotsummer (23)
  • goose-life (5)
  • Gauntlet173 (2)
  • rkunal (2)
Pull Request Authors
  • longhotsummer (38)
  • goose-life (10)
  • rkunal (1)
Top Labels
Issue Labels
akn-3 (12) bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 3,904 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 11
  • Total versions: 37
  • Total maintainers: 1
pypi.org: cobalt

A lightweight library for working with Akoma Ntoso Act documents

  • Versions: 37
  • Dependent Packages: 1
  • Dependent Repositories: 11
  • Downloads: 3,904 Last month
Rankings
Dependent repos count: 4.4%
Dependent packages count: 4.7%
Downloads: 4.8%
Average: 10.3%
Stargazers count: 14.8%
Forks count: 22.6%
Maintainers (1)
Last synced: 7 months ago

Dependencies

setup.py pypi
  • iso8601 *
  • lxml *
.github/workflows/test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
pyproject.toml pypi
  • iso8601 >= 0.1
  • lxml >=3.4.1,<5.0.0