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
14 changes: 3 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Install and run locally from a virtual environment
#. For docs (next step requires ``gettext``)::

python -m manage loaddata doc_releases
python -m manage update_docs --update-index
python -m manage update_docs

#. For dashboard:

Expand Down Expand Up @@ -236,16 +236,8 @@ minified version of it to this directory.
Documentation search
--------------------

When running ``python -m manage update_docs --update-index`` to build all
documents it will also automatically index every document it builds in the
search engine as well. In case you've already built the documents and would like
to reindex the search index, run the command::

python -m manage update_index

This is also the right command to run when you work on the search feature
itself. You can pass the ``-d`` option to try to drop the search index
first before indexing all the documents.
When running ``python -m manage update_docs`` to build all documents it will
also automatically index every document it builds in the search engine as well.

Updating metrics from production
--------------------------------
Expand Down
1 change: 0 additions & 1 deletion docker-entrypoint.dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ python -m manage loaddata doc_releases
python -m manage loaddata dashboard_production_metrics
# python -m manage loaddata dashboard_example_data
python -m manage update_metrics
#python -m manage update_index

exec "$@"
24 changes: 0 additions & 24 deletions docs/management/commands/update_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ def add_arguments(self, parser):
action="store_true",
help="Ask before building each version",
)
parser.add_argument(
"--update-index",
action="store_true",
dest="update_index",
default=False,
help="Also update the search vector field.",
)
parser.add_argument(
"--purge-cache",
action="store_true",
Expand Down Expand Up @@ -98,25 +91,19 @@ def _get_doc_releases(self, versions, options):

def handle(self, *versions, **kwargs):
self.verbosity = kwargs["verbosity"]
self.update_index = kwargs["update_index"]
self.purge_cache = kwargs["purge_cache"]

self.default_builders = ["json", "djangohtml"]

# Keep track of which Git sources have been updated, e.g.,
# {'1.8': True} if the 1.8 docs updated.
self.release_docs_changed = {}
# Only update the index if some docs rebuild.
self.update_index_required = False

for release in self._get_doc_releases(versions, kwargs):
self.build_doc_release(
release, force=kwargs["force"], interactive=kwargs["interactive"]
)

if self.update_index_required:
call_command("update_index", **{"verbosity": self.verbosity})

if self.purge_cache:
changed_versions = {
version
Expand Down Expand Up @@ -172,8 +159,6 @@ def build_doc_release(self, release, force=False, interactive=False):
)
return

self.update_index_required = self.update_index

source_dir = checkout_dir.joinpath("docs")

if release.lang != "en":
Expand Down Expand Up @@ -288,15 +273,6 @@ def zipfile_inclusion_filter(file_path):
if release.is_default:
self._setup_stable_symlink(release, built_dir)

#
# Rebuild the imported document list and search index.
#
if not self.update_index:
return

if self.verbosity >= 2:
self.stdout.write(" reindexing...")

json_built_dir = parent_build_dir.joinpath("_built", "json")
documents = gen_decoded_documents(json_built_dir)
release.sync_to_db(documents)
Expand Down
28 changes: 0 additions & 28 deletions docs/management/commands/update_index.py

This file was deleted.

Loading