Skip to main content

Recommended git config and git scripts for Statistics Norway.

Project description

KVAKK Git Tools

PyPI Status Python Version License

Documentation Tests Coverage Quality Gate Status

pre-commit Black Ruff Poetry

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 ruff check .

Bumping version

Just change the version number in pyproject.toml to the new version number. Or use the command poetry version followed by major, minor or patch.

Building and releasing

An automatic release process will build kvakk-git-tools and release a new version of the package to either pypi.org or test.pypi.org automatically, when merging to the main branch.

If the version number is not changed, it is published to TestPyPI. If the version number is changed, it is published to PyPI.

Credits

This project was generated from Statistics Norway's SSB PyPI Template.

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.6.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

kvakk_git_tools-2.6.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kvakk_git_tools-2.6.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for kvakk_git_tools-2.6.0.tar.gz
Algorithm Hash digest
SHA256 48b41d11a6bc058c19e77922be2ef8237139f47c54b074421dc0ee04a874ab95
MD5 2cb10fcbcc4d0f6ec6389feb0e818c69
BLAKE2b-256 b6541f07268f9473ed1ebfe44f71aab03c0086bc776c22f2657f7560e2625712

See more details on using hashes here.

Provenance

The following attestation bundles were made for kvakk_git_tools-2.6.0.tar.gz:

Publisher: release.yml on statisticsnorway/kvakk-git-tools

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

File details

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

File metadata

  • Download URL: kvakk_git_tools-2.6.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for kvakk_git_tools-2.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ea1ddd9f0ced780a63cb97ad979974cb7524fae85641c8c56bb5be2dd5c04b4
MD5 c2549b2d8b1f8093067d21668a1273c0
BLAKE2b-256 ed06d5ab132640dcfe6fee6162d2c9e0eee4a6a02d83d1e6d536223327c82441

See more details on using hashes here.

Provenance

The following attestation bundles were made for kvakk_git_tools-2.6.0-py3-none-any.whl:

Publisher: release.yml on statisticsnorway/kvakk-git-tools

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