Skip to content

Update docs #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 23, 2025
Merged
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
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -25,3 +25,7 @@

html_theme = "alabaster"
html_static_path = ["_static"]
html_theme_options = {
"show_relbar_top": False,
"show_relbar_bottom": True,
}
3 changes: 2 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -25,7 +25,8 @@ Table of Contents
.. toctree::
:maxdepth: 3

installation/index
installation
usage
third-party-library-support/index
supported-libraries/index

38 changes: 38 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Installation
============

Clone the repository
--------------------

::

git clone https://github.com/mongodb-labs/django-mongodb-cli
cd django-mongodb-cli


Create a virtual environment
----------------------------

::

python -m venv .venv
source .venv/bin/activate


Install ``dm`` command
----------------------

::

python -m pip install -e .

.. _additional-installation-steps:

Additional installation steps
-----------------------------

Clone third-party library repositories and install dependencies with ``just``.

::

just install
51 changes: 0 additions & 51 deletions docs/source/installation/index.rst

This file was deleted.

19 changes: 19 additions & 0 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Usage
=====

Run third-party library tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

django-allauth
++++++++++++++

.. warning::

If you install ``lxml`` and ``xmlsec`` via ``pip`` instead of
``just install`` :ref:`as described here <additional-installation-steps>`
you may encounter test failures due to `issues like this one
<https://github.com/xmlsec/python-xmlsec/issues/320>`_.

::

dm repo test django-allauth
6 changes: 6 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -5,9 +5,11 @@ install: pip-install git-clone dev-install
alias i := install

dev-install:
dm repo install django
dm repo install django-mongodb-backend
dm repo install django-mongodb-extensions
dm repo install mongo-python-driver
dm repo install python-xmlsec


demo:
@@ -21,12 +23,15 @@ alias d := demo

[group('git')]
git-clone:
dm repo clone django
dm repo clone django-allauth
dm repo clone django-mongodb-app
dm repo clone django-mongodb-backend
dm repo clone django-mongodb-extensions
dm repo clone django-mongodb-project
dm repo clone django-mongodb-templates
dm repo clone mongo-python-driver
dm repo clone python-xmlsec

# ---------------------------------------- django ----------------------------------------

@@ -63,6 +68,7 @@ db-init:
[group('python')]
pip-install: check-venv
brew install libxml2 libxmlsec1 pkg-config
pip install lxml==5.3.2 --no-binary :all:
pip install -U pip
pip install -e .
pre-commit install
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@ dependencies = [
"dj-database-url", # For startproject and testing with postgres
"fido2", # For django-allauth
"html5lib", # Required by django-debug-toolbar
"lxml==5.2.1", # For django-allauth
"psycopg2", # For django-allauth
"python3-openid", # For django-allauth
"python3-saml", # For django-allauth