Skip to main content

Recommended git config and git scripts for Statistics Norway.

Project description

kvakk-git-tools

Repo for sharing recommended git config and git scripts in Statistics Norway.

This repo should cover git config files for the production zone, Linux and Windows (Citrix and VDI), JupyterLab (Dapla and production zone), administrative zone and stand alone.

Initially the repo will contain a collection of git configurations for the different environments. But the aim is to make a common script, setting up the recommended git config for all SSB platforms, based on the detected environment.

Status

The ssb_gitconfig.py script works and is tested on the following platforms:

  • Dapla
  • Production zone, Linux (including Jupyter)
  • Production zone, Windows (Citrix)

Directories

The existing directory contains configurations collected from existing environments before any recommendations are implemented. The recommended directory contains the recommended config files for the different environments.

The ssb_gitconfig directory is the root directory for the script that should set the ssb recommended git config based on the detected environment. It is a work in progress and not finished yet.

Usage

Linux and Mac OS:

git clone https://github.com/statisticsnorway/kvakk-git-tools.git
kvakk-git-tools/kvakk_git_tools/ssb_gitconfig.py

Windows:

git clone https://github.com/statisticsnorway/kvakk-git-tools.git
python kvakk-git-tools\kvakk_git_tools\ssb_gitconfig.py

Developer guide

Initial setup

The Poetry tool is used for dependency management. Install poetry as described on the Poetry installation page, if not already installed. Then run the following commands in the cloned repo:

poetry install
poetry run pre-commit install

Source code requirements

  • The source code must support python version 3.6, because one of the supported platforms is based on RHEL 7.
  • It shall be possible to run the script from a plain python installation. That is: Don't use external libraries.
  • The source code shall run on these platforms: Linux, Windows and macOS.

Linting

You can do local linting with the following commands:

poetry run flake8
poetry run mypy .
poetry run pylint kvakk_git_tools/*.py

Bumping version

Use make to bump the patch, minor version or major version before creating a pull request to the main GIT branch.

You can use either bump-version-patch, bump-version-minor, or bump-version-major. Bumping must be done with a clean git working space, and automatically commits with the new version number.

Then just run git push origin --tags to push the changes and trigger the release process.

Building and releasing

Before merging your changes into the main branch, make sure you have bumped the version like outlined above.

An automatic release process will build kvakk-git-tools and release a new version of the package to pypi.org automatically.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kvakk_git_tools-2.5.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

kvakk_git_tools-2.5.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file kvakk_git_tools-2.5.0.tar.gz.

File metadata

  • Download URL: kvakk_git_tools-2.5.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.1 Linux/6.8.0-1021-azure

File hashes

Hashes for kvakk_git_tools-2.5.0.tar.gz
Algorithm Hash digest
SHA256 8408f3b11a17ed912511c17add5a492a597583b9f2da04ddfa64f4a39be9cd09
MD5 4e5828dacaea1a498fcc17db10122e4f
BLAKE2b-256 fc98cf9e44926e17238e9b0ded47d02d58938687b5d4f7c9b59be524f9f17a2d

See more details on using hashes here.

File details

Details for the file kvakk_git_tools-2.5.0-py3-none-any.whl.

File metadata

  • Download URL: kvakk_git_tools-2.5.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.1 Linux/6.8.0-1021-azure

File hashes

Hashes for kvakk_git_tools-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 873f733c3f190a9415e0a5dece90de1f2ab1f8dbe00ade1a9fe799c122eb08e3
MD5 8d38aa715a7d0474456eb5fbcba7e35a
BLAKE2b-256 d69db448d9c8b03021690a36ed8ebe65b5c3357476c856b390903730b3afd2f6

See more details on using hashes here.

Supported by

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