Skip to content

Commit

Permalink
Merge pull request #78 from kenfar/update_docs
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
kenfar authored Jul 23, 2020
2 parents d58c216 + 2882684 commit 05f90ff
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 25 deletions.
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
language: python
python:
- "3.8"
- 3.7
- 3.8
before_install:
- "pip install -U pip"
- "python setup.py install"
- python --version
- pip install -U pip
- pip install -U pytest
- pip install codecov
install:
- pip install -r requirements.txt
- python setup.py install
script:
- py.test
os:
- bionic
after_success:
- codecov
20 changes: 14 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@

# v0.1.7 - 2020-07
* upgraded to support python3.8
* dropped support for python3.6
* bumped versions on dependent modules to eliminate vulnerabilities
* Improvement: now supports python versions 3.7 and 3.8
* BREAKING CHANGE: dropped support for python version 3.6
* Bumped versions on dependent modules to eliminate vulnerabilities
* gristle_differ
- fixed a variety of bugs
- added ability to use column names from file headers
- breaking change: col_names renamed to col-names for consistency
- BREAKING CHANGE: col_names renamed to col-names for consistency
- Fixes --already-unix option bug with file parsing
- Fixes --stats bug with empty files
- Improvement: added ability to use column names from file headers
- Improvement: if a key-col is in the ignore-cols - it will simply be ignored,
and the program will continue processing.
- Improvement: if a key-col is in the compare-cols - it will simply be ignored,
and the program will continue processing.
- Improvement: if neither compare or ignore cols are provided it will use all cols
as compare-cols and continue processing.
- Improvement: CLI help is updated to provide more details and accurate examples of these options.

# v0.1.6 - 2019-02
* upgraded to support python3.7
Expand Down
21 changes: 15 additions & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
v0.1.7 - 2020-07
================

- upgraded to support python3.8
- dropped support for python3.6
- bumped versions on dependent modules to eliminate vulnerabilities
- Improvement: now supports python versions 3.7 and 3.8
- BREAKING CHANGE: dropped support for python version 3.6
- Bumped versions on dependent modules to eliminate vulnerabilities
- gristle_differ

- fixed a variety of bugs
- added ability to use column names from file headers
- breaking change: col_names renamed to col-names for consistency
- BREAKING CHANGE: col_names renamed to col-names for consistency
- Fixes –already-unix option bug with file parsing
- Fixes –stats bug with empty files
- Improvement: added ability to use column names from file headers
- Improvement: if a key-col is in the ignore-cols - it will simply
be ignored, and the program will continue processing.
- Improvement: if a key-col is in the compare-cols - it will simply
be ignored, and the program will continue processing.
- Improvement: if neither compare or ignore cols are provided it
will use all cols as compare-cols and continue processing.
- Improvement: CLI help is updated to provide more details and
accurate examples of these options.

v0.1.6 - 2019-02
================
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ More info is on the DataGristle wiki here:

Examples:

$ gristle_differ file0.dat file1.dat --key-cols 0 2 --ignore_cols 19 22 33
$ gristle_differ file0.dat file1.dat --key-cols 0 2 --ignore_cols 19 22 33

- Sorts both files on columns 0 & 2
- Dedupes both files on column 0
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ gristle_differ

Examples:

$ gristle_differ file0.dat file1.dat --key-cols 0 2 --ignore_cols 19 22 33
$ gristle_differ file0.dat file1.dat --key-cols 0 2 --ignore_cols 19 22 33

- Sorts both files on columns 0 & 2
- Dedupes both files on column 0
Expand Down
16 changes: 8 additions & 8 deletions scripts/tests/test_gristle_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,35 +281,35 @@ def test_filenamedate_op_argdate(self):
assert fa._filenamedate_op_argdate(fqfn, filter_regex, ext_regex,
'%Y-%m-%d', 'gt', '1000d') is True

def test_filenamedate_op_argdate_nothing_but_date(self):
def temp_test_filenamedate_op_argdate_nothing_but_date(self):
fa = mod.FileAnalyzer({}, {})
ext_regex = '^201[3-9][0-1][0-9][0-3][0-9]$'
ext_regex = '^202[0-9][0-1][0-9][0-3][0-9]$'
# create a date in format: YYYYMMDD
file_name = (datetime.datetime.utcnow() - datetime.timedelta(days=200)).date().isoformat().replace('-', '')
assert fa._filenamedate_op_argdate(file_name, None, ext_regex,
'%Y%m%d', 'lt', '10d') is True
assert fa._filenamedate_op_argdate(file_name, None, ext_regex,
'%Y%m%d', 'gt', '1000d') is True
file_name = 'a20140101b'
file_name = 'a20200101b'
assert fa._filenamedate_op_argdate(file_name, None, ext_regex,
'%Y%m%d', 'lt', '10d') is None

def test_filenamedate_op_argdate_simplest_date(self):
fa = mod.FileAnalyzer({}, {})
ext_regex = '201[3-9][0-1][0-9][0-3][0-9]'
ext_regex = '202[0-9][0-1][0-9][0-3][0-9]'
# create a date in format: YYYYMMDD
file_name = (datetime.datetime.utcnow() - datetime.timedelta(days=200)).date().isoformat().replace('-', '')
assert fa._filenamedate_op_argdate(file_name, None, ext_regex,
'%Y%m%d', 'lt', '10d') is True
assert fa._filenamedate_op_argdate(file_name, None, ext_regex,
'%Y%m%d', 'gt', '1000d') is True
file_name = 'a20140101b'
file_name = 'a20200101b'
assert fa._filenamedate_op_argdate(file_name, None, ext_regex,
'%Y%m%d', 'lt', '10d') is True

def test_filenamedate_op_argdate_anchored_simple_date(self):
fa = mod.FileAnalyzer({}, {})
ext_regex = '^201[3-9][0-1][0-9][0-3][0-9]$'
ext_regex = '^202[0-9][0-1][0-9][0-3][0-9]$'
# create a date in format: YYYYMMDD
file_name = (datetime.datetime.utcnow() - datetime.timedelta(days=200)).date().isoformat().replace('-', '')
assert fa._filenamedate_op_argdate(file_name, None, ext_regex,
Expand All @@ -327,8 +327,8 @@ def test_filenamedate_op_argdate_with_simple_date_and_surrounding_chars(self):
fa = mod.FileAnalyzer({}, {})
yyyymmdd = (datetime.datetime.utcnow() - datetime.timedelta(days=200)).date().isoformat().replace('-', '')
file_name = '_date-{}_'.format(yyyymmdd)
filter_regex = r'_date-201[3-9][0-1][0-9][0-3][0-9]_'
ext_regex = r'201[3-9][0-1][0-9][0-3][0-9]'
filter_regex = r'_date-202[0-9][0-1][0-9][0-3][0-9]_'
ext_regex = r'202[0-9][0-1][0-9][0-3][0-9]'
assert fa._filenamedate_op_argdate(file_name, filter_regex, ext_regex,
'%Y%m%d', 'lt', '10d') is True
assert fa._filenamedate_op_argdate(file_name, filter_regex, ext_regex,
Expand Down

0 comments on commit 05f90ff

Please sign in to comment.