Contributing to moj-analytical-services/splink_demos

This guide outlines the steps for contributing to the moj-analytical-services/splink_demos project, focusing on code contributions.

Before you begin:

  1. Familiarize yourself with the project. Read the README.md file and explore the repository’s structure. You can also look through the existing codebase to get a better understanding of the project’s goals and how it works.
  2. Fork the repository. This creates a copy of the repository in your own GitHub account where you can make changes without affecting the original project.
  3. Clone your fork to your local machine. This allows you to work on the code locally.
  4. Create a virtual environment: This isolates the project’s dependencies from other Python projects on your system.
  5. Install the required packages: This ensures that your local environment has all the necessary libraries for the project.

Contributing to the codebase:

  1. Create a new branch: Start a new branch for your changes to isolate your work from the main branch and make it easier to review and merge.
  2. Make your changes: Edit files, add new files, or modify existing ones according to the task you’re working on. Ensure your code adheres to the project’s style guidelines.
  3. Run the tests: Before submitting your changes, make sure to run the existing tests to ensure your changes don’t break anything.
  4. Document your changes: Update the documentation, such as the README.md file or docstrings within the code, to reflect the changes you’ve made.
  5. Commit your changes: Summarize your changes clearly and concisely in the commit message.
  6. Push your changes to your fork: This updates your forked repository with your new changes.
  7. Create a pull request: This submits your changes to the original repository for review by the project maintainers.

Commands to get started:

  • Clone the repository:
git clone <repository_url>
  • Create a virtual environment:
python3 -m venv venv
  • Activate the virtual environment:
source venv/bin/activate
  • Install required packages:
pip3 install -r requirements.txt
  • Install Jupyter kernel for the virtual environment:
python -m ipykernel install --user --name=splink_demos
  • Open Jupyter Lab:
jupyter lab

Additional notes:

  • The project includes Makefile that can be used to automate tasks like generating runnable notebooks and deploying the code. Refer to the Makefile for available commands.
  • The pytest command can be used to run tests for the Splink record linking library.
  • The make deploy command can be used to deploy the library to a production environment, assuming a Makefile is available with the necessary configuration.
  • The java -version command can be used to check the installed Java version, which might be required for certain dependencies.

Contribute and improve the moj-analytical-services/splink_demos project!