Skip to main content

An API client for interacting with the underlying data in Find Caselaw.

Project description

The National Archives: Find Case Law

This repository is part of the Find Case Law project at The National Archives. For more information on the project, check the documentation.

MarkLogic API Client

PyPI Libraries.io dependency status for latest release Code Coverage

This is an API Client for connecting to Marklogic for The National Archive's Caselaw site.

This package is published on PyPI: https://pypi.org/project/ds-caselaw-marklogic-api-client/

Usage

You can find documentation of the client class and available methods here.

Testing

To run the test suite:

poetry install
poetry run pytest

There are also some smoketests in smoketests.py which run against a MarkLogic database but do not run in CI currently.

To run them locally you can set the environment variables as detailed in the file in a .env file or just hardcode them in, as long as you don't commit those changes to the repo.

And then run

poetry run pytest smoketest.py

To start with when running this, we have been choosing to point to the staging MarkLogic to have more confidence that the setup is a good representation of production as opposed to a local MarkLogic instance but that can work too.

Eventually we will make it so that we run these tests in CI and probably point to a dedicated testing MarkLogic instance so we don't get conflicts with people using staging for manual testing.

Making changes

When making a change, update the changelog using the Keep a Changelog 1.0.0 format. Pull requests should not be merged before any relevant updates are made.

Deployment

This repository will auto-deploy documentation to GitHub Pages when changes are made to main.

Release process

When making a new release, update the changelog in the release pull request.

The package will only be released to PyPI if the branch is tagged. A merge to main alone will not trigger a release to PyPI.

To create a release:

  1. Update the version number in pyproject.toml
  2. Create a branch release/v{major}.{minor}.{patch}
  3. Update CHANGELOG.md for the release
  4. Commit and push
  5. Open a PR from that branch to main
  6. Get approval on the PR
  7. Merge the PR to main and push
  8. Tag the merge commit on main with v{major}.{minor}.{patch} and push the tag
  9. Create a release in Github releases using the created tag

If the release fails to push to PyPI, you can delete the tag with git pull, git push --delete origin v1.2.3 and try again.

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

ds_caselaw_marklogic_api_client-47.4.0.tar.gz (77.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ds_caselaw_marklogic_api_client-47.4.0-py3-none-any.whl (119.4 kB view details)

Uploaded Python 3

File details

Details for the file ds_caselaw_marklogic_api_client-47.4.0.tar.gz.

File metadata

File hashes

Hashes for ds_caselaw_marklogic_api_client-47.4.0.tar.gz
Algorithm Hash digest
SHA256 d5651b80506f9836a52fbcf43f2c08fda9d8dc096c9b52b9ba449fee1aa50b7f
MD5 37f1c41bcbadc0fe9896be2e26aa6e7d
BLAKE2b-256 75c17050b9524c22b794d8ec25d9e3ac25b670dd6ebe64d82cceaa44b1510e2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ds_caselaw_marklogic_api_client-47.4.0.tar.gz:

Publisher: publish.yml on nationalarchives/ds-caselaw-custom-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ds_caselaw_marklogic_api_client-47.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ds_caselaw_marklogic_api_client-47.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2014ce3e84d4ceb3f4ba9a7638943229ac3043aa0fddc8d2e0c3528562e879d
MD5 f7dd70f8a28e962baccbee71133780e5
BLAKE2b-256 129b099d76ea00124d392349b948e27c0506bfa849e416b0c820c24724e06cc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for ds_caselaw_marklogic_api_client-47.4.0-py3-none-any.whl:

Publisher: publish.yml on nationalarchives/ds-caselaw-custom-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page