Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Setup Sphinx for developer-docs (#427)
Dhruv Bhanushalie3d9427a600a
diff --git a/README.md b/README.mdindex 7db323695..df9b378ed 100644--- a/README.md+++ b/README.md@@ -4,89 +4,6 @@This repository is primarily concerned with back end infrastructure like datastores, servers, and APIs. The pipeline that feeds data into this system can be found in the [Openverse Catalog repository](https://github.com/WordPress/openverse-catalog). A front end web application that interfaces with the API can be found at the [Openverse frontend repository](https://github.com/WordPress/openverse-frontend).-## Running the system--### Prerequisites--- [Git](https://git-scm.com/downloads)-- [Docker](https://docs.docker.com/install/)-- [Docker Compose](https://docs.docker.com/compose/install/)-- [Pipenv](https://pipenv.pypa.io/en/latest/#install-pipenv-today)-- [Just](https://github.com/casey/just)--### Steps--1. Ensure that the [Docker daemon](https://docs.docker.com/config/daemon/) is running.--2. Clone the repository and `cd` into it. This is the monorepo root.- ```bash- git clone https://github.com/WordPress/openverse-api.git- cd openverse-api/- ```--3. From the monorepo root, bring up the Docker Compose system. Docker Compose will automatically read the necessary environment variables from `env.docker` files from project directories.- ```bash- just up- ```--4. Point your browser to `localhost:8000`. You should be able to see the API documentation.- --5. Load the sample data. This could take a couple of minutes.- ```bash- just init- ```--6. Make an API request using cURL. You should receive a JSON response.- ```bash- just stats- ```-- Piping the response through a pretty-printer like- [`jq`](https://stedolan.github.io/jq/) should yield an output like the- following.- ```bash- just stats | jq '.[0]'- ```-- ```json- {- "source_name": "flickr",- "display_name": "Flickr",- "source_url": "https://www.flickr.com",- "logo_url": null,- "media_count": 1000- }- ```--7. When done, bring the system down. To remove all volumes as well, pass the `-v` flag.- ```bash- just down- just down -v # removes volumes- ```--8. Use the `logs` command access the logs from all services. To isolate a service, pass the service name as an argument.- ```bash- just logs- just logs web # only shows logs web service- ```--### Services--The command `just up` spawns the following services:--- [PostgreSQL](https://www.postgresql.org/) x 2 instances- - upstream data source simulator- - API application database-- [Elasticsearch](https://www.elastic.co/elasticsearch/)-- [Redis](https://redis.io/)-- [imageproxy](https://github.com/willnorris/imageproxy)-- **web** (`api/`)-- **ingestion_server** and **indexer_worker** (`ingestion_server/`)-- **analytics** (`analytics/`)--The last three are subprojects of this monorepo, described below.-## System architecturediff --git a/api/Pipfile b/api/Pipfileindex 168187ee4..acea5ce43 100644--- a/api/Pipfile+++ b/api/Pipfile@@ -11,6 +11,10 @@ pytest-django = ">=3.5"remote-pdb = "*"pre-commit = "*"locust = "*"+sphinx = "*"+sphinx-autobuild = "*"+furo = "*"+myst-parser = "*"[packages]aws-requests-auth = "*"diff --git a/api/Pipfile.lock b/api/Pipfile.lockindex 8f99aa782..b6c907034 100644--- a/api/Pipfile.lock+++ b/api/Pipfile.lock@@ -1,7 +1,7 @@{"_meta": {"hash": {- "sha256": "55731888d2304f35e491d3ba6fb25c6ebb9e8a587650c39d84ce1832b1bd1579"+ "sha256": "03a1e8d8b5c33a7bf53af93787f6e6fa1a3ef61ca95f30539f2fb1bc233f4b68"},"pipfile-spec": 6,"requires": {@@ -34,19 +34,19 @@},"boto3": {"hashes": [- "sha256:1def3b3b0414915e20a543ea5f0f6dfb8fdab20819d5a7c2ce107937668d1085",- "sha256:9364b6310891e4ce478d8379ce114de3ede46e53beb1012cda07121e969ced5a"+ "sha256:1955ec05e4a2cf8d503af72f5bb26e3a5526438c89ee875d77a2e8d082277589",+ "sha256:ab0ca0d0dbb90a05b010bbcc038850f0b71979182b44bd88313eafb6ae8a26a3"],"index": "pypi",- "version": "==1.20.27"+ "version": "==1.20.29"},"botocore": {"hashes": [- "sha256:8dca8fb66c47b8be9a5c9d29cc4dcf0a4d28289df8cbe1a6d3df431c1f2400d6",- "sha256:fac6515997a7e86216a280ae57f6a80b3560ed5fb157c84e87a9341936773437"+ "sha256:6ba08e8738b38b1c3cb11cd4d4ee1b4aa557511271071bdd7a9c41bc0b212eeb",+ "sha256:d6706a8e72df56c5b25291cf5175b790bf1c71c740bdf8cb57f258b97ed39e2c"],"markers": "python_version >= '3.6'",- "version": "==1.23.27"+ "version": "==1.23.29"},"certifi": {"hashes": [@@ -112,11 +112,11 @@},"charset-normalizer": {"hashes": [- "sha256:1eecaa09422db5be9e29d7fc65664e6c33bd06f9ced7838578ba40d58bdf3721",- "sha256:b0b883e8e874edfdece9c28f314e3dd5badf067342e42fb162203335ae61aa2c"+ "sha256:876d180e9d7432c5d1dfd4c5d26b72f099d503e8fcc0feb7532c9289be60fcbd",+ "sha256:cb957888737fc0bbcd78e3df769addb41fd1ff8cf950dc9e7ad7793f1bf44455"],"markers": "python_version >= '3'",- "version": "==2.0.9"+ "version": "==2.0.10"},"coreapi": {"hashes": [@@ -472,7 +472,7 @@"sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9","sha256:cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f"],- "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'",+ "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'","version": "==0.10.0"},"jwcrypto": {@@ -671,7 +671,7 @@"sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86","sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"],- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'","version": "==2.8.2"},"python-decouple": {@@ -729,11 +729,11 @@},"requests": {"hashes": [- "sha256:8e5643905bf20a308e25e4c1dd379117c09000bf8a82ebccc462cfb1b34a16b5",- "sha256:f71a09d7feba4a6b64ffd8e9d9bc60f9bf7d7e19fd0e04362acb1cfc2e3d98df"+ "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61",+ "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"],"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'",- "version": "==2.27.0"+ "version": "==2.27.1"},"requests-oauthlib": {"hashes": [@@ -780,7 +780,7 @@"sha256:dc6a613d6c74eef5a14a214d433d06291526145431c3b964f5e16529b1842bed","sha256:de9c6b8a1ba52919ae919f3ae96abb72b994dd0350226e28f3686cb4f142165c"],- "markers": "platform_python_implementation == 'CPython' and python_version < '3.11'",+ "markers": "python_version < '3.11' and platform_python_implementation == 'CPython'","version": "==0.2.6"},"s3transfer": {@@ -804,7 +804,7 @@"sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926","sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"],- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'","version": "==1.16.0"},"sqlparse": {@@ -843,7 +843,7 @@"sha256:73aae30359291c14fa3b956f8b5ca31960e420c28c1bec002547fb04928cf89b","sha256:b64ef5141be559cfade448f044fa45c2260351edcb6a8ef6b7e00c7dcef0c323"],- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'","version": "==1.8.7"},"wrapt": {@@ -977,6 +977,13 @@}},"develop": {+ "alabaster": {+ "hashes": [+ "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359",+ "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"+ ],+ "version": "==0.7.12"+ },"appnope": {"hashes": ["sha256:93aa393e9d6c54c5cd570ccadd8edad61ea0c4b9ea7a01409020c9aa019eb442",@@ -993,6 +1000,14 @@"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'","version": "==21.4.0"},+ "babel": {+ "hashes": [+ "sha256:ab49e12b91d937cd11f0b67cb259a57ab4ad2b59ac7a3b41d6c06c0ac5b0def9",+ "sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0"+ ],+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",+ "version": "==2.9.1"+ },"backcall": {"hashes": ["sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e",@@ -1000,6 +1015,14 @@],"version": "==0.2.0"},+ "beautifulsoup4": {+ "hashes": [+ "sha256:9a315ce70049920ea4572a4055bc4bd700c940521d36fc858205ad4fcde149bf",+ "sha256:c23ad23c521d818955a4151a67d81580319d4bf548d3d49f4223ae041ff98891"+ ],+ "markers": "python_version >= '3.1'",+ "version": "==4.10.0"+ },"brotli": {"hashes": ["sha256:160c78292e98d21e73a4cc7f76a234390e516afcd982fa17e1422f7c6a9ce9c8",@@ -1069,11 +1092,11 @@},"charset-normalizer": {"hashes": [- "sha256:1eecaa09422db5be9e29d7fc65664e6c33bd06f9ced7838578ba40d58bdf3721",- "sha256:b0b883e8e874edfdece9c28f314e3dd5badf067342e42fb162203335ae61aa2c"+ "sha256:876d180e9d7432c5d1dfd4c5d26b72f099d503e8fcc0feb7532c9289be60fcbd",+ "sha256:cb957888737fc0bbcd78e3df769addb41fd1ff8cf950dc9e7ad7793f1bf44455"],"markers": "python_version >= '3'",- "version": "==2.0.9"+ "version": "==2.0.10"},"click": {"hashes": [@@ -1083,6 +1106,14 @@"markers": "python_version >= '3.6'","version": "==8.0.3"},+ "colorama": {+ "hashes": [+ "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b",+ "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"+ ],+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",+ "version": "==0.4.4"+ },"configargparse": {"hashes": ["sha256:18f6535a2db9f6e02bd5626cc7455eac3e96b9ab3d969d366f9aafd5c5c00fe7",@@ -1106,6 +1137,14 @@],"version": "==0.3.4"},+ "docutils": {+ "hashes": [+ "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125",+ "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"+ ],+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",+ "version": "==0.17.1"+ },"filelock": {"hashes": ["sha256:38b4f4c989f9d06d44524df1b24bd19e167d851f19b50bf3e3559952dddc5b80",@@ -1135,6 +1174,14 @@],"version": "==3.0.10"},+ "furo": {+ "hashes": [+ "sha256:958016bfe1387c1e8ddf5b9d71696b69c4eaa5cd8afc9492abfb008aba2d300c",+ "sha256:b217f218cbcd423ffbfe69baa79389d4ecebf2d86f0d593c44ef31da7b5aed30"+ ],+ "index": "pypi",+ "version": "==2022.1.2"+ },"gevent": {"hashes": ["sha256:0082d8a5d23c35812ce0e716a91ede597f6dd2c5ff508a02a998f73598c59397",@@ -1298,6 +1345,14 @@"markers": "python_version >= '3'","version": "==3.3"},+ "imagesize": {+ "hashes": [+ "sha256:1db2f82529e53c3e929e8926a1fa9235aa82d0bd0c580359c67ec31b2fddaa8c",+ "sha256:cd1750d452385ca327479d45b64d9c7729ecf0b3969a58148298c77092261f9d"+ ],+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",+ "version": "==1.3.0"+ },"iniconfig": {"hashes": ["sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3",@@ -1307,11 +1362,11 @@},"ipython": {"hashes": [- "sha256:cb6aef731bf708a7727ab6cde8df87f0281b1427d41e65d62d4b68934fa54e97",- "sha256:fc60ef843e0863dd4e24ab2bb5698f071031332801ecf8d1aeb4fb622056545c"+ "sha256:346c74db7312c41fa566d3be45d2e759a528dcc2994fe48aac1a03a70cd668a3",+ "sha256:4c4234cdcc6b8f87c5b5c7af9899aa696ac5cfcf0e9f6d0688018bbee5c73bce"],"index": "pypi",- "version": "==7.30.1"+ "version": "==7.31.0"},"itsdangerous": {"hashes": [@@ -1337,6 +1392,12 @@"markers": "python_version >= '3.6'","version": "==3.0.3"},+ "livereload": {+ "hashes": [+ "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"+ ],+ "version": "==2.6.3"+ },"locust": {"hashes": ["sha256:8527e0c4eff0b27f2368a96bd6036a379049d3efd17b7750ea1a54d5e23017fe",@@ -1345,6 +1406,14 @@"index": "pypi","version": "==2.5.1"},+ "markdown-it-py": {+ "hashes": [+ "sha256:15cc69c5b7c493ba8603722b710e39ce3fab2961994179fb4fa1c99b070d2059",+ "sha256:c138a596f6c9988e0b5fa3299bc38ffa76c75076bc178e8dfac40a84343c7022"+ ],+ "markers": "python_version ~= '3.6'",+ "version": "==2.0.0"+ },"markupsafe": {"hashes": ["sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298",@@ -1428,6 +1497,22 @@"markers": "python_version >= '3.5'","version": "==0.1.3"},+ "mdit-py-plugins": {+ "hashes": [+ "sha256:b1279701cee2dbf50e188d3da5f51fee8d78d038cdf99be57c6b9d1aa93b4073",+ "sha256:ecc24f51eeec6ab7eecc2f9724e8272c2fb191c2e93cf98109120c2cace69750"+ ],+ "markers": "python_version ~= '3.6'",+ "version": "==0.3.0"+ },+ "mdurl": {+ "hashes": [+ "sha256:40654d6dcb8d21501ed13c21cc0bd6fc42ff07ceb8be30029e5ae63ebc2ecfda",+ "sha256:94873a969008ee48880fb21bad7de0349fef529f3be178969af5817239e9b990"+ ],+ "markers": "python_version >= '3.6'",+ "version": "==0.1.0"+ },"msgpack": {"hashes": ["sha256:0d8c332f53ffff01953ad25131272506500b14750c1d0ce8614b17d098252fbc",@@ -1467,6 +1552,14 @@],"version": "==1.0.3"},+ "myst-parser": {+ "hashes": [+ "sha256:617a90ceda2162ebf81cd13ad17d879bd4f49e7fb5c4f177bb905272555a2268",+ "sha256:a6473b9735c8c74959b49b36550725464f4aecc4481340c9a5f9153829191f83"+ ],+ "index": "pypi",+ "version": "==0.16.1"+ },"nodeenv": {"hashes": ["sha256:3ef13ff90291ba2a4a7a4ff9a979b63ffdd00a464dbe04acf0ea6471517a4c2b",@@ -1634,6 +1727,13 @@"index": "pypi","version": "==4.5.2"},+ "pytz": {+ "hashes": [+ "sha256:3672058bc3453457b622aab7a1c3bfd5ab0bdae451512f6cf25f64ed37f5b87c",+ "sha256:acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326"+ ],+ "version": "==2021.3"+ },"pyyaml": {"hashes": ["sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293",@@ -1736,11 +1836,11 @@},"requests": {"hashes": [- "sha256:8e5643905bf20a308e25e4c1dd379117c09000bf8a82ebccc462cfb1b34a16b5",- "sha256:f71a09d7feba4a6b64ffd8e9d9bc60f9bf7d7e19fd0e04362acb1cfc2e3d98df"+ "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61",+ "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"],"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'",- "version": "==2.27.0"+ "version": "==2.27.1"},"roundrobin": {"hashes": [@@ -1753,17 +1853,143 @@"sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926","sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"],- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",+ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'","version": "==1.16.0"},+ "snowballstemmer": {+ "hashes": [+ "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1",+ "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"+ ],+ "version": "==2.2.0"+ },+ "soupsieve": {+ "hashes": [+ "sha256:1a3cca2617c6b38c0343ed661b1fa5de5637f257d4fe22bd9f1338010a1efefb",+ "sha256:b8d49b1cd4f037c7082a9683dfa1801aa2597fb11c3a1155b7a5b94829b4f1f9"+ ],+ "markers": "python_version >= '3.6'",+ "version": "==2.3.1"+ },+ "sphinx": {+ "hashes": [+ "sha256:0a8836751a68306b3fe97ecbe44db786f8479c3bf4b80e3a7f5c838657b4698c",+ "sha256:6a11ea5dd0bdb197f9c2abc2e0ce73e01340464feaece525e64036546d24c851"+ ],+ "index": "pypi",+ "version": "==4.3.2"+ },+ "sphinx-autobuild": {+ "hashes": [+ "sha256:8fe8cbfdb75db04475232f05187c776f46f6e9e04cacf1e49ce81bdac649ccac",+ "sha256:de1ca3b66e271d2b5b5140c35034c89e47f263f2cd5db302c9217065f7443f05"+ ],+ "index": "pypi",+ "version": "==2021.3.14"+ },+ "sphinxcontrib-applehelp": {+ "hashes": [+ "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a",+ "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"+ ],+ "markers": "python_version >= '3.5'",+ "version": "==1.0.2"+ },+ "sphinxcontrib-devhelp": {+ "hashes": [+ "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e",+ "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"+ ],+ "markers": "python_version >= '3.5'",+ "version": "==1.0.2"+ },+ "sphinxcontrib-htmlhelp": {+ "hashes": [+ "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07",+ "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"+ ],+ "markers": "python_version >= '3.6'",+ "version": "==2.0.0"+ },+ "sphinxcontrib-jsmath": {+ "hashes": [+ "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178",+ "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"+ ],+ "markers": "python_version >= '3.5'",+ "version": "==1.0.1"+ },+ "sphinxcontrib-qthelp": {+ "hashes": [+ "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72",+ "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"+ ],+ "markers": "python_version >= '3.5'",+ "version": "==1.0.3"+ },+ "sphinxcontrib-serializinghtml": {+ "hashes": [+ "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd",+ "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"+ ],+ "markers": "python_version >= '3.5'",+ "version": "==1.1.5"+ },"toml": {"hashes": ["sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b","sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"],- "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'",+ "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'","version": "==0.10.2"},+ "tornado": {+ "hashes": [+ "sha256:0a00ff4561e2929a2c37ce706cb8233b7907e0cdc22eab98888aca5dd3775feb",+ "sha256:0d321a39c36e5f2c4ff12b4ed58d41390460f798422c4504e09eb5678e09998c",+ "sha256:1e8225a1070cd8eec59a996c43229fe8f95689cb16e552d130b9793cb570a288",+ "sha256:20241b3cb4f425e971cb0a8e4ffc9b0a861530ae3c52f2b0434e6c1b57e9fd95",+ "sha256:25ad220258349a12ae87ede08a7b04aca51237721f63b1808d39bdb4b2164558",+ "sha256:33892118b165401f291070100d6d09359ca74addda679b60390b09f8ef325ffe",+ "sha256:33c6e81d7bd55b468d2e793517c909b139960b6c790a60b7991b9b6b76fb9791",+ "sha256:3447475585bae2e77ecb832fc0300c3695516a47d46cefa0528181a34c5b9d3d",+ "sha256:34ca2dac9e4d7afb0bed4677512e36a52f09caa6fded70b4e3e1c89dbd92c326",+ "sha256:3e63498f680547ed24d2c71e6497f24bca791aca2fe116dbc2bd0ac7f191691b",+ "sha256:548430be2740e327b3fe0201abe471f314741efcb0067ec4f2d7dcfb4825f3e4",+ "sha256:6196a5c39286cc37c024cd78834fb9345e464525d8991c21e908cc046d1cc02c",+ "sha256:61b32d06ae8a036a6607805e6720ef00a3c98207038444ba7fd3d169cd998910",+ "sha256:6286efab1ed6e74b7028327365cf7346b1d777d63ab30e21a0f4d5b275fc17d5",+ "sha256:65d98939f1a2e74b58839f8c4dab3b6b3c1ce84972ae712be02845e65391ac7c",+ "sha256:66324e4e1beede9ac79e60f88de548da58b1f8ab4b2f1354d8375774f997e6c0",+ "sha256:6c77c9937962577a6a76917845d06af6ab9197702a42e1346d8ae2e76b5e3675",+ "sha256:70dec29e8ac485dbf57481baee40781c63e381bebea080991893cd297742b8fd",+ "sha256:7250a3fa399f08ec9cb3f7b1b987955d17e044f1ade821b32e5f435130250d7f",+ "sha256:748290bf9112b581c525e6e6d3820621ff020ed95af6f17fedef416b27ed564c",+ "sha256:7da13da6f985aab7f6f28debab00c67ff9cbacd588e8477034c0652ac141feea",+ "sha256:8f959b26f2634a091bb42241c3ed8d3cedb506e7c27b8dd5c7b9f745318ddbb6",+ "sha256:9de9e5188a782be6b1ce866e8a51bc76a0fbaa0e16613823fc38e4fc2556ad05",+ "sha256:a48900ecea1cbb71b8c71c620dee15b62f85f7c14189bdeee54966fbd9a0c5bd",+ "sha256:b87936fd2c317b6ee08a5741ea06b9d11a6074ef4cc42e031bc6403f82a32575",+ "sha256:c77da1263aa361938476f04c4b6c8916001b90b2c2fdd92d8d535e1af48fba5a",+ "sha256:cb5ec8eead331e3bb4ce8066cf06d2dfef1bfb1b2a73082dfe8a161301b76e37",+ "sha256:cc0ee35043162abbf717b7df924597ade8e5395e7b66d18270116f8745ceb795",+ "sha256:d14d30e7f46a0476efb0deb5b61343b1526f73ebb5ed84f23dc794bdb88f9d9f",+ "sha256:d371e811d6b156d82aa5f9a4e08b58debf97c302a35714f6f45e35139c332e32",+ "sha256:d3d20ea5782ba63ed13bc2b8c291a053c8d807a8fa927d941bd718468f7b950c",+ "sha256:d3f7594930c423fd9f5d1a76bee85a2c36fd8b4b16921cae7e965f22575e9c01",+ "sha256:dcef026f608f678c118779cd6591c8af6e9b4155c44e0d1bc0c87c036fb8c8c4",+ "sha256:e0791ac58d91ac58f694d8d2957884df8e4e2f6687cdf367ef7eb7497f79eaa2",+ "sha256:e385b637ac3acaae8022e7e47dfa7b83d3620e432e3ecb9a3f7f58f150e50921",+ "sha256:e519d64089b0876c7b467274468709dadf11e41d65f63bba207e04217f47c085",+ "sha256:e7229e60ac41a1202444497ddde70a48d33909e484f96eb0da9baf8dc68541df",+ "sha256:ed3ad863b1b40cd1d4bd21e7498329ccaece75db5a5bf58cd3c9f130843e7102",+ "sha256:f0ba29bafd8e7e22920567ce0d232c26d4d47c8b5cf4ed7b562b5db39fa199c5",+ "sha256:fa2ba70284fa42c2a5ecb35e322e68823288a4251f9ba9cc77be04ae15eada68",+ "sha256:fba85b6cd9c39be262fcd23865652920832b61583de2a2ca907dbd8e8a8c81e5"+ ],+ "markers": "python_version >= '3.5'",+ "version": "==6.1"+ },"traitlets": {"hashes": ["sha256:059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7",diff --git a/api/README.md b/api/README.mdindex 0a68190d8..74b6f7215 100644--- a/api/README.md+++ b/api/README.md@@ -1,63 +1,23 @@-# Web API--## Introduction--The Openverse API is a system that allows programmatic access to public domain digital media. It is our ambition to index and catalog [billions of openly-licensed works](https://stateof.creativecommons.org/), including articles, songs, videos, photographs, paintings, and more. Using this API, developers will be able to access the digital commons in their own applications.--## Running on the host--1. Create environment variables from the stencil file.- ```bash- just env- ```--2. Install Python dependencies.- ```bash- just install- ```--3. Start the Django dev server.- ```bash- just dj runserver- ```--## Running the tests--### Inside Docker (preferred)--1. Ensure that Docker containers are up.- ```bash- docker-compose ps- ```--2. Run the tests in an interactive TTY connected to a `web` container.- ```bash- just api-test- ```--### On the host--1. Start the Django dev server. See the section above for instructions.--2. Run the tests in a terminal on the host.- ```bash- just api-testlocal- ```--## API documentation--You can view the API documentation views at the `/v1/` endpoint. You can find more details about the API endpoints with examples on how to use them in the docs.--## Django admin--You can view the custom administration views at the `/admin/` endpoint. You can use the username 'deploy' and password 'deploy' to log in.--## Configuration--All configuration is performed through environment variables. See the `env.template` file for a comprehensive list of all environment variables. The ones with sane defaults have been commented out.--Pipenv will automatically load `.env` files when running commands with `pipenv run`.--## Deployment--<!-- TODO -->+# Openverse API++The API has two sets of documentation.++- [Developer docs](https://wordpress.github.io/openverse-frontend/)+ - are focused towards developers who are building the Openverse API+ - can be seen locally by+ - running the following recipe:+ ```bash+ just sphinx-live+ ```+ - visiting the `https://localhost:3000/` endpoint+ - contain more details on how to contribute to the API project++- [Consumer docs](https://api.openverse.engineering/)+ - are focused towards consumers who are using the Openverse API+ - can be seen locally by+ - running the API service+ ```bash+ just up+ ```+ - visiting the `https://localhost:8000/` endpoint+ - contain more details about the API endpoints with usage examplesdiff --git a/api/catalog/api/docs/README.md b/api/catalog/api/docs/README.mdindex 9177dd909..b80a80103 100644--- a/api/catalog/api/docs/README.md+++ b/api/catalog/api/docs/README.md@@ -1,3 +1,7 @@+This documentation is focused towards consumers who are using the Openverse API.+The developer documentation for the Openverse API can be found [here]().++# IntroductionThe Openverse API is a system that allows programmatic accessdiff --git a/api/catalog/urls/swagger.py b/api/catalog/urls/swagger.pyindex 2935c4e85..48a2acdc1 100644--- a/api/catalog/urls/swagger.py+++ b/api/catalog/urls/swagger.py@@ -19,7 +19,7 @@ license_url = "https://github.com/WordPress/openverse-api/blob/HEAD/LICENSE"logo_url = "https://raw.githubusercontent.com/WordPress/openverse/HEAD/brand/logo.svg"schema_view = get_schema_view(openapi.Info(- title="Openverse API",+ title="Openverse API consumer docs",default_version=settings.API_VERSION,description=description,contact=openapi.Contact(email=settings.CONTACT_EMAIL),diff --git a/api/docs/_static/_css/brand.css b/api/docs/_static/_css/brand.cssnew file mode 100644index 000000000..c5c7b8dfe--- /dev/null+++ b/api/docs/_static/_css/brand.css@@ -0,0 +1,13 @@+.sidebar-logo-container {+ color: black;+}++body[data-theme="dark"] .sidebar-logo-container {+ color: white;+}++@media (prefers-color-scheme: dark) {+ body:not([data-theme="light"]) .sidebar-logo-container {+ color: white;+ }+}diff --git a/api/docs/_static/api_redoc.png b/api/docs/_static/api_redoc.pngnew file mode 100644index 000000000..82a33fb34Binary files /dev/null and b/api/docs/_static/api_redoc.png differdiff --git a/api/docs/_templates/page.html b/api/docs/_templates/page.htmlnew file mode 100644index 000000000..5dc36e707--- /dev/null+++ b/api/docs/_templates/page.html@@ -0,0 +1,52 @@+{% extends "furo/page.html" %}++{% block footer %}+ <!-- Copied from base template -->+ <div class="related-pages">+ {% if next -%}+ <a class="next-page" href="{{ next.link }}">+ <div class="page-info">+ <div class="context">+ <span>{{ _("Next") }}</span>+ </div>+ <div class="title">{{ next.title }}</div>+ </div>+ <svg><use href="#svg-arrow-right"></use></svg>+ </a>+ {%- endif %}+ {% if prev -%}+ <a class="prev-page" href="{{ prev.link }}">+ <svg><use href="#svg-arrow-right"></use></svg>+ <div class="page-info">+ <div class="context">+ <span>{{ _("Previous") }}</span>+ </div>+ {% if prev.link == pathto(master_doc) %}+ <div class="title">{{ _("Home") }}</div>+ {% else %}+ <div class="title">{{ prev.title }}</div>+ {% endif %}+ </div>+ </a>+ {%- endif %}+ </div>++ <div class="related-information">+ {%- if show_copyright %}+ {% trans copyright=copyright|e -%}+ {{ copyright }}+ {%- endtrans %} |+ {%- endif %}++ {% trans %}+ Documentation powered by <a href="https://www.sphinx-doc.org/">Sphinx</a>+ {% endtrans -%}++ {%- if show_source and has_source and sourcename %}+ | <a class="muted-link" href="{{ pathto('_sources/' + sourcename, true)|e }}"+ rel="nofollow">+ {{ _('Show Source') }}+ </a>+ {%- endif %}+ </div>+{% endblock footer %}diff --git a/api/docs/_templates/sidebar/brand.html b/api/docs/_templates/sidebar/brand.htmlnew file mode 100644index 000000000..c327dde7a--- /dev/null+++ b/api/docs/_templates/sidebar/brand.html@@ -0,0 +1,17 @@+{% extends "furo/sidebar/brand.html" %}++{% block brand_content %}+ <div class="sidebar-logo-container">+ <svg class="sidebar-logo" width="226" height="34" viewBox="0 0 226 34" xmlns="http://www.w3.org/2000/svg">+ <g id="logo" fill="currentColor">+ <path class="text" d="M71.8823 17.2666C71.8823 22.7198 67.4908 27.1406 62.0737 27.1406C56.6565 27.1406 52.265 22.7198 52.265 17.2666C52.265 11.8133 56.6565 7.39258 62.0737 7.39258C67.4908 7.39258 71.8823 11.8133 71.8823 17.2666ZM65.997 17.2666C65.997 19.4479 64.2404 21.2162 62.0735 21.2162C59.9067 21.2162 58.1501 19.4479 58.1501 17.2666C58.1501 15.0853 59.9067 13.317 62.0735 13.317C64.2404 13.317 65.997 15.0853 65.997 17.2666ZM80.1463 33.6428H73.4168V7.72354H80.0975V11.0125H80.2438C80.9753 9.09804 82.7308 7.47809 85.5104 7.47809C89.2165 7.47809 92.8251 10.3253 92.8251 17.1487C92.8251 23.6776 89.4603 26.8194 85.4616 26.8194C82.8284 26.8194 81.0241 25.3958 80.2438 23.4813H80.1463V33.6428ZM82.9746 12.6816C81.1216 12.6816 80 14.3506 80 17.1487C80 19.8977 81.1216 21.6159 82.9746 21.6159C84.8277 21.6159 85.9005 19.9468 85.9005 17.1487C85.9005 14.3506 84.8277 12.6816 82.9746 12.6816ZM112.755 20.4868C112.121 24.414 108.78 26.9175 103.587 26.9175C97.589 26.9175 93.9317 23.2972 93.9317 17.1978C93.9317 11.3562 97.6378 7.47809 103.441 7.47809C109.097 7.47809 112.755 11.1475 112.755 17.1487V18.7196H100.564V19.0141C100.564 20.8304 101.734 22.1559 103.733 22.1559C105.111 22.1559 106.22 21.5545 106.61 20.4868H112.755ZM103.587 12.2398C101.941 12.2398 100.6 13.3566 100.564 14.9888H106.562C106.525 13.3688 105.257 12.2398 103.587 12.2398ZM121.2 15.9706C121.213 14.1052 122.261 12.9761 123.931 12.9761C125.626 12.9761 126.626 14.1052 126.613 15.9706V26.5739H133.343V14.547C133.355 10.448 130.783 7.47809 126.808 7.47809C124.053 7.47809 121.871 8.92623 121.054 11.3071H120.859V7.72354H114.471V26.5739H121.2V15.9706ZM146.766 7.72354H153.836L147.546 26.5739H139.743L133.453 7.72354H140.524L143.547 20.1923H143.742L146.766 7.72354ZM163.123 26.9175C168.317 26.9175 171.657 24.414 172.291 20.4868H166.147C165.757 21.5545 164.647 22.1559 163.27 22.1559C161.27 22.1559 160.1 20.8304 160.1 19.0141V18.7196H172.291V17.1487C172.291 11.1475 168.634 7.47809 162.977 7.47809C157.174 7.47809 153.468 11.3562 153.468 17.1978C153.468 23.2972 157.125 26.9175 163.123 26.9175ZM160.1 14.9888C160.136 13.3566 161.477 12.2398 163.123 12.2398C164.793 12.2398 166.061 13.3688 166.098 14.9888H160.1ZM180.737 26.5739H174.007V7.72354H180.542V11.3071H180.737C181.419 8.65624 182.98 7.47809 184.979 7.47809C185.564 7.47809 186.15 7.57627 186.686 7.73581V13.5161C186.015 13.2829 184.894 13.1725 184.199 13.1725C182.212 13.1725 180.737 14.5961 180.737 16.756V26.5739ZM204.979 13.8597C204.808 9.8712 201.517 7.47809 196.104 7.47809C190.752 7.47809 187.448 9.68712 187.472 13.6143C187.448 16.5842 189.362 18.4864 193.178 19.1614L196.494 19.7505C197.957 20.0205 198.615 20.4132 198.64 21.125C198.615 21.9104 197.725 22.3522 196.494 22.3522C194.97 22.3522 193.897 21.6895 193.714 20.4868H187.034C187.399 24.3526 190.715 26.9175 196.445 26.9175C201.626 26.9175 205.442 24.3772 205.467 20.3395C205.442 17.5537 203.589 15.9338 199.761 15.2342L195.958 14.547C194.531 14.2893 194.129 13.7738 194.153 13.2216C194.129 12.4361 195.092 11.9943 196.25 11.9943C197.579 11.9943 198.688 12.7061 198.786 13.8597H204.979ZM225.156 20.4868C224.522 24.414 221.181 26.9175 215.988 26.9175C209.99 26.9175 206.332 23.2972 206.332 17.1978C206.332 11.3562 210.039 7.47809 215.842 7.47809C221.498 7.47809 225.156 11.1475 225.156 17.1487V18.7196H212.964V19.0141C212.964 20.8304 214.135 22.1559 216.134 22.1559C217.512 22.1559 218.621 21.5545 219.011 20.4868H225.156ZM215.988 12.2398C214.342 12.2398 213.001 13.3566 212.964 14.9888H218.962C218.926 13.3688 217.658 12.2398 215.988 12.2398Z" fill-rule="evenodd"/>+ <path class="1-1" d="M0.0856323 7.6075C0.0856323 11.7937 3.46313 15.215 7.64278 15.215V0C3.46313 0 0.0856323 3.4 0.0856323 7.6075Z"/>+ <path class="1-2" d="M11.1047 7.6075C11.1047 11.7937 14.4822 15.215 18.6619 15.215V0C14.5033 0 11.1047 3.4 11.1047 7.6075Z"/>+ <path class="1-3" d="M29.6809 15.215C33.8546 15.215 37.2381 11.809 37.2381 7.6075C37.2381 3.40599 33.8546 0 29.6809 0C25.5072 0 22.1238 3.40599 22.1238 7.6075C22.1238 11.809 25.5072 15.215 29.6809 15.215Z"/>+ <path class="2-1" d="M0.0856323 26.3924C0.0856323 30.6 3.46313 34 7.64278 34V18.8062C3.46313 18.8062 0.0856323 22.2062 0.0856323 26.3924Z"/>+ <path class="2-2" d="M11.1047 26.3288C11.1047 30.515 14.4822 33.9363 18.6619 33.9363V18.7425C14.5033 18.7425 11.1047 22.1425 11.1047 26.3288Z"/>+ <path class="2-3" d="M29.6809 33.9362C33.8546 33.9362 37.2381 30.5302 37.2381 26.3287C37.2381 22.1272 33.8546 18.7212 29.6809 18.7212C25.5072 18.7212 22.1238 22.1272 22.1238 26.3287C22.1238 30.5302 25.5072 33.9362 29.6809 33.9362Z"/>+ </g>+ </svg>+ </div>+{% endblock brand_content %}diff --git a/api/docs/conf.py b/api/docs/conf.pynew file mode 100644index 000000000..188071b27--- /dev/null+++ b/api/docs/conf.py@@ -0,0 +1,62 @@+# 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++import os+import sys++import django+++# Configure Django to work with Sphinx+# Pipenv populates DJANGO_SETTINGS_MODULE and DJANGO_SECRET_KEY from .env+sys.path.append(os.path.abspath(".."))+django.setup()++from django.conf import settings # noqa: E402+++# Project information+# ===================++project = "Openverse API developer docs"+author = "Openverse"+project_copyright = f"{author} <{settings.CONTACT_EMAIL}>"+++# General configuration+# =====================++# Sphinx plugins+extensions = ["sphinx.ext.todo", "sphinx.ext.autodoc", "myst_parser"]++source_suffix = {".rst": "restructuredtext", ".md": "markdown"}+templates_path = ["_templates"]+++# HTML+# ====++html_theme = "furo"++html_title = project+html_favicon = (+ "https://raw.githubusercontent.com/WordPress/openverse/master/brand/icon.svg"+)++html_theme_options = {+ "light_css_variables": {+ "color-brand-primary": "#c52b9b", # pink+ },+ "dark_css_variables": {+ "color-brand-primary": "#c52b9b", # pink+ },+}++# Static+# ======++html_static_path = ["_static"]+html_css_files = ["_css/brand.css"]diff --git a/api/docs/guides/deploy.md b/api/docs/guides/deploy.mdnew file mode 100644index 000000000..c52340924--- /dev/null+++ b/api/docs/guides/deploy.md@@ -0,0 +1,3 @@+# Deploy++🚧diff --git a/api/docs/guides/document.md b/api/docs/guides/document.mdnew file mode 100644index 000000000..fd3ea9a5b--- /dev/null+++ b/api/docs/guides/document.md@@ -0,0 +1,3 @@+# Document++🚧diff --git a/api/docs/guides/index.md b/api/docs/guides/index.mdnew file mode 100644index 000000000..713158cbe--- /dev/null+++ b/api/docs/guides/index.md@@ -0,0 +1,15 @@+# Guides++🚧++```{toctree}+:maxdepth: 2+:caption: Contents+:hidden:++quickstart+run+test+document+deploy+```diff --git a/api/docs/guides/quickstart.md b/api/docs/guides/quickstart.mdnew file mode 100644index 000000000..023ab19e6--- /dev/null+++ b/api/docs/guides/quickstart.md@@ -0,0 +1,79 @@+# Quickstart++## Prerequisites++- [Git](https://git-scm.com/downloads)+- [Docker](https://docs.docker.com/install/)+- [Docker Compose](https://docs.docker.com/compose/install/)+- [Just](https://github.com/casey/just)++## Steps++1. Ensure that the [Docker daemon](https://docs.docker.com/config/daemon/) is running.++2. Clone the repository and `cd` into it. This is the monorepo root.+ ```bash+ git clone https://github.com/WordPress/openverse-api.git+ cd openverse-api/+ ```++3. From the monorepo root, bring up the Docker Compose system. Docker Compose will automatically read the necessary environment variables from `env.docker` files from project directories.+ ```bash+ just up+ ```++4. Point your browser to `http://localhost:8000`. You should be able to see the API documentation.+ ++5. Load the sample data. This could take a couple of minutes.+ ```bash+ just init+ ```++6. Make an API request using cURL. You should receive a JSON response.+ ```bash+ just stats+ ```++ Piping the response through a pretty-printer like [`jq`](https://stedolan.github.io/jq/) should yield an output like the following.+ ```bash+ just stats | jq '.[0]'+ ```++ ```json+ {+ "source_name": "flickr",+ "display_name": "Flickr",+ "source_url": "https://www.flickr.com",+ "logo_url": null,+ "media_count": 1000+ }+ ```++7. When done, bring the system down. To remove all volumes as well, pass the `-v` flag.+ ```bash+ just down+ just down -v # removes volumes+ ```++8. Use the `logs` command access the logs from all services. To isolate a service, pass the service name as an argument.+ ```bash+ just logs+ just logs web # only shows logs web service+ ```++### Services++The command `just up` spawns the following services:++- [PostgreSQL](https://www.postgresql.org/) x 2 instances+ - upstream data source simulator+ - API application database+- [Elasticsearch](https://www.elastic.co/elasticsearch/)+- [Redis](https://redis.io/)+- [imageproxy](https://github.com/willnorris/imageproxy)+- **web** (`api/`)+- **ingestion_server** and **indexer_worker** (`ingestion_server/`)+- **analytics** (`analytics/`)++The last three are subprojects of this monorepo.diff --git a/api/docs/guides/run.md b/api/docs/guides/run.mdnew file mode 100644index 000000000..29f455da8--- /dev/null+++ b/api/docs/guides/run.md@@ -0,0 +1,41 @@+# Run++## Service++### Docker++To run the API inside Docker, follow the instructions in the {doc}`"Quickstart" <./quickstart>` document.++### On the host++#### Prerequisites++- [Pipenv](https://pipenv.pypa.io/en/latest/#install-pipenv-today)++#### Steps++1. Create environment variables from the stencil file.+ ```bash+ just env+ ```++2. Install Python dependencies.+ ```bash+ just install+ ```++3. Start the Django dev server.+ ```bash+ just dj runserver+ ```++## Django admin++You can view the custom administration views at the `/admin/` endpoint. You can use the username 'deploy' and password 'deploy' to log in.++## Configuration++All configuration is performed through environment variables. See the `env.template` file for a comprehensive list of all environment variables. The ones with sane defaults have been commented out.++- Pipenv will automatically load `.env` files when running commands with `pipenv run`.+- Docker Compose will automatically load `.env.docker` files inside the container.diff --git a/api/docs/guides/test.md b/api/docs/guides/test.mdnew file mode 100644index 000000000..056813121--- /dev/null+++ b/api/docs/guides/test.md@@ -0,0 +1,23 @@+# Test++## Docker++1. Before running the tests, make sure to initialise the system with data.+ ```bash+ just init+ ```+ This step is a part of the {doc}`"Quickstart" <./quickstart>` process.++3. Run the tests in an interactive TTY connected to a `web` container.+ ```bash+ just api-test+ ```++## On the host++1. Start the Django dev server. See the {doc}`"Run" <./run>` document for instructions.++2. Run the tests in a terminal on the host.+ ```bash+ just api-testlocal+ ```diff --git a/api/docs/index.md b/api/docs/index.mdnew file mode 100644index 000000000..26ff1223b--- /dev/null+++ b/api/docs/index.md@@ -0,0 +1,19 @@+# Openverse API developer docs++This documentation is focused towards developers who are building the Openverse API. The consumer documentation for the Openverse API can be found [here](https://api.openverse.engineering/).++```{toctree}+:maxdepth: 2+:caption: Contents+:hidden:++guides/index+reference/index+```++```{toctree}+:caption: External links+:hidden:++GitHub repo <https://github.com/WordPress/openverse-api>+```diff --git a/api/docs/reference/api/constants.rst b/api/docs/reference/api/constants.rstnew file mode 100644index 000000000..1281ac121--- /dev/null+++ b/api/docs/reference/api/constants.rst@@ -0,0 +1,21 @@+catalog.api.constants package+=============================++Submodules+----------++catalog.api.constants.media\_types module+-----------------------------------------++.. automodule:: catalog.api.constants.media_types+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: catalog.api.constants+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/api/docs/reference/api/controllers.rst b/api/docs/reference/api/controllers.rstnew file mode 100644index 000000000..9dc3cb80e--- /dev/null+++ b/api/docs/reference/api/controllers.rst@@ -0,0 +1,21 @@+catalog.api.controllers package+===============================++Submodules+----------++catalog.api.controllers.search\_controller module+-------------------------------------------------++.. automodule:: catalog.api.controllers.search_controller+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: catalog.api.controllers+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/api/docs/reference/api/docs.rst b/api/docs/reference/api/docs.rstnew file mode 100644index 000000000..155a65bdd--- /dev/null+++ b/api/docs/reference/api/docs.rst@@ -0,0 +1,37 @@+catalog.api.docs package+========================++Submodules+----------++catalog.api.docs.audio\_docs module+-----------------------------------++.. automodule:: catalog.api.docs.audio_docs+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.docs.image\_docs module+-----------------------------------++.. automodule:: catalog.api.docs.image_docs+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.docs.media\_docs module+-----------------------------------++.. automodule:: catalog.api.docs.media_docs+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: catalog.api.docs+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/api/docs/reference/api/examples.rst b/api/docs/reference/api/examples.rstnew file mode 100644index 000000000..fdf1f82f5--- /dev/null+++ b/api/docs/reference/api/examples.rst@@ -0,0 +1,45 @@+catalog.api.examples package+============================++Submodules+----------++catalog.api.examples.audio\_requests module+-------------------------------------------++.. automodule:: catalog.api.examples.audio_requests+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.examples.audio\_responses module+--------------------------------------------++.. automodule:: catalog.api.examples.audio_responses+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.examples.image\_requests module+-------------------------------------------++.. automodule:: catalog.api.examples.image_requests+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.examples.image\_responses module+--------------------------------------------++.. automodule:: catalog.api.examples.image_responses+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: catalog.api.examples+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/api/docs/reference/api/index.rst b/api/docs/reference/api/index.rstnew file mode 100644index 000000000..3a8e539d2--- /dev/null+++ b/api/docs/reference/api/index.rst@@ -0,0 +1,52 @@+catalog.api package+===================++Subpackages+-----------++.. toctree::+ :maxdepth: 4++ constants+ controllers+ docs+ examples+ models+ serializers+ utils+ views++Submodules+----------++catalog.api.admin module+------------------------++.. automodule:: catalog.api.admin+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.apps module+-----------------------++.. automodule:: catalog.api.apps+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.licenses module+---------------------------++.. automodule:: catalog.api.licenses+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: catalog.api+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/api/docs/reference/api/models.rst b/api/docs/reference/api/models.rstnew file mode 100644index 000000000..c83d4d802--- /dev/null+++ b/api/docs/reference/api/models.rst@@ -0,0 +1,69 @@+catalog.api.models package+==========================++Submodules+----------++catalog.api.models.audio module+-------------------------------++.. automodule:: catalog.api.models.audio+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.models.base module+------------------------------++.. automodule:: catalog.api.models.base+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.models.image module+-------------------------------++.. automodule:: catalog.api.models.image+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.models.media module+-------------------------------++.. automodule:: catalog.api.models.media+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.models.mixins module+--------------------------------++.. automodule:: catalog.api.models.mixins+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.models.models module+--------------------------------++.. automodule:: catalog.api.models.models+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.models.oauth module+-------------------------------++.. automodule:: catalog.api.models.oauth+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: catalog.api.models+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/api/docs/reference/api/serializers.rst b/api/docs/reference/api/serializers.rstnew file mode 100644index 000000000..8be42e43e--- /dev/null+++ b/api/docs/reference/api/serializers.rst@@ -0,0 +1,61 @@+catalog.api.serializers package+===============================++Submodules+----------++catalog.api.serializers.audio\_serializers module+-------------------------------------------------++.. automodule:: catalog.api.serializers.audio_serializers+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.serializers.error\_serializers module+-------------------------------------------------++.. automodule:: catalog.api.serializers.error_serializers+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.serializers.image\_serializers module+-------------------------------------------------++.. automodule:: catalog.api.serializers.image_serializers+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.serializers.media\_serializers module+-------------------------------------------------++.. automodule:: catalog.api.serializers.media_serializers+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.serializers.oauth2\_serializers module+--------------------------------------------------++.. automodule:: catalog.api.serializers.oauth2_serializers+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.serializers.provider\_serializers module+----------------------------------------------------++.. automodule:: catalog.api.serializers.provider_serializers+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: catalog.api.serializers+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/api/docs/reference/api/utils.rst b/api/docs/reference/api/utils.rstnew file mode 100644index 000000000..f9ee5e090--- /dev/null+++ b/api/docs/reference/api/utils.rst@@ -0,0 +1,101 @@+catalog.api.utils package+=========================++Submodules+----------++catalog.api.utils.ccrel module+------------------------------++.. automodule:: catalog.api.utils.ccrel+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.utils.dead\_link\_mask module+-----------------------------------------++.. automodule:: catalog.api.utils.dead_link_mask+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.utils.exceptions module+-----------------------------------++.. automodule:: catalog.api.utils.exceptions+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.utils.oauth2\_helper module+---------------------------------------++.. automodule:: catalog.api.utils.oauth2_helper+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.utils.pagination module+-----------------------------------++.. automodule:: catalog.api.utils.pagination+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.utils.scheduled\_tasks module+-----------------------------------------++.. automodule:: catalog.api.utils.scheduled_tasks+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.utils.status\_code\_view module+-------------------------------------------++.. automodule:: catalog.api.utils.status_code_view+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.utils.throttle module+---------------------------------++.. automodule:: catalog.api.utils.throttle+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.utils.validate\_images module+-----------------------------------------++.. automodule:: catalog.api.utils.validate_images+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.utils.watermark module+----------------------------------++.. automodule:: catalog.api.utils.watermark+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.utils.waveform module+---------------------------------++.. automodule:: catalog.api.utils.waveform+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: catalog.api.utils+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/api/docs/reference/api/views.rst b/api/docs/reference/api/views.rstnew file mode 100644index 000000000..608a515de--- /dev/null+++ b/api/docs/reference/api/views.rst@@ -0,0 +1,53 @@+catalog.api.views package+=========================++Submodules+----------++catalog.api.views.audio\_views module+-------------------------------------++.. automodule:: catalog.api.views.audio_views+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.views.health\_views module+--------------------------------------++.. automodule:: catalog.api.views.health_views+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.views.image\_views module+-------------------------------------++.. automodule:: catalog.api.views.image_views+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.views.media\_views module+-------------------------------------++.. automodule:: catalog.api.views.media_views+ :members:+ :undoc-members:+ :show-inheritance:++catalog.api.views.oauth2\_views module+--------------------------------------++.. automodule:: catalog.api.views.oauth2_views+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: catalog.api.views+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/api/docs/reference/index.rst b/api/docs/reference/index.rstnew file mode 100644index 000000000..2e8a6f39a--- /dev/null+++ b/api/docs/reference/index.rst@@ -0,0 +1,30 @@+Code reference+==============++Subpackages+-----------++.. toctree::+ :maxdepth: 4++ api/index+ urls++Submodules+----------++catalog.custom\_auto\_schema module+-----------------------------------++.. automodule:: catalog.custom_auto_schema+ :members:+ :undoc-members:+ :show-inheritance:++catalog.example\_responses module+---------------------------------++.. automodule:: catalog.example_responses+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/api/docs/reference/urls.rst b/api/docs/reference/urls.rstnew file mode 100644index 000000000..bd457d569--- /dev/null+++ b/api/docs/reference/urls.rst@@ -0,0 +1,29 @@+catalog.urls package+====================++Submodules+----------++catalog.urls.auth\_tokens module+--------------------------------++.. automodule:: catalog.urls.auth_tokens+ :members:+ :undoc-members:+ :show-inheritance:++catalog.urls.swagger module+---------------------------++.. automodule:: catalog.urls.swagger+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: catalog.urls+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/docker-compose.yml b/docker-compose.ymlindex cd49d8b6b..cadfd0e19 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -70,6 +70,7 @@ services:- ./api:/apiports:- "8000:8000"+ - "3000:3000"depends_on:- db- esdiff --git a/justfile b/justfileindex f0e83349b..e28fd1008 100644--- a/justfile+++ b/justfile@@ -141,6 +141,7 @@ _ing-api model action port="8001":ing-testlocal *args:cd ingestion_server && pipenv run ./test/run_test.sh {{ args }}+######## API ########@@ -190,3 +191,20 @@ _nl-install:nl-test args="":docker-compose exec {{ args }} analytics pytest tests.py+++##########+# Sphinx #+##########++# Compile Sphinx documentation into HTML output+sphinx-make service="web": up wait-for-es wait-for-ing wait-for-web+ docker-compose exec {{ service }} sphinx-build -M html docs/ build/++# Serve Sphinx documentation via a live-reload server+sphinx-live service="web" port="3000": up wait-for-es wait-for-ing wait-for-web+ docker-compose exec {{ service }} sphinx-autobuild --host 0.0.0.0 --port {{ port }} docs/ build/html/++# Serve the Sphinx documentation from the HTML output directory+sphinx-serve dir="api" port="3001":+ cd {{ dir }}/build/html && pipenv run python -m http.server {{ port }}diff --git a/readme_assets/api_redoc.png b/readme_assets/api_redoc.pngdeleted file mode 100644index b13147bbf..000000000Binary files a/readme_assets/api_redoc.png and /dev/null differ