diff --git a/.gitignore b/.gitignore index c6c87da6..39783d2e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,15 @@ *.pyc *.sw? *~ \#* .\#* .coverage .eggs/ resources/test/ __pycache__ version.txt swh.web.egg-info docs/build/ +docs/uri-scheme.md +docs/dev-info.md db.sqlite3 diff --git a/README-dev.md b/README-dev.md index 3ee3f493..2304f4cc 100644 --- a/README-dev.md +++ b/README-dev.md @@ -1,76 +1,76 @@ -README-dev -========== +Developers Information +====================== -# Run server +Run server +---------- Either use the django manage script directly (useful in development mode as it offers various commands). The configuration will be taken from the default configuration file: '~/.config/swh/webapp/webapp.yml'. ``` python3 -m swh.web.manage runserver ``` or use the following shortcut: ``` make run ``` -# Sample configuration +Sample configuration +-------------------- -The following inroduces a default configuration file: +The following introduces a default configuration file: ``` storage: cls: remote args: url: http://localhost:5002 debug: false throttling: cache_uri: None scopes: swh_api: limiter_rate: 120/h exempted_networks: - 127.0.0.0/8 ``` -# modules' description +modules' description +-------------------- -## Layers +### Layers Folder swh/web/api/: - views main api endpoints definitions (html browsable + json + yaml) - service Orchestration layer used by views module. In charge of communication with swh storage to retrieve information and conversion for the upper layer. In short: 1. views -depends-> service ----asks----> swh-storage 2. views <- service <----rets---- swh-storage -## Utilities +### Utilities Folder swh/web/api/: - apidoc Browsable api functions. - apiresponse Api response utility functions - apiurls Api routes registration functions - exc Exception definitions - converters conversion layer to transform swh data to serializable data. Used by `service` to convert data before transmitting to `api` or `views`. - query Utilities to parse data from http endpoints. Used by `service` - utils Utilities used throughout swh-web-api. ### About apidoc This is a 'decorator tower' that stores the data associated with the documentation upon loading the apidoc module. The top decorator of any tower should be @apidoc.route(). Apidoc raises an exception if this decorator is missing, and flask raises an exception if it is present but not at the top of the tower. -## Graphics summary - - ![Summary dependencies](./docs/dependencies.png) diff --git a/docs/Makefile b/docs/Makefile index c30c50ab..e76f15d8 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1 +1,7 @@ include ../../swh-docs/Makefile.sphinx + +html: copy_md + +copy_md: + cp ../README-dev.md dev-info.md + cp ../README-uri-scheme.md uri-scheme.md diff --git a/docs/index.rst b/docs/index.rst index 8b641170..9904d809 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,15 +1,17 @@ -Software Heritage - Development Documentation -============================================= +Software Heritage Web Applications - Development Documentation +=============================================================== .. toctree:: :maxdepth: 2 :caption: Contents: + dev-info.md + uri-scheme.md Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search`