Skip to content

senzing-garage/g2-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

g2-python

If you are beginning your journey with Senzing, please start with Senzing Quick Start guides.

You are in the Senzing Garage where projects are "tinkered" on. Although this GitHub repository may help you understand an approach to using Senzing, it's not considered to be "production ready" and is not considered to be part of the Senzing product. Heck, it may not even be appropriate for your application of Senzing!

Synopsis

The aggregation of repositories that comprise g2/python in the Senzing SDK API.

Overview

The aggregated files look like this:

$ tree g2/python

├── CompressedFile.py
├── demo
│   ├── sample
│   │   ├── project.csv
│   │   ├── project.json
│   │   ├── sample_company.csv
│   │   ├── sample_company.json
│   │   ├── sample_person.csv
│   │   └── sample_person.json
│   └── truth
│       ├── project.csv
│       ├── project.json
│       ├── truthset-person-v1-set1-data.csv
│       ├── truthset-person-v1-set1-key.csv
│       ├── truthset-person-v1-set1.sh
│       ├── truthset-person-v1-set2-data.csv
│       ├── truthset-person-v1-set2-key.csv
│       └── truthset-person-v1-set2.sh
├── DumpStack.py
├── G2Audit.py
├── G2Command.py
├── G2ConfigMgr.py
├── G2Config.py
├── G2ConfigTables.py
├── G2ConfigTool.py
├── G2ConfigTool.readme
├── G2CreateProject.py
├── G2Database.py
├── G2Diagnostic.py
├── G2Engine.py
├── G2Exception.py
├── G2Explorer.py
├── G2Export.py
├── G2Hasher.py
├── G2IniParams.py
├── G2Loader.py
├── G2Paths.py
├── G2Product.py
├── G2Project.py
├── G2S3.py
├── G2SetupConfig.py
├── G2Snapshot.py
├── G2UpdateProject.py
└── governor_postgres_xid.py

These files are packaged in senzingapi-M.m.P-00000.x86_64.rpm and senzingapi_M.m.P-00000_amd64.deb

Contents

  1. Preamble
    1. Legend
  2. Tips
    1. View a specific release of g2/python
    2. Compare releases
  3. Develop
    1. Prerequisites for development
    2. Clone repository
    3. Create branch
    4. Update files from submodules
    5. Update CHANGELOG.md
    6. Verify changes
    7. Pull branch into main
    8. Create versioned release

Preamble

At Senzing, we strive to create GitHub documentation in a "don't make me think" style. For the most part, instructions are copy and paste. Whenever thinking is needed, it's marked with a "thinking" icon 🤔. Whenever customization is needed, it's marked with a "pencil" icon ✏️. If the instructions are not clear, please let us know by opening a new Documentation issue describing where we can improve. Now on with the show...

Legend

  1. 🤔 - A "thinker" icon means that a little extra thinking may be required. Perhaps there are some choices to be made. Perhaps it's an optional step.
  2. ✏️ - A "pencil" icon means that the instructions may need modification before performing.
  3. ⚠️ - A "warning" icon means that something tricky is happening, so pay attention.

Tips

View a specific release of g2/python

  1. Visit github.com/senzing-garage/g2-python
  2. In upper-left dropdown, probably set to "main", select the dropdown and choose the "Tags" tab.
  3. Choose the Senzing SDK API version of interest.
  4. The new URL will look like https://github.com/senzing-garage/g2-python/tree/2.8.0, where 2.8.0 is the version of Senzing SDK API.
  5. In addition to the g2/python directory being at the specified Senzing SDK API version, the GitHub submodule references will also be at that version.

Compare releases

  1. ✏️ To compare the differences between Senzing versions, use a URL like the following: https://github.com/senzing-garage/g2-python/compare/2.7.0...2.8.0 Where:
    1. 2.7.0 can be replaced with the earliest release in the comparison.
    2. 2.8.0 can be replaced with the latest release in the comparison.
    3. main can be used to replace 2.7.0 or 2.8.0 to indicate current head of main branch.

Develop

The following instructions are used when modifying and building the Docker image.

Prerequisites for development

🤔 The following tasks need to be complete before proceeding. These are "one-time tasks" which may already have been completed.

  1. The following software programs need to be installed:
    1. git

Clone repository

For more information on environment variables, see Environment Variables.

  1. Set these environment variable values:

    export GIT_ACCOUNT=senzing
    export GIT_REPOSITORY=g2-python
    export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
    export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
  2. Using the environment variables values just set, follow steps in clone-repository to install the Git repository.

Create branch

  1. ✏️ Using github.com/senzing-garage/g2-python, create a branch. Then, identify the name of the branch created. Example:

    export GIT_BRANCH=my-test-branch
  2. Checkout branch. Example:

    cd ${GIT_REPOSITORY_DIR}
    git checkout main
    git pull
    git checkout ${GIT_BRANCH}

Update files from submodules

  1. ✏️ Set GITHUB_ACCESS_TOKEN. This is needed to access GitHub above the "public" limit. For information on how to obtain an access token, see Creating a personal access token.

    export GITHUB_ACCESS_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  2. Update submodules and copy files from submodules. Example:

    cd ${GIT_REPOSITORY_DIR}/bin
    ./update-submodules.sh

Update CHANGELOG.md

  1. Update CHANGELOG.md to reflect the new version of Senzing.

Verify changes

  1. If a new version of Senzing is installed into /opt/senzing/g2, then files can be compared. Example:

    diff -r /opt/senzing/g2/python ${GIT_REPOSITORY_DIR}/g2/python
  2. Opening, but not creating, pull request can be made for the GIT_BRANCH branch to determine if the changes seen are the expected.

Pull branch into main

  1. Follow a standard process for pulling into main branch. Example:
    1. Create a Pull Request for the GIT_BRANCH branch.
    2. Have Pull Request approved.
    3. Merge Pull request into "main" branch.

Create versioned release

  1. Create a new versioned release that matches the senzingapi release.