semvec/pypi-packages huggingface dataset:
stale-data-detection 0.5
Python package to extract table names from github url and check whether the tables are stale
License: MIT
Requires Python: >=3.6

# stale_data_detection
Extract table names from GitHub Repositories and check whether the tables are stale.

## Requirements
- boa package to read the table into DataFrame. Install at: https://github.aetna.com/analytics-org/boa
- sql-metadata package to extract table names from query.
```bash 
pip install sql-metadata
```

## Folder Structures:
```
stale_data_detection
├── test
│   ├── __init__.py
│   └── demo.ipynb
│   └── test_flag_stale_table.py
│   └── test_extract_tables.py
├── stale_data_detection
│   ├── __init__.py
│   ├── extract_table_names.py
│   ├── flag_stale_table.py
│   └── get_table_update_status.py
└── README.md
```

### extract_table_names.py

Get raw download urls of all files given a GitHub repo or subdirectory and files extension (default .hql file).
Read file content and extract names of all tables mentioned in the .hql files.

### flag_stale_table.py

Read table content into Pandas DataFrame and check whether a table is stale 
given the table name.

### get_table_update_status.py

Identify all columns that likely contain update dates and return the last update date
given a table Pandas DataFrame

### test_extract_tables.py

Test module in extract_table_names.py. \
Usage:
```bash
python test_extract_tables.py -u github/repo/url -b branch_name -a access_token -e file_extension
```
GitHub repo URL and branch name are required. Other arguments are optional.

### test_flag_stale_table.py

Test module in flag_stale_table.py. \
Usage: 
```bash
python test_extract_tables.py -u github/repo/url -b branch_name -a access_token -e file_extension -o path/to/output/file
```

GitHub repo URL and branch name are required. Other arguments are optional.

### demo.ipynb

Demo functions in Jupyter notebook.
bb-dateparser 0.2.1
Try to parse date into a format for datetime
License: MIT
Requires Python: >=3.10,<4.0
Keywords: utility,parser,datetime

# BB-DateParser

Attempts to convert any written date into a datetime object. To make it more useful for my needs (and easier to write :P), it only works for years 1000 - 2099.

## Usage

```python

from dateparser import DateParser

parser = DateParser()
my_date = "October 1st, 1985 4:35pm"

dp = parser.parse_date( my_date )

# To view format string

print( dp.formatting )
'%B %dst, %Y %I:%M%p'

# The DateParser class holds the data object from the last result. This is
# cleared and recreated each time self.parse_date() is used. Below are the
# data created and returned in a ParsedDate object from each date parsed

# separated list of the date string
dp.alldata = ['October', ' ', '01', 'st,', ' ', '1985', ' ', '04', ':', '35', 'PM']

# list of actual date data in dictionary form { 'alldata index': str(data) }
dp.data = { 0: 'October', 2: '1', 5: '1985', 7: '4', 9: '35', 10: 'pm' }

# created datetime object from date string
dp.dateObject = datetime.datetime(1985, 1, 1, 16, 35)

# format code for datetime
dp.formatting = '%B %mst, %Y %I:%M%p'

# boolean - True only if successful in parsing the date
dp.isValid = True

# list of non date data pulled from date string
dp.separators = [' ', 'st,', ' ', ' ', ':']

# list of all possible results (is returned when 'list_all' = True)
dp.format_list = ['%B %dst, %Y %I:%M%p']

# DateParser is a subclass of DateData which is a subclass of the builtin
# dict class. Therefore, all the parsing variables are also available through
# the DateParser class.

```

### Changelog

- 0.1.0
    - Initial release

- 0.2.0
    - DateParser.parse_date() now returns a DateParser object
    - Changed logging to an external module
    - Added timestamp support
    - Updated README

- 0.2.1
    - Now returns a separate parser object instead of self