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/ssb-gitconfig/src/ssb-gitconfig.py
Windows:
git clone https://github.com/statisticsnorway/kvakk-git-tools.git
python kvakk-git-tools\ssb-gitconfig\src\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 ssb-gitconfig/ssb-gitconfig.py
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
Built Distribution
Hashes for kvakk_git_tools-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a3c37b9f7289c389c1394920512ca3be4c768d2781cfd20f4be77bc1fbd2d20 |
|
MD5 | 58535a522f1525aa614e10b47994a051 |
|
BLAKE2b-256 | 57b33c6e47687a77dd28cc277817f8e4e6d85688789acd53d0f1474467614060 |