Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 31 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ workflows:
requires:
- hold

- docs:
requires:
- deploy
- build

# upload_test:
# triggers:
# - schedule:
Expand All @@ -41,10 +46,8 @@ workflows:
# branches:
# only:
# - jh/use-xxhash-for-integration-test

# jobs:
# - build

# - upload_test_job:
# requires:
# - build
Expand Down Expand Up @@ -103,15 +106,37 @@ jobs:
name: Attach build artifact

- run:
name: Install package
name: Upload to pypi
command: |
pip install '/tmp/artifact'
cd /tmp/artifact
twine upload dist/*

docs:
docker:
- image: circleci/python:latest

steps:
- attach_workspace:
at: /tmp/artifact
name: Attach build artifact

- run:
name: Run integration test
name: Install dependencies
command: |
python /tmp/artifact/tests/integration.py
cd /tmp/artifact/docs
pip install -r requirements.txt

- run:
name: Build autodocs
command: |
cd /tmp/artifact/docs
make jekyll

- run:
name: Publish autodocs
command: |
cd /tmp/artifact/docs
python publish.py

deploy:
docker:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ Pipfile
Pipfile.lock
.vscode/launch.json
.vscode/settings.json

pyproject.toml
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ run-benchmark:
docker run -it -e $1 benchmark

format:
black frameioclient
black frameioclient

publish-docs:
cd docs && pip install -r requirements.txt && make jekyll && make publish
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,26 @@ fioctl \
--threads 2
```

### Links

**Sphinx Documentation**
- https://pythonhosted.org/sphinxcontrib-restbuilder/
- https://www.npmjs.com/package/rst-selector-parser
- https://sphinx-themes.org/sample-sites/furo/_sources/index.rst.txt
- https://developer.mantidproject.org/Standards/DocumentationGuideForDevs.html
- https://sublime-and-sphinx-guide.readthedocs.io/en/latest/code_blocks.html
- https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html
- https://stackoverflow.com/questions/64451966/python-sphinx-how-to-embed-code-into-a-docstring
- https://pythonhosted.org/an_example_pypi_project/sphinx.html

**Decorators**
- https://docs.python.org/3.7/library/functools.html
- https://realpython.com/primer-on-python-decorators/
- https://www.sphinx-doc.org/en/master/usage/quickstart.html
- https://www.geeksforgeeks.org/decorators-with-parameters-in-python/
- https://stackoverflow.com/questions/43544954/why-does-sphinx-autodoc-output-a-decorators-docstring-when-there-are-two-decora


## Usage

_Note: A valid token is required to make requests to Frame.io. Go to our [Developer Portal](https://developer.frame.io/) to get a token!_
Expand Down
32 changes: 32 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 = dist

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

.PHONY: help Makefile

publish:
python publish.py

# 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)

jekyll:
sphinx-build -b jekyll . dist/markdown

rst:
sphinx-build -b rst . dist/rst

html:
sphinx-build -b html . dist/html
5 changes: 5 additions & 0 deletions docs/classes/assets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Assets
=========================

.. autoclass:: frameioclient.Asset
:members:
5 changes: 5 additions & 0 deletions docs/classes/comments.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Comments
===================

.. autoclass:: frameioclient.Comment
:members:
12 changes: 12 additions & 0 deletions docs/classes/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Classes
=====================

.. toctree::
users
assets
comments
logs
projects
teams
sharing
search
5 changes: 5 additions & 0 deletions docs/classes/logs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Audit Logs
===================

.. autoclass:: frameioclient.AuditLogs
:members:
5 changes: 5 additions & 0 deletions docs/classes/projects.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Projects
===================

.. autoclass:: frameioclient.Project
:members:
2 changes: 2 additions & 0 deletions docs/classes/search.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Search
===================
8 changes: 8 additions & 0 deletions docs/classes/sharing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Sharing
===================

.. autoclass:: frameioclient.PresentationLink
:members:

.. autoclass:: frameioclient.ReviewLink
:members:
5 changes: 5 additions & 0 deletions docs/classes/teams.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Teams
===================

.. autoclass:: frameioclient.Team
:members:
5 changes: 5 additions & 0 deletions docs/classes/users.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Users
===================

.. autoclass:: frameioclient.User
:members:
60 changes: 60 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import os
import sys
sys.path.insert(0, os.path.abspath('..'))

import frameioclient

PACKAGE_TITLE = 'Frame.io Python SDK'
PACKAGE_NAME = 'frameioclient'
PACKAGE_DIR = '../frameioclient'
AUTHOR_NAME = 'Frame.io'

try:
RELEASE = frameioclient.ClientVersion.version()
except AttributeError:
RELEASE = 'unknown'

version = RELEASE.split('.')[0]

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

project = PACKAGE_TITLE
copyright = 'MIT License 2021, Frame.io'
author = AUTHOR_NAME

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


# -- 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 = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinxcontrib.restbuilder',
'sphinx_jekyll_builder',
]

# 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', 'build/*', 'examples/*', 'tests/*', '*.cfg', '.vscode/*', '.github/*', '.circleci/*', '.pytest_cache/*', 'dist/*']


# -- 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 = 'furo'

# 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']
35 changes: 35 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Welcome to Frame.io's Python SDK documentation!
===============================================

.. toctree::
:maxdepth: 3
:caption: Contents:

.. warning::
This sample documentation was generated on |today|, and is rebuilt weekly.


FrameioClient
===================
.. automodule:: frameioclient.FrameioClient
:inherited-members:


Classes
===========
.. toctree::
classes/index


Modules
===========
.. toctree::
modules/index


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
37 changes: 37 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
===============
frameioclient
===============

.. toctree::
:hidden:

installation

Installation
============

Stable releases of frameioclient can be installed with

.. code-block:: sh

pip <http://pip.openplans.org> <- or you may download a `.tgz` source

archive from `pypi <http://pypi.python.org/pypi/frameioclient#downloads>`_.
See the :doc:`installation` page for more detailed instructions.

If you want to use the latest code, you can grab it from our
`Git repository <http://github.com/frameio/python-frameio-client>`_, or `fork it <http://github.com/jkeyes/python-intercom>`_.

Usage
===================================

Authorization
-------------

Frame.io Python SDK documentation: `Personal Access Tokens <https://developers.intercom.com/intercom-api-reference/reference#section-access-tokens>`_.


.. code-block:: python

from frameioclient import FrameioClient
client = FrameioClient(token='my-token')
35 changes: 35 additions & 0 deletions 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
8 changes: 8 additions & 0 deletions docs/modules/downloader.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FrameioDownloader
===================

.. autoclass:: frameioclient.FrameioDownloader
:members:
:private-members:
:inherited-members:
:undoc-members:
9 changes: 9 additions & 0 deletions docs/modules/helpers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FrameioHelpers
=========================

.. autoclass:: frameioclient.FrameioHelpers
:members:
:private-members:
:inherited-members:
:undoc-members:

Loading