-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
117 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
= Verace Changelog | ||
|
||
== verace-0.2.0 (2015-10-18) | ||
=== Release highlights | ||
- Significant change to library design, now using functions instead of class methods to check version strings. | ||
|
||
=== All additions and changes | ||
Not applicable. | ||
|
||
=== Bug fixes | ||
Not applicable. | ||
|
||
== verace-0.1.0 (2015-07-18) | ||
=== Release highlights | ||
- First release. | ||
|
||
=== All additions and changes | ||
Not applicable. | ||
|
||
=== Bug fixes | ||
Not applicable. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
= Verace | ||
|
||
== Introduction | ||
This project provides a Python 2.x library for creating scripts that check version strings. The main features are the following: | ||
|
||
- Custom parse any project files for version strings. | ||
- Easily determine if all version strings in a project are consistent. | ||
- Should work on any platform without additional dependencies. | ||
|
||
== Status | ||
Currently, this project is **under active development**. The contents of the repository should be considered unstable during active development. | ||
|
||
== Requirements | ||
Verace should run on any Python 2.x interpreter without additional dependencies. | ||
|
||
== Installation | ||
Verace can be installed with pip using the following command: `pip install verace` | ||
|
||
Additional, Verace can be installed from source by running: `python setup.py install` | ||
|
||
== Usage | ||
The following are basic examples of Verace (all examples can be found https://github.com/jeffrimko/Verace/tree/master/examples[here]): | ||
|
||
- https://github.com/jeffrimko/Verace/blob/master/examples/check_1.py[`examples/check_1.py`] - Basic version checking. | ||
- https://github.com/jeffrimko/Verace/blob/master/examples/check_2.py[`examples/check_2.py`] - Basic version checking. | ||
|
||
== FAQ | ||
How is **Verace** pronounced? | ||
|
||
- "ver-AH-che" - Italian word for "truthful/accurate". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import sys | ||
sys.path.insert(0, "..\lib") | ||
import env | ||
from verace import VerChecker, VerInfo | ||
|
||
v1 = VerChecker("Example 1", __file__) | ||
v1.include("file.txt", opts={'match':"version", 'delim':"="}) | ||
v1.include("file.txt", opts={'match':"another", 'delim':"="}) | ||
v1.include("file.txt", opts={'match':"onemore", 'delim':":"}) | ||
v1 = VerChecker("Example 1a", __file__) | ||
v1.include("file_1.txt") | ||
v1.include("file_1.txt", match="another") | ||
v1.include("file_1.txt", match="onemore", delim=":") | ||
v1.run() | ||
|
||
v2 = VerChecker("Example 2", __file__) | ||
v2.include("file.txt", opts={'match':"version", 'delim':"="}) | ||
v2.include("file.txt", opts={'match':"another", 'delim':"="}) | ||
v2.include("file.txt", opts={'match':"diffver", 'delim':"= v"}) | ||
v2 = VerChecker("Example 1b", __file__) | ||
v2.include("file_1.txt") | ||
v2.include("file_1.txt", match="another") | ||
v2.include("file_1.txt", match="diffver", delim="= v") | ||
v2.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import env | ||
from verace import VerChecker, VerInfo | ||
|
||
def check_ver(path): | ||
for num,line in enumerate(open(path).readlines()): | ||
if line.find("version") > -1: | ||
ver = line.split("=")[1] | ||
ver = ver.split('"')[1].split('"')[0] | ||
return [VerInfo(path, num+1, ver)] | ||
|
||
v1 = VerChecker("Example 2", __file__) | ||
v1.include("file_1.txt", match="onemore", delim=":") | ||
v1.include("file_2.txt", check_ver) | ||
v1.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import sys | ||
sys.path.insert(0, "..\lib") |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Another example file! | ||
"version" = "0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
import os | ||
import subprocess | ||
from setuptools import setup, find_packages | ||
|
||
subprocess.call("asciidoc -b docbook ../README.adoc", shell=True) | ||
subprocess.call("pandoc -r docbook -w rst -o ../README.rst ../README.xml", shell=True) | ||
os.remove("../README.xml") | ||
|
||
setup( | ||
name = "verace", | ||
version = "0.2.0-alpha", | ||
version = "0.2.0", | ||
author = "Jeff Rimko", | ||
author_email = "[email protected]", | ||
description = "Library for creating version string checking scripts.", | ||
description = "Library for checking version strings in project files.", | ||
license = "MIT", | ||
url = "https://github.com/jeffrimko/Verace", | ||
py_modules=["verace"], | ||
long_description=__doc__, | ||
long_description=open("../README.rst").read(), | ||
classifiers=[ | ||
"Development Status :: 3 - Alpha", | ||
"Topic :: Utilities", | ||
"Programming Language :: Python :: 2.7", | ||
], | ||
) | ||
|
||
os.remove("../README.rst") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters