Skip to content

Commit

Permalink
Merge pull request #283 from haydnv/v0.15
Browse files Browse the repository at this point in the history
v0.16-beta
  • Loading branch information
haydnv authored Jan 30, 2024
2 parents 0962248 + 22cd725 commit edbf492
Show file tree
Hide file tree
Showing 156 changed files with 1,106 additions and 639 deletions.
13 changes: 7 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ If you prefer, you can [fork](https://docs.github.com/en/pull-requests/collabora
To run the client unit tests, make sure Python knows where to find your local copy of the TinyChain client:

```bash
# for example, if you cloned into /home/usernames/tinychain
# then the path below should be /home/username/tinychain/client
export PYTHONPATH=$PYTHONPATH:/<path to your clone of the repo>/client
# optional: create a virtual environment
# note: python may be python3 on some systems
python -m venv myenv

# note: pip may be pip3 on some systems
pip install -e client/py
```

Then, try running the client tests to make sure you've got everything configured correctly:
Expand Down Expand Up @@ -64,14 +67,12 @@ python3 -m tests.tctest.client

## Rust Development

If you need to make changes to the TinyChain host software itself, you'll need to run it locally. Follow the steps in the "Manual Install" section of `INSTALL.md` to set up Rust and ArrayFire, then check that you've gotten everything set up correctly by running the host tests:
If you need to make changes to the TinyChain host software itself, you'll need to run it locally. Follow the steps in the [Manual install](https://docs.tinychain.net/fundamentals/install-tinychain) section of the documentation to set up Rust, then check that you've gotten everything set up correctly by running the host tests:

```bash
python3 -m tests.tctest.host
```

If you have any problems, first check that you have all your environment variables set correctly. If `PYTHONPATH`, `AF_PATH`, and `LD_LIBRARY_PATH` are all set correctly and your installation still doesn't behave as expected, [create an issue](https://github.com/haydnv/tinychain/issues) to get help.

## Licensing

By contributing code to the TinyChain project, you represent that you own the copyright on your contributions, or that you have followed the licensing requirements of the copyright holder, and that TinyChain may use your code without any further restrictions than those specified in the Apache 2.0 open-source license. A copy of the license can be found in the `LICENSE` file in the root directory of the project.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion client/docs/conf.py → client/py/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'The TinyChain Contributors'

# The full version, including alpha/beta/rc tags
release = '0.15.0'
release = '0.16.0'


# -- General configuration ---------------------------------------------------
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions client/py/docs/host.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:mod:`host`
==========================

.. automodule:: tinychain.host
:members:
:show-inheritance:
1 change: 1 addition & 0 deletions client/docs/index.rst → client/py/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Modules
btree
chain
generic
host
interface
math.interface
math.linalg
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
35 changes: 35 additions & 0 deletions client/py/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
alabaster==0.7.12
Babel==2.11.0
certifi==2023.7.22
charset-normalizer==2.1.1
cryptography==41.0.6
distlib==0.3.6
docker==6.0.1
docutils==0.18
filelock==3.9.0
idna==3.4
imagesize==1.4.1
Jinja2==3.1.3
m2r2==0.3.2
MarkupSafe==2.1.1
mistune==0.8.4
packaging==22.0
pipenv==2022.12.19
platformdirs==2.6.2
Pygments==2.15.0
pytz==2022.7
requests==2.31.0
rjwt==0.1.1
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinx-rtd-theme==1.2
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
urllib3==1.26.18
virtualenv==20.17.1
virtualenv-clone==0.5.7
websocket-client==1.4.2
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion client/setup.cfg → client/py/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ classifiers =
Topic :: Software Development :: Code Generators

[options]
exclude = ("tests",)
packages = find:
python_requires = >=3.9
install_requires =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import tinychain.error
import tinychain.graph
import tinychain.host
import tinychain.host.asynchronous
import tinychain.math
import tinychain.math.interface
import tinychain.math.linalg
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions client/tinychain/host/sync.py → client/py/tinychain/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import rjwt
import urllib.parse

from ..service import Library, Model, Service
from ..context import to_json
from ..error import *
from ..scalar.value import Nil
from ..state import State
from ..uri import URI
from .service import Library, Model, Service
from .context import to_json
from .error import *
from .scalar.value import Nil
from .state import State
from .uri import URI


DEFAULT_PORT = 8702
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
133 changes: 133 additions & 0 deletions client/py_async/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# 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

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# IDE metadata
.project
.pydevproject
1 change: 1 addition & 0 deletions client/py_async/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
An aynchronous Python client for TinyChain: http://git.io/JtryR
20 changes: 20 additions & 0 deletions client/py_async/docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
61 changes: 61 additions & 0 deletions client/py_async/docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.

import os
import sys
sys.path.insert(0, os.path.abspath('..'))


# -- Project information -----------------------------------------------------

project = 'TinyChain'
copyright = '2024'
author = 'The TinyChain Contributors'

# The full version, including alpha/beta/rc tags
release = '0.16.0'

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'm2r2',
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
]

source_suffix = ['.rst', '.md']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
6 changes: 6 additions & 0 deletions client/py_async/docs/host.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:mod:`host`
==========================

.. automodule:: tinychain.host
:members:
:show-inheritance:
10 changes: 10 additions & 0 deletions client/py_async/docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. mdinclude:: ../README.md


Modules
-------

.. toctree::
:maxdepth: 1

host
35 changes: 35 additions & 0 deletions client/py_async/docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
File renamed without changes.
Loading

0 comments on commit edbf492

Please sign in to comment.