kopia lustrzana https://gitlab.com/marnanel/chapeau
rm a lot of Sphinx stuff
rodzic
13ff6ba639
commit
4dcb6a4e61
|
@ -1,20 +0,0 @@
|
||||||
# Minimal makefile for Sphinx documentation
|
|
||||||
#
|
|
||||||
|
|
||||||
# You can set these variables from the command line.
|
|
||||||
SPHINXOPTS =
|
|
||||||
SPHINXBUILD = sphinx-build
|
|
||||||
SPHINXPROJ = django_kepi
|
|
||||||
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)
|
|
|
@ -1,147 +0,0 @@
|
||||||
We will have to parse the @context of incoming messages properly.
|
|
||||||
|
|
||||||
When other libraries call django_kepi.take(), they pass a dict
|
|
||||||
of the same format as would be received from a client.
|
|
||||||
|
|
||||||
"Addressing fields" are to, bto, cc, bcc, and audience.
|
|
||||||
|
|
||||||
Check what integration tests Mastodon runs for Activities.
|
|
||||||
|
|
||||||
Is it reasonable to have multiple Activity-type handling classes representing a single object?
|
|
||||||
|
|
||||||
== From django_kepi.take()
|
|
||||||
|
|
||||||
"attributedTo" and "type" must be set.
|
|
||||||
Check blocking, and reject if they're blocked.
|
|
||||||
Strip the "id" and generate our own.
|
|
||||||
Store Activity (which will add it to the user's outbox.
|
|
||||||
Perform side-effects.
|
|
||||||
Perform delivery.
|
|
||||||
Call activity_notify on relevant objects.
|
|
||||||
|
|
||||||
== From client
|
|
||||||
|
|
||||||
If the type is a valid ActivityStreams type but not an Activity, wrap it in a Create activity before continuing.
|
|
||||||
Check blocking, and reject if they're blocked.
|
|
||||||
Strip the "id" and generate our own.
|
|
||||||
Return 201 Created, Location: (our id).
|
|
||||||
Set "attributedTo" to the client's ID.
|
|
||||||
Store Activity (which will add it to the user's outbox.
|
|
||||||
Perform side-effects.
|
|
||||||
Perform delivery.
|
|
||||||
Call activity_notify on relevant objects.
|
|
||||||
|
|
||||||
== From server
|
|
||||||
|
|
||||||
Check blocking, and reject if they're blocked.
|
|
||||||
Store Activity.
|
|
||||||
Perform side-effects.
|
|
||||||
Forward, if necessary.
|
|
||||||
Call activity_notify on relevant objects.
|
|
||||||
|
|
||||||
== From background processing
|
|
||||||
|
|
||||||
Check the UUID to see what to do.
|
|
||||||
XXX What are the options?
|
|
||||||
|
|
||||||
- We wanted this file because it was referenced in an Activity
|
|
||||||
(such as is needed by the policy of trusting nobody)
|
|
||||||
- We wanted this file because it describes the target of a particular delivery
|
|
||||||
|
|
||||||
Note that we can't just deliver the moment we've found details of an Actor.
|
|
||||||
If there are many of them, we might choose to deliver to their sharedInbox instead.
|
|
||||||
|
|
||||||
===== Delivery
|
|
||||||
|
|
||||||
Make a list of recipients: the union of "to", "bto", "cc", "bcc", and "audience".
|
|
||||||
XXX We will really need caching here.
|
|
||||||
XXX But cache the contents of collections according to the user requesting them.
|
|
||||||
Also, delivery needs to be done as a background task.
|
|
||||||
|
|
||||||
===== Blocking
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
===== Side-effects
|
|
||||||
|
|
||||||
== Create
|
|
||||||
|
|
||||||
The new object is in "object".
|
|
||||||
Copy the addressing fields from the Activity to the object, and vice versa.
|
|
||||||
Send the object to the activity_create class method of each of the delegates listed. If any returns None,
|
|
||||||
go on to the next one. If they all return None, we have to reject the activity.
|
|
||||||
When a delegate returns non-None, that's the id of the object.
|
|
||||||
|
|
||||||
== Update
|
|
||||||
|
|
||||||
Find the object listed in "object" -> "id".
|
|
||||||
Call that object's activity_update method. Pass partial=False from server, partial=True (the default) from client.
|
|
||||||
In either case, don't pass in the "id" field.
|
|
||||||
|
|
||||||
== Delete
|
|
||||||
|
|
||||||
Find the object listed in "object" -> "id".
|
|
||||||
Call that object's activity_delete method.
|
|
||||||
|
|
||||||
== Follow
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
== Accept
|
|
||||||
|
|
||||||
If the activity linked in "object" is known, set its "followResult" to "accepted".
|
|
||||||
|
|
||||||
== Reject
|
|
||||||
|
|
||||||
If the activity linked in "object" is known, set its "followResult" to "rejected".
|
|
||||||
|
|
||||||
== Like
|
|
||||||
|
|
||||||
none
|
|
||||||
|
|
||||||
== Block
|
|
||||||
|
|
||||||
From client: no immediate side-effect. From server: reject.
|
|
||||||
|
|
||||||
== Announce
|
|
||||||
|
|
||||||
Can we get these from the client?
|
|
||||||
|
|
||||||
== Undo
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Activities we don't accept: Create, Delete, Add, and Remove.
|
|
||||||
I don't know whether we can undo an Undo, but let's assume not.
|
|
||||||
We don't accept undo for Update because we don't keep records of the previous state.
|
|
||||||
|
|
||||||
== other
|
|
||||||
|
|
||||||
Non-Activities that we can accept from a client:
|
|
||||||
|
|
||||||
Article
|
|
||||||
Audio
|
|
||||||
Document
|
|
||||||
Event
|
|
||||||
Image
|
|
||||||
Note
|
|
||||||
Page
|
|
||||||
Place
|
|
||||||
Profile
|
|
||||||
Relationship
|
|
||||||
Tombstone
|
|
||||||
Video
|
|
||||||
|
|
||||||
Non-Activities from a server get rejected.
|
|
||||||
|
|
||||||
===== Models
|
|
||||||
|
|
||||||
== Activity
|
|
||||||
|
|
||||||
== Tombstone
|
|
||||||
|
|
||||||
If a django_kepi.find() finds no response, we check Tombstone. Records found therein are returned with 410 Gone.
|
|
||||||
|
|
||||||
== Following
|
|
||||||
|
|
||||||
This is complicated enough to derive from the Activity objects that ...?
|
|
165
docs/conf.py
165
docs/conf.py
|
@ -1,165 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Configuration file for the Sphinx documentation builder.
|
|
||||||
#
|
|
||||||
# This file does only contain a selection of the most common options. For a
|
|
||||||
# full list see the documentation:
|
|
||||||
# http://www.sphinx-doc.org/en/master/config
|
|
||||||
|
|
||||||
# -- 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 = 'django_kepi'
|
|
||||||
copyright = '2018, Marnanel Thurman'
|
|
||||||
author = 'Marnanel Thurman'
|
|
||||||
|
|
||||||
# The short X.Y version
|
|
||||||
version = '0.0'
|
|
||||||
# The full version, including alpha/beta/rc tags
|
|
||||||
release = '0.0.18'
|
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
|
||||||
|
|
||||||
# If your documentation needs a minimal Sphinx version, state it here.
|
|
||||||
#
|
|
||||||
# needs_sphinx = '1.0'
|
|
||||||
|
|
||||||
# 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.todo',
|
|
||||||
]
|
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
|
||||||
templates_path = ['_templates']
|
|
||||||
|
|
||||||
# The suffix(es) of source filenames.
|
|
||||||
# You can specify multiple suffix as a list of string:
|
|
||||||
#
|
|
||||||
# source_suffix = ['.rst', '.md']
|
|
||||||
source_suffix = '.rst'
|
|
||||||
|
|
||||||
# The master toctree document.
|
|
||||||
master_doc = 'index'
|
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
||||||
# for a list of supported languages.
|
|
||||||
#
|
|
||||||
# This is also used if you do content translation via gettext catalogs.
|
|
||||||
# Usually you set "language" from the command line for these cases.
|
|
||||||
language = None
|
|
||||||
|
|
||||||
# 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']
|
|
||||||
|
|
||||||
# The name of the Pygments (syntax highlighting) style to use.
|
|
||||||
pygments_style = 'sphinx'
|
|
||||||
|
|
||||||
|
|
||||||
# -- 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 = 'alabaster'
|
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
|
||||||
# further. For a list of options available for each theme, see the
|
|
||||||
# documentation.
|
|
||||||
#
|
|
||||||
# html_theme_options = {}
|
|
||||||
|
|
||||||
# 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']
|
|
||||||
|
|
||||||
# Custom sidebar templates, must be a dictionary that maps document names
|
|
||||||
# to template names.
|
|
||||||
#
|
|
||||||
# The default sidebars (for documents that don't match any pattern) are
|
|
||||||
# defined by theme itself. Builtin themes are using these templates by
|
|
||||||
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
|
|
||||||
# 'searchbox.html']``.
|
|
||||||
#
|
|
||||||
# html_sidebars = {}
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTMLHelp output ---------------------------------------------
|
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
|
||||||
htmlhelp_basename = 'django_kepidoc'
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for LaTeX output ------------------------------------------------
|
|
||||||
|
|
||||||
latex_elements = {
|
|
||||||
# The paper size ('letterpaper' or 'a4paper').
|
|
||||||
#
|
|
||||||
# 'papersize': 'letterpaper',
|
|
||||||
|
|
||||||
# The font size ('10pt', '11pt' or '12pt').
|
|
||||||
#
|
|
||||||
# 'pointsize': '10pt',
|
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
|
||||||
#
|
|
||||||
# 'preamble': '',
|
|
||||||
|
|
||||||
# Latex figure (float) alignment
|
|
||||||
#
|
|
||||||
# 'figure_align': 'htbp',
|
|
||||||
}
|
|
||||||
|
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
|
||||||
# (source start file, target name, title,
|
|
||||||
# author, documentclass [howto, manual, or own class]).
|
|
||||||
latex_documents = [
|
|
||||||
(master_doc, 'django_kepi.tex', 'django\\_kepi Documentation',
|
|
||||||
'Marnanel Thurman', 'manual'),
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for manual page output ------------------------------------------
|
|
||||||
|
|
||||||
# One entry per manual page. List of tuples
|
|
||||||
# (source start file, name, description, authors, manual section).
|
|
||||||
man_pages = [
|
|
||||||
(master_doc, 'django_kepi', 'django_kepi Documentation',
|
|
||||||
[author], 1)
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Texinfo output ----------------------------------------------
|
|
||||||
|
|
||||||
# Grouping the document tree into Texinfo files. List of tuples
|
|
||||||
# (source start file, target name, title, author,
|
|
||||||
# dir menu entry, description, category)
|
|
||||||
texinfo_documents = [
|
|
||||||
(master_doc, 'django_kepi', 'django_kepi Documentation',
|
|
||||||
author, 'django_kepi', 'One line description of project.',
|
|
||||||
'Miscellaneous'),
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# -- Extension configuration -------------------------------------------------
|
|
||||||
|
|
||||||
# -- Options for todo extension ----------------------------------------------
|
|
||||||
|
|
||||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
|
||||||
todo_include_todos = True
|
|
|
@ -1,77 +0,0 @@
|
||||||
django\_kepi package
|
|
||||||
====================
|
|
||||||
|
|
||||||
Subpackages
|
|
||||||
-----------
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
|
|
||||||
django_kepi.migrations
|
|
||||||
|
|
||||||
Submodules
|
|
||||||
----------
|
|
||||||
|
|
||||||
django\_kepi.admin module
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
.. automodule:: django_kepi.admin
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
|
||||||
django\_kepi.apps module
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
.. automodule:: django_kepi.apps
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
|
||||||
django\_kepi.models module
|
|
||||||
--------------------------
|
|
||||||
|
|
||||||
.. automodule:: django_kepi.models
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
|
||||||
django\_kepi.responses module
|
|
||||||
-----------------------------
|
|
||||||
|
|
||||||
.. automodule:: django_kepi.responses
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
|
||||||
django\_kepi.serializers module
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
.. automodule:: django_kepi.serializers
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
|
||||||
django\_kepi.tasks module
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
.. automodule:: django_kepi.tasks
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
|
||||||
django\_kepi.views module
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
.. automodule:: django_kepi.views
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
|
||||||
|
|
||||||
Module contents
|
|
||||||
---------------
|
|
||||||
|
|
||||||
.. automodule:: django_kepi
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
|
@ -1,21 +0,0 @@
|
||||||
.. django_kepi documentation master file, created by
|
|
||||||
sphinx-quickstart on Fri Oct 5 20:14:51 2018.
|
|
||||||
You can adapt this file completely to your liking, but it should at least
|
|
||||||
contain the root `toctree` directive.
|
|
||||||
|
|
||||||
Welcome to django_kepi's documentation!
|
|
||||||
=======================================
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 2
|
|
||||||
:caption: Contents:
|
|
||||||
modules.rst
|
|
||||||
django_kepi.rst
|
|
||||||
|
|
||||||
|
|
||||||
Indices and tables
|
|
||||||
==================
|
|
||||||
|
|
||||||
* :ref:`genindex`
|
|
||||||
* :ref:`modindex`
|
|
||||||
* :ref:`search`
|
|
|
@ -1,6 +1,8 @@
|
||||||
Installing kepi
|
Installing kepi
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
**This may be out of date**
|
||||||
|
|
||||||
kepi is still pre-alpha software, so installation is still a
|
kepi is still pre-alpha software, so installation is still a
|
||||||
little fiddly at present.
|
little fiddly at present.
|
||||||
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
@ECHO OFF
|
|
||||||
|
|
||||||
pushd %~dp0
|
|
||||||
|
|
||||||
REM Command file for Sphinx documentation
|
|
||||||
|
|
||||||
if "%SPHINXBUILD%" == "" (
|
|
||||||
set SPHINXBUILD=sphinx-build
|
|
||||||
)
|
|
||||||
set SOURCEDIR=.
|
|
||||||
set BUILDDIR=_build
|
|
||||||
set SPHINXPROJ=django_kepi
|
|
||||||
|
|
||||||
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%
|
|
||||||
goto end
|
|
||||||
|
|
||||||
:help
|
|
||||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
|
||||||
|
|
||||||
:end
|
|
||||||
popd
|
|
|
@ -1,7 +0,0 @@
|
||||||
django_kepi
|
|
||||||
===========
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 4
|
|
||||||
|
|
||||||
django_kepi
|
|
Ładowanie…
Reference in New Issue