-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #356 from RavirajBaraiya/pip_zingg
zingg pip package artifacts modification
- Loading branch information
Showing
17 changed files
with
1,249 additions
and
47 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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,14 @@ | ||
global-exclude *.py[cod] __pycache__ .DS_Store *.pyc | ||
recursive-include deps/jars *.jar | ||
graft deps/scripts | ||
recursive-include deps/scripts zingg.sh | ||
recursive-include deps/licenses LICENSE | ||
recursive-include deps/examples * | ||
recursive-include deps/models * | ||
recursive-include deps/phases * | ||
recursive-include deps/config * | ||
recursive-include lib *.zip | ||
include *.py | ||
include LICENSE | ||
include README.md | ||
include requirements.txt |
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,28 @@ | ||
Metadata-Version: 2.1 | ||
Name: zingg | ||
Version: 0.3.4 | ||
Summary: Zingg.ai Entity Resolution | ||
Home-page: www.zingg.ai | ||
Author: Zingg.AI | ||
Author-email: [email protected] | ||
License: UNKNOWN | ||
Description: ## About Zingg | ||
|
||
Zingg is an ML based entity resolution framework. The Python Package is used for building training data, training Zingg models and running the matching and linking processes. | ||
[Zingg.AI](https://www.zingg.ai) | ||
|
||
# requirement | ||
python 3.6+; spark 3.1.2 | ||
|
||
# Installation | ||
|
||
``` | ||
pip install zingg | ||
``` | ||
|
||
|
||
Platform: UNKNOWN | ||
Classifier: Programming Language :: Python :: 3 | ||
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 | ||
Classifier: Operating System :: OS Independent | ||
Description-Content-Type: text/markdown |
File renamed without changes.
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,73 @@ | ||
import os | ||
import re | ||
import tarfile | ||
import traceback | ||
import urllib.request | ||
from shutil import rmtree | ||
|
||
def checked_package_name(zingg_version): | ||
""" | ||
Check the generated package name. | ||
""" | ||
return "%s" % (zingg_version) | ||
|
||
def checked_versions(zingg_version): | ||
""" | ||
Check the valid combinations of supported versions in zingg distributions. | ||
Parameters | ||
---------- | ||
zingg_version : str | ||
zingg version. It should be X.X.X such as '3.0.0' or zingg-3.0.0. | ||
""" | ||
if re.match("^[0-9]+\\.[0-9]+\\.[0-9]+$", zingg_version): | ||
zingg_version = "zingg-%s" % zingg_version | ||
if not zingg_version.startswith("zingg-"): | ||
raise RuntimeError( | ||
"zingg version should start with 'zingg-' prefix; however, " "got %s" % zingg_version | ||
) | ||
|
||
return zingg_version | ||
|
||
def install_zingg(dest, zingg_version): | ||
""" | ||
Installs zingg that corresponds to the given Hadoop version in the current | ||
library directory. | ||
Parameters | ||
---------- | ||
dest : str | ||
The location to download and install the zingg. | ||
zingg_version : str | ||
zingg version. It should be zingg-X.X.X form. | ||
""" | ||
|
||
package_name = checked_package_name(zingg_version) | ||
package_local_path = os.path.join(dest, "%s.tgz" % package_name) | ||
|
||
os.makedirs(dest, exist_ok=True) | ||
|
||
tar = None | ||
|
||
try: | ||
|
||
print("Installing to %s" % dest) | ||
tar = tarfile.open(package_local_path, "r:gz") | ||
for member in tar.getmembers(): | ||
if member.name == package_name: | ||
# Skip the root directory. | ||
continue | ||
member.name = os.path.relpath(member.name, package_name + os.path.sep) | ||
tar.extract(member, dest) | ||
return | ||
except Exception: | ||
print("Failed to open TAR") | ||
traceback.print_exc() | ||
rmtree(dest, ignore_errors=True) | ||
finally: | ||
if tar is not None: | ||
tar.close() | ||
if os.path.exists(package_local_path): | ||
os.remove(package_local_path) | ||
|
||
raise IOError("Unable to run INSTALL") |
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,5 +1,5 @@ | ||
|
||
from python.api.zingg.zingg import * | ||
from zingg import * | ||
import sys | ||
import argparse | ||
import os | ||
|
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,5 @@ | ||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[metadata] | ||
description-file = README.md |
Oops, something went wrong.