diff --git a/.gitignore b/.gitignore index 96b5958..36af156 100644 --- a/.gitignore +++ b/.gitignore @@ -106,7 +106,7 @@ ipython_config.py # However, in case of collaboration, if having platform-specific dependencies or dependencies # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. -#Pipfile.lock +Pipfile.lock # PEP 582; used by e.g. github.com/David-OConnor/pyflow __pypackages__/ @@ -146,3 +146,9 @@ dmypy.json .pyre/ report-* + +# poetry lock file +poetry.lock + +*.zip +.DS_Store diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..d85b2d7 --- /dev/null +++ b/Pipfile @@ -0,0 +1,71 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +aiohttp = ">=3.8" +chocolate = ">=0.0.2" +csvwlib = ">=0.3.2" +cryptography = ">=35.0" +decorator = ">=5.1" +fsspec = {version = ">=2022.2", extras = ["gs", "s3"]} +gcsfs = ">=2022.2" +icecream = ">=2.1" +morph-kgc = ">=2.0.0" +networkx = ">=2.7" +numpy = ">=1.23.0" +owlrl = ">=6.0.2" +oxrdflib = ">=0.3.1" +pandas = ">=1.4" +pslpython = ">=2.2.2" +pyarrow = ">=7.0" +pynvml = ">=11.4" +pyshacl = ">=0.18" +python-dateutil = ">=2.8" +pyvis = ">=0.1.9" +rdflib = ">=6.1" +requests = ">=2.27" +scikit-learn = "==1.1.2" +scipy = ">=1.8.0" +statsmodels = ">=0.13" +tqdm = ">=4.63" +urlpath = ">=1.2" + +[dev-packages] +black = "*" +bandit = ">=1.7" +codespell = ">=2.1" +coverage = ">=6.3" +flask = ">=2.0" +grayskull = ">=1.1" +jupyterlab = ">=3.3" +mistune = ">=0.8" +mkdocs-git-revision-date-plugin = ">=0.3" +mkdocs-material = ">=8.2" +mknotebooks = ">=0.7" +mypy = ">=0.940" +nbconvert = ">=6.4" +nbmake = ">=1.3" +notebook = ">=6.4" +pipdeptree = ">=2.2" +pre-commit = ">=2.17" +pygments = ">=2.11" +pylint = ">=2.12" +pymdown-extensions = ">=9.2" +pytest = ">=7.1" +responses = ">=0.19" +scikit-learn = ">=1.0" +selenium = ">=4.1" +twine = ">=3.8" +types-python-dateutil = ">=2.8" +types-requests = ">=2.27" +xmltodict = ">=0.12" + +[requires] +# python_version = "3.11" +# python_version = "3.10" +# python_version = "3.9" +# python_version = "3.8" +# python_version = "3.7" +# python_version = "3" diff --git a/README.md b/README.md index 4876aa8..1f9f9e0 100644 --- a/README.md +++ b/README.md @@ -38,18 +38,55 @@ Morph-KGC, pythonPSL, and many more. See the ["Getting Started"](https://derwen.ai/docs/kgl/start/) section of the online documentation. -We recommend installing from [PyPi](https://pypi.python.org/pypi/kglab): +## Useing kglab as a package for your project + +### We recommend installing from [PyPi](https://pypi.python.org/pypi/kglab): + +#### pip ```bash python3 -m pip install kglab ``` +#### pipenv +Kglab supports python 3.7 and above. +You will need to specify the python version in your Pipfile or whne creating the pipenv +If you have specified the python version in your Pipfile, you can install kglab with: +```bash +pipenv install kglab +``` + +If you have not specified the python version in your Pipfile, you can install kglab with: +```bash +pipenv install --python 3.7 kglab +``` + +#### poetry +You can install into you existing poetry project with: +```bash +potery add kglab +``` + +#### conda +```bash +conda env create -n kglab +conda activate kglab +pip install kglab +``` + +### Or, install from source: If you work directly from this Git repo, be sure to install the dependencies: +#### pip ```bash python3 -m pip install -U pip wheel python3 -m pip install -r requirements.txt ``` +#### pipenv +```bash +pipenv install --dev +# NEED TO HAVE a Pipfile +``` Alternatively, to install dependencies using `conda`: ```bash conda env create -f environment.yml --force diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f3528d0 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,110 @@ +[build-system] +requires = ["flit_core >=3.2,<4"] +build-backend = "flit_core.buildapi" + +[project] +name = "kglab" +authors = [ + {name = "Paco Nathan", email = "info@derwen.ai"} +] +description = "A simple abstraction layer in Python for building knowledge graphs" +readme = "README.md" +license = {file = "LICENSE"} +requires-python = ">=3.7" +dependencies = [ + "aiohttp >= 3.8", + "chocolate >= 0.0.2", + "csvwlib >= 0.3.2", + "cryptography >= 35.0", + "decorator >= 5.1", + "fsspec[gs,s3] >= 2022.2", + "gcsfs >= 2022.2", + "icecream >= 2.1", + "morph-kgc >= 2.0.0", + "networkx >= 2.7", + "numpy >= 1.23.0", + "owlrl >= 6.0.2", + "oxrdflib >= 0.3.1", + "pandas >= 1.4", + "pslpython >= 2.2.2", + "pyarrow >= 7.0", + "pynvml >= 11.4", + "pyshacl >= 0.18", + "python-dateutil >= 2.8", + "pyvis >= 0.1.9", + "rdflib >= 6.1", + "requests >= 2.27", + "scikit-learn == 1.1.3", + "scipy >= 1.8.0", + "statsmodels >= 0.13", + "tqdm >= 4.63", + "urlpath >= 1.2", +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "Intended Audience :: Information Technology", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Scientific/Engineering :: Human Machine Interfaces", + "Topic :: Scientific/Engineering :: Information Analysis", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Text Processing :: Indexing", +] +keywords = [ + "controlled vocabulary", + "cugraph", + "deep learning", + "embedding", + "gpu", + "graph algorithms", + "igraph", + "inference", + "interactive visualization", + "json-ld", + "knowledge graph", + "managing namespaces", + "morph-kgc", + "n3", + "networkx", + "owl", + "pandas", + "parquet", + "probabilistic soft logic", + "psl", + "pyvis", + "rapids", + "rdf", + "rml", + "roam research", + "serialization", + "shacl", + "skos", + "sparql", + "statistical relational learning", + "topology", + "turtle", + "validation", +] +dynamic = ["version"] + +[project.urls] +Home = "https://derwen.ai/docs/kgl/" +DOI = "https://doi.org/10.5281/zenodo.6360664" +Discussions = "https://www.linkedin.com/groups/6725785/" +DockerHub = "https://hub.docker.com/r/derwenai/kglab" +Tutorial = "https://derwen.ai/docs/kgl/tutorial/" +Issues = "https://github.com/DerwenAI/kglab/issues" +Source = "https://github.com/DerwenAI/kglab" + +[project.entry-points."rdf.plugins.store"] +kglab = "kglab:PropertyStore"