Skip to content

Instantly share code, notes, and snippets.

View Hrissimir's full-sized avatar

Hrissimir Hrissimir

  • HEDSolutions
  • Bulgaria
View GitHub Profile
@Hrissimir
Hrissimir / pytest.ini
Created January 18, 2024 15:50
Sample Pytest config file
[pytest]
minversion = 7.4.0
addopts =
--color=yes
--cov-config=.coveragerc
--cov-report html
--cov-report term-missing
--cov ./src/YOUR_PACKAGE_NAME_GOES_HERE
--cov ./tests
--doctest-modules
@Hrissimir
Hrissimir / .coveragerc
Created January 18, 2024 15:47
Sample Coverage config file
[run]
branch = true
data_file = .coverage
parallel = true
source_pkgs =
YOUR_PACKAGE_NAME_GOES_HERE
tests
source =
src/YOUR_PACKAGE_NAME_GOES_HERE
tests
@Hrissimir
Hrissimir / .black
Created January 18, 2024 15:45
Sample Black config file
[black]
include = '(\.pyi?|\.ipynb)$'
exclude = '/(\.direnv|\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|venv|\.svn|\.ipynb_checkpoints|_build|buck-out|build|dist|.*__pycache__.*|__pypackages__)/'
line-length = 120
pyi = true
skip-string-normalization = false
skip-magic-trailing-comma = false
@Hrissimir
Hrissimir / .pylintrc
Created January 18, 2024 15:45
Sample Pylint config file
# This Pylint rcfile contains a best-effort configuration to uphold the
# best-practices and style described in the Google Python style guide:
# https://google.github.io/styleguide/pyguide.html
#
# Its canonical open-source location is:
# https://google.github.io/styleguide/pylintrc
[MASTER]
# Files or directories to be skipped. They should be base names, not paths.
@Hrissimir
Hrissimir / .isort.cfg
Created January 18, 2024 15:44
Sample Isort config file
[settings]
skip_gitignore = true
profile=black
multi_line_output = 3
# force one member import per line:
force_single_line = true
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
@Hrissimir
Hrissimir / Pipfile
Created January 18, 2024 15:42
Sample Pipenv config file
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
click = ">=8.0.0"
[dev-packages]
packaging= ">=22.0"
@Hrissimir
Hrissimir / .flake8
Created January 18, 2024 15:41
Sample config file for Flake8
[flake8]
count = True
exclude =
*.pyc,
*.egg,
.bzr,
.eggs,
.git,
.github,
.hatch,
@Hrissimir
Hrissimir / setx_python_vars_isolated.bat
Created January 18, 2024 11:42
Set global env vars values configuring python, pip, virtualenv and pipenv
@ECHO OFF
REM ============================================================================
REM Purpose:
REM - Set global env vars values configuring python, pip, virtualenv and pipenv
REM ============================================================================
REM Pros:
REM - Newly created venvs will be "fully isolated" from the system environment
REM - Using this configuration will prevent accidental changes to the system env
REM - When using this config backups are made before upgrading existing packages
REM ============================================================================
# Description:
# This script removes unwanted Apps that come with Windows.
# If you do not want to remove certain Apps, comment out the corresponding lines below.
# This is customized version of Bruce Eckel's remove-default-apps.ps1 script.
# The original script is hosted at: https://github.com/BruceEckel/tools/blob/master/remove-default-apps.ps1
#
# NOTE: Use at your own risk!
#
# Usage:
# * Save the contents of this file as `remove-default-windows-apps.ps1`
@Hrissimir
Hrissimir / setx_python_vars.bat
Last active November 27, 2023 23:27
Script to set global vars with config for the 'virtualenv' and 'pipenv' Python3 packages on Windows 10 machine.
REM ============================================================================
REM USAGE:
REM * Save this file as "setx_python_vars.bat"
REM * Open the file, perform the relevant updates, save the changes and close it
REM * Open CMD as Administrator
REM * CD into the same folder
REM * Type "setx_python_vars.bat" without the quotes and hit ENTER
REM * Wait for the script to complete and hit ENTER again
REM * Close CMD
REM * Open CMD as Administrator