Skip to content

Instantly share code, notes, and snippets.

View ssbarnea's full-sized avatar
🏐
Sticking packages under the pypi tree.....

Sorin Sbarnea ssbarnea

🏐
Sticking packages under the pypi tree.....
View GitHub Profile
$ ansible-test coverage report --omit='.tox/**/*' --omit='tests/*' --color --all --show-missing -v
Configured locale: en_US.UTF-8
Creating container database.
Generated combined output: /Users/ssbarnea/c/a/ansible_collections/ansible/eda/tests/output/coverage/coverage
Initializing "/tmp/ansible-test-k1bkiczg-injector" as the temporary injector directory.
Injecting "/tmp/python-66pr29p8-ansible/python" as a execv wrapper for the "/Users/ssbarnea/c/a/ansible_collections/ansible/eda/.tox/sanity/bin/python" interpreter.
Run command: python -m coverage.__main__ report --rcfile /Users/ssbarnea/c/a/ansible_collections/ansible/eda/.tox/sanity/lib/python3.12/site-packages/ansi ...
Name Stmts Miss Branch BrPart Cover Missing
-----------------------------------------------------------------------------------------------------------------------------------------------------------
.tox/sanity/lib/python3.12/site
ssbarnea@m1: ~/c/a/ansible-dev-environment fix/de
$ tox -e docs
.pkg: _optional_hooks> python /Users/ssbarnea/.asdf/installs/python/3.12.1/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_editable> python /Users/ssbarnea/.asdf/installs/python/3.12.1/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_editable> python /Users/ssbarnea/.asdf/installs/python/3.12.1/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
docs: install_package> python -I -m pip install --force-reinstall --no-deps .tox/.tmp/package/35/ansible_dev_environment-1.dev11-0.editable-py3-none-any.whl
docs: commands_pre[0]> sh -c 'rm -f .coverage* coverage.xml 2>/dev/null || true'
docs: commands[0]> mkdocs build
docs: exit 2 (0.00 seconds) /Users/ssbarnea/c/a/ansible-dev-environment> mkdocs build
.pkg: _exit> python /Users/ssbarnea/.asdf/installs/python/3.12.1/lib/python3.12/site-packages/pyproject_api/_backend.p
$ mk pending
Found molecule draft release v7.0.0 created 36 days ago:
## Major Changes
- Set Python 3.10 as minimum version (#4099) @cristianonicolai
## Bugfixes
@ssbarnea
ssbarnea / .profile
Created May 26, 2011 19:21
Bash script for setting up OS X for power users
alias dos2unix-recursive='find . -iname '*.tpl' | xargs dos2unix'
alias edit='mcedit'
alias del='rm'
alias deltree='rm -r'
alias dir='/bin/ls $LS_OPTIONS --format=vertical'
alias attrib='chmod'
alias chdir='cd'
alias copy='cp'
alias ls='ls -a'
@ssbarnea
ssbarnea / pip-doctor.py
Created October 10, 2023 09:40
Script to report broken packages and uninstall and reinstall them.
#!/usr/bin/env python
from os.path import isfile
import subprocess
from email.parser import Parser
from pip._internal.metadata import get_default_environment
from pip._internal.utils.compatibility_tags import get_supported
from pip._vendor.packaging.tags import parse_tag
supported = get_supported()
packages = get_default_environment().iter_installed_distributions()
@ssbarnea
ssbarnea / test_ansi.py
Created October 26, 2011 16:18
ANSI support detection code for Python.
#!/usr/bin/env python
import sys, os, time, platform
sample_ansi = '\x1b[31mRED' + '\x1b[33mYELLOW' + '\x1b[32mGREEN' + '\x1b[35mPINK' + '\x1b[0m' + '\n'
for handle in [sys.stdout, sys.stderr]:
if (hasattr(handle, "isatty") and handle.isatty()) or \
('TERM' in os.environ and os.environ['TERM']=='ANSI'):
if platform.system()=='Windows' and not ('TERM' in os.environ and os.environ['TERM']=='ANSI'):
@ssbarnea
ssbarnea / keytool-trust
Created October 4, 2012 13:14
Bash script that installs SSL certificates from different services to JVMs.
#!/bin/bash
REMHOST=$1
REMPORT=${2:-443}
CACERTS=$3
KEYSTORE_PASS=changeit
KEYTOOL=keytool
# /etc/java-6-sun/security/cacerts
#!/usr/bin/env python
import ctypes
import getpass
import os
import sys
import subprocess
import pytest
import platform
import shutil
import warnings
---
- name: cleanup
hosts: localhost
gather_facts: false
tasks:
- name: Cleanup
debug:
msg: "Doing cleanup"
- name: Foo
Resolved settings for: "/Users/ssbarnea/c/a/ansible-lint/.projects/ansible-compat/src/ansible_compat/__init__.py"
Settings path: "/Users/ssbarnea/c/a/ansible-lint/.projects/ansible-compat/pyproject.toml"
Settings {
rules: RuleTable {
enabled: {
MixedSpacesAndTabs,
MultipleImportsOnOneLine,
ModuleImportNotAtTopOfFile,
MultipleStatementsOnOneLineColon,
MultipleStatementsOnOneLineSemicolon,