Buncha fix ups
renamed: .hgignore -> .gitignore new file: .gitlab-ci.yml new file: Makefile modified: README.rst new file: ago/__init__.py renamed: ago.py -> ago/ago.py new file: ago/tests/__init__.py renamed: test_ago.py -> ago/tests/test_ago.py new file: requirements-test.txt modified: setup.py
This commit is contained in:
parent
e09188f666
commit
16d2dc15f6
10 changed files with 43 additions and 12 deletions
4
.hgignore → .gitignore
vendored
4
.hgignore → .gitignore
vendored
|
|
@ -1,6 +1,3 @@
|
||||||
# use glob syntax.
|
|
||||||
syntax: glob
|
|
||||||
|
|
||||||
*.pyc
|
*.pyc
|
||||||
*.swp
|
*.swp
|
||||||
*.orig
|
*.orig
|
||||||
|
|
@ -8,3 +5,4 @@ syntax: glob
|
||||||
*.gz
|
*.gz
|
||||||
build/*
|
build/*
|
||||||
.cache/*
|
.cache/*
|
||||||
|
env/*
|
||||||
14
.gitlab-ci.yml
Normal file
14
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
stages:
|
||||||
|
- test
|
||||||
|
#- build
|
||||||
|
#- deploy
|
||||||
|
|
||||||
|
test:
|
||||||
|
stage: test
|
||||||
|
tags: ["build"]
|
||||||
|
script: make test
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- env.vanilla
|
||||||
|
expire_in: 1 hour
|
||||||
|
|
||||||
10
Makefile
Normal file
10
Makefile
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
env:
|
||||||
|
python3 -m venv env
|
||||||
|
. env/bin/activate
|
||||||
|
env/bin/pip install --upgrade pip
|
||||||
|
|
||||||
|
test: env
|
||||||
|
#env/bin/py.test --lf
|
||||||
|
env/bin/pip install --upgrade -r requirements-test.txt
|
||||||
|
env/bin/py.test
|
||||||
|
|
||||||
|
|
@ -122,4 +122,4 @@ License
|
||||||
Public Revision Control
|
Public Revision Control
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
* https://git.unturf.com/python/miniuri
|
* https://git.unturf.com/python/ago
|
||||||
|
|
|
||||||
1
ago/__init__.py
Normal file
1
ago/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
from ago import *
|
||||||
|
|
@ -32,9 +32,9 @@ def delta2dict(delta):
|
||||||
"day": int(delta.days % 365),
|
"day": int(delta.days % 365),
|
||||||
"hour": int(delta.seconds / 3600),
|
"hour": int(delta.seconds / 3600),
|
||||||
"minute": int(delta.seconds / 60) % 60,
|
"minute": int(delta.seconds / 60) % 60,
|
||||||
"second": delta.seconds % 60,
|
"second": int(delta.seconds % 60),
|
||||||
"millisecond": delta.microseconds / 1000,
|
"millisecond": int(delta.microseconds / 1000),
|
||||||
"microsecond": delta.microseconds % 1000,
|
"microsecond": int(delta.microseconds % 1000),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
0
ago/tests/__init__.py
Normal file
0
ago/tests/__init__.py
Normal file
|
|
@ -2,8 +2,8 @@ from __future__ import print_function
|
||||||
|
|
||||||
from datetime import datetime, timedelta, tzinfo
|
from datetime import datetime, timedelta, tzinfo
|
||||||
|
|
||||||
from ago import human
|
from ..ago import human
|
||||||
from ago import delta2dict
|
from ..ago import delta2dict
|
||||||
|
|
||||||
# datetime objects
|
# datetime objects
|
||||||
PRESENT = datetime.now()
|
PRESENT = datetime.now()
|
||||||
5
requirements-test.txt
Normal file
5
requirements-test.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# testing.
|
||||||
|
pytest
|
||||||
|
pytest-cov
|
||||||
|
nose
|
||||||
|
twine
|
||||||
9
setup.py
9
setup.py
|
|
@ -1,6 +1,6 @@
|
||||||
# installation: pip install ago
|
# installation: pip install ago
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="ago",
|
name="ago",
|
||||||
|
|
@ -10,7 +10,8 @@ setup(
|
||||||
long_description=open("README.rst").read(),
|
long_description=open("README.rst").read(),
|
||||||
author="Russell Ballestrini",
|
author="Russell Ballestrini",
|
||||||
author_email="russell.ballestrini@gmail.com",
|
author_email="russell.ballestrini@gmail.com",
|
||||||
url="https://git.unturf.com/python/miniuri"
|
url="https://git.unturf.com/python/ago",
|
||||||
|
packages=find_packages(exclude="tests"),
|
||||||
platforms=["All"],
|
platforms=["All"],
|
||||||
license="Public Domain",
|
license="Public Domain",
|
||||||
py_modules=["ago"],
|
py_modules=["ago"],
|
||||||
|
|
@ -20,4 +21,6 @@ setup(
|
||||||
# setup keyword args: http://peak.telecommunity.com/DevCenter/setuptools
|
# setup keyword args: http://peak.telecommunity.com/DevCenter/setuptools
|
||||||
|
|
||||||
# built and uploaded to pypi with this:
|
# built and uploaded to pypi with this:
|
||||||
# python setup.py sdist bdist_egg register upload
|
#python setup.py sdist bdist_egg
|
||||||
|
#twine upload dist/*
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue