Skip to content

Commit 928840e

Browse files
committed
initial commit
+ PyPi and TravisCI configs + unittest tests, notebook and doc starters
1 parent fbb62b0 commit 928840e

15 files changed

+189
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.ipynb linguist-detectable=false

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.vscode
2+
13
# Byte-compiled / optimized / DLL files
24
__pycache__/
35
*.py[cod]

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: python
2+
python:
3+
# - "3.5"
4+
- "3.6" # current default Python on Travis CI
5+
- "3.7"
6+
- "3.8"
7+
- "3.8-dev" # 3.8 development branch
8+
# command to install dependencies
9+
install:
10+
- pip install -r requirements.tests.txt -r requirements.txt
11+
- pip install coveralls
12+
# command to run tests and generate coverage report
13+
script:
14+
- coverage run tests/units.py
15+
# send coverage report to coveralls.io service
16+
after_success:
17+
- coveralls
18+
branches:
19+
only:
20+
- master
21+
- /^release\/.*$/
22+
- /^hotfix\/.*$/

NEXT.ipynb

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {
5+
"language_info": {
6+
"name": "python",
7+
"codemirror_mode": {
8+
"name": "ipython",
9+
"version": 3
10+
},
11+
"version": "3.6.8-final"
12+
},
13+
"orig_nbformat": 2,
14+
"file_extension": ".py",
15+
"mimetype": "text/x-python",
16+
"name": "python",
17+
"npconvert_exporter": "python",
18+
"pygments_lexer": "ipython3",
19+
"version": 3,
20+
"kernelspec": {
21+
"name": "python36832bitvenvvenvb93cf92d5fe6482d9f0b0a9d194e1425",
22+
"display_name": "Python 3.6.8 32-bit ('.venv': venv)"
23+
}
24+
},
25+
"cells": [
26+
{
27+
"cell_type": "code",
28+
"execution_count": 1,
29+
"metadata": {},
30+
"outputs": [],
31+
"source": [
32+
"%load_ext autoreload\n",
33+
"\n",
34+
"%autoreload 2"
35+
]
36+
},
37+
{
38+
"cell_type": "code",
39+
"execution_count": 2,
40+
"metadata": {},
41+
"outputs": [],
42+
"source": [
43+
"import logging\n",
44+
"logging.basicConfig(level=logging.INFO)"
45+
]
46+
},
47+
{
48+
"cell_type": "code",
49+
"execution_count": null,
50+
"metadata": {},
51+
"outputs": [],
52+
"source": [
53+
"import pything as pyt\n"
54+
]
55+
},
56+
{
57+
"cell_type": "code",
58+
"execution_count": null,
59+
"metadata": {},
60+
"outputs": [],
61+
"source": [
62+
"pyt.do_stuff()\n",
63+
"pyt.do_crazier_stuff()\n"
64+
]
65+
}
66+
]
67+
}

NEXT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Whats next
2+
3+
> ### Disclaimer
4+
> The contents of this file is a fairly coherent stream of conscience brainstorm about different direction to take the design of this library, and intended to be documentation with accurate code examples that reflect how you would actually use the library. For that refer to `README.md`

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
1-
# pything
1+
# 🐍 pything
2+
[![PyPI version](https://badge.fury.io/py/pything.svg)](https://badge.fury.io/py/pything)
3+
[![Build Status](https://travis-ci.com/json2d/pything.svg?branch=master)](https://travis-ci.com/json2d/pything) [![Coverage Status](https://coveralls.io/repos/github/json2d/pything/badge.svg?branch=master)](https://coveralls.io/github/json2d/pything?branch=master)
4+
25
a Python library starter template
6+
7+
## Quick install
8+
```bash
9+
pip install pything
10+
```
11+
12+
## Basic usage
13+
14+
[decent pitch]. Let's dive in.
15+
16+
Out-of-the-box you get some stuff you can do with a pything:
17+
18+
```py
19+
import pything as pyt
20+
21+
pyt.do_stuff()
22+
23+
```
24+
25+
## More advanced usage
26+
27+
Then here's this stuff you can do with a pything:
28+
29+
```py
30+
import pything as pyt
31+
32+
pyt.do_crazier_stuff()
33+
34+
```

deploy.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
python setup.py sdist
3+
twine upload dist/*

pything/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .core import *

pything/core.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import logging
2+
log = logging.getLogger("[🐍pything]")
3+
log.addHandler(logging.NullHandler()) # ignore log messages by defualt
4+
5+
def do_stuff():
6+
print('...')
7+
return 42
8+
9+
def do_crazier_stuff():
10+
print('...', 'hello world!')
11+
return 42

requirements.jupyter.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
notebook

0 commit comments

Comments
 (0)