Skip to content

Instantly share code, notes, and snippets.

View constrict0r's full-sized avatar
👘
The plan is programmed in all of my thousand robots

Victor Mattei constrict0r

👘
The plan is programmed in all of my thousand robots
  • @cslucr @lamportcomputing
  • Costa Rica
View GitHub Profile
@constrict0r
constrict0r / Sphinx generate doc
Last active November 3, 2018 07:07
Sphinx generate documentation.
sudo apt install python3-sphinx
cd docs
sphinx-quickstart # Choose yes on create a Makefile.
sphinx-apidoc -f -o source/ ../module_name
make html
@constrict0r
constrict0r / conf.py
Last active November 12, 2018 16:10
Sphinx conf.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# amanita documentation build configuration file, created by
# sphinx-quickstart on Fri Nov 2 22:28:21 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
@constrict0r
constrict0r / coverage report python
Last active November 12, 2018 16:11
coverage generate report - python.
coverage run --omit */site-packages/* -m amanita muscaria -v -e venv
coverage report -m
coverage hmtl
@constrict0r
constrict0r / .travis.yml
Last active November 6, 2018 13:48
Travis CI configuration.
language: python
python:
- "3.5"
install:
- python setup.py install
script:
- pytest
@constrict0r
constrict0r / plantuml activity
Created November 3, 2018 16:38
Plantuml activity diagram
@startuml
start
:Get arguments;
:Check OS;
if (linux?) then (yes)
:verify direnv installation;
else (no)
endif
stop
@enduml
@constrict0r
constrict0r / TestPyPi upload
Created November 3, 2018 16:58
TestPyPi twine upload
python setup.py sdist bdist_wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
@constrict0r
constrict0r / .pypirc
Created November 3, 2018 17:16
TestPyPi $HOME configuration.
[distutils]
index-servers=
pypi
testpypi
[testpypi]
repository: https://test.pypi.org/legacy/
username: testpy-username
@constrict0r
constrict0r / tox.ini
Last active June 26, 2019 22:20
Tox automated testing config
[tox]
skipsdist = True
envlist = py{35}
[testenv]
deps =
pytest
commands =
python3 -m pytest tests
@constrict0r
constrict0r / pyproject.toml
Created November 6, 2018 21:15
pyproject.tom
[tool.poetry]
name = "amanita"
version = "0.1.0"
description = "Create customizable python projects"
authors = ["constrict0r <[email protected]>"]
license="MIT"
readme = "README.rst"
homepage="https://github.com/constrict0r/amanita"
@constrict0r
constrict0r / git: sync fork to original
Last active November 25, 2018 19:42
Git: sync fork to original
# 1. Clone your fork.
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
# 2. Add remote from original repository in your forked repository:
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
# 3. Updating your fork from original repo to keep up with their changes:
git pull upstream [branch-name]