diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 8c3e441e3..c76e69fca 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -99,15 +99,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python ${{ env.MAIN_PYTHON_VERSION }} uses: actions/setup-python@v6 with: python-version: ${{ env.MAIN_PYTHON_VERSION }} check-latest: true - name: install python dep run: | - pip install -e . - pip install -r docs/requirements.txt + python -m pip install --upgrade --no-cache-dir pip setuptools + python -m pip install --upgrade --no-cache-dir sphinx + python -m pip install --exists-action=w --no-cache-dir -r docs/requirements.txt + python -m pip install --no-cache-dir . - name: build doc run: | cd docs diff --git a/.readthedocs.yml b/.readthedocs.yml index a913f8426..1a50bfc07 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -15,11 +15,11 @@ python: - requirements: docs/requirements.txt # docs/conf.py is importing mongoengine # so mongoengine needs to be installed as well - - method: setuptools + - method: pip path: . # Specify the build environment build: os: ubuntu-22.04 tools: - python: "3.9" + python: "3.14" diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 887c5f019..678ef7654 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -95,7 +95,7 @@ Documentation ------------- To contribute to the `API documentation -`_ +`_ just make your changes to the inline documentation of the appropriate `source code `_ or `rst file `_ in a diff --git a/README.rst b/README.rst index db15293e2..c111addd4 100644 --- a/README.rst +++ b/README.rst @@ -25,6 +25,14 @@ MongoEngine .. image:: https://readthedocs.org/projects/mongoengine-odm/badge/?version=latest :target: https://readthedocs.org/projects/mongoengine-odm/builds/ +.. warning:: + + The official MongoEngine project is maintained on + `GitHub `_ and documented on + `ReadTheDocs `_. + ``mongoengine.org`` is no longer controlled by the MongoEngine project and + appears to be an expired domain takeover. + About ===== MongoEngine is a Python Object-Document Mapper for working with MongoDB. diff --git a/docs/Makefile b/docs/Makefile index 68149fe5a..e2ee4818e 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -36,7 +36,7 @@ html: @echo "Build finished. Check $(BUILDDIR)/html/index.html" html-readthedocs: - $(SPHINXBUILD) -T -E -b readthedocs $(ALLSPHINXOPTS) $(BUILDDIR)/html + python -m sphinx -T -b html -d $(BUILDDIR)/doctrees -D language=en . $(BUILDDIR)/html @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." @echo "Open in browser: file://`realpath $(BUILDDIR)/html/index.html`" diff --git a/docs/changelog.rst b/docs/changelog.rst index 394c419ba..1d3f3a693 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,6 +7,8 @@ Changelog Development =========== - (Fill this out as you fix issues and develop your features). +- Add a warning that ``mongoengine.org`` is no longer controlled by the MongoEngine + project and appears to be an expired domain takeover. - Fix querying GenericReferenceField with __in operator #2886 - Fix Document.compare_indexes() not working correctly for text indexes on multiple fields #2612 - Add support for transaction through run_in_transaction (kudos to juannyG for this) #2569 @@ -72,7 +74,7 @@ Changes in 0.27.0 - Added `mongo_client_class` optional parameter to connect() to allow to use an alternative mongo client than pymongo.MongoClient. Typically to support mock mongo libraries like mongomock, montydb, mongita #2729 - BREAKING CHANGE: connecting MongoEngine with mongomock should now use the new `mongo_client_class` - For more info, check https://docs.mongoengine.org/guide/mongomock.html + For more info, check https://mongoengine-odm.readthedocs.io/guide/mongomock.html - Fix DictField that always gets marked as changed #2606 - fix for Queryset.none() that has no effect on update/aggregate / first #2669 diff --git a/docs/conf.py b/docs/conf.py index 808deaa8b..d52ecb2be 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -100,7 +100,7 @@ # 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 = {"canonical_url": "http://docs.mongoengine.org/en/latest/"} +html_theme_options = {"canonical_url": "https://mongoengine-odm.readthedocs.io/"} # Add any paths that contain custom themes here, relative to this directory. html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] diff --git a/docs/index.rst b/docs/index.rst index e550760ce..c6f596532 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,6 +9,11 @@ MongoDB. To install it, simply run $ python -m pip install -U mongoengine +.. warning:: + + ``mongoengine.org`` is no longer controlled by the MongoEngine project and + appears to be an expired domain takeover. + :doc:`tutorial` A quick tutorial building a tumblelog to get you up and running with MongoEngine. diff --git a/setup.py b/setup.py index 7af6b7272..7f551e9ca 100644 --- a/setup.py +++ b/setup.py @@ -60,7 +60,7 @@ def get_version(version_tuple): author_email="harry.marr@gmail.com", maintainer="Bastien Gerard", maintainer_email="bast.gerard@gmail.com", - url="http://mongoengine.org/", + url="https://mongoengine-odm.readthedocs.io/", download_url="https://github.com/MongoEngine/mongoengine/tarball/master", license="MIT", include_package_data=True, diff --git a/tests/document/test_dynamic.py b/tests/document/test_dynamic.py index 170b2ea3d..cf11798a7 100644 --- a/tests/document/test_dynamic.py +++ b/tests/document/test_dynamic.py @@ -211,7 +211,7 @@ class Doc(DynamicDocument): Doc.drop_collection() doc = Doc() - embedded_doc_1 = Embedded(content="http://mongoengine.org") + embedded_doc_1 = Embedded(content="https://mongoengine-odm.readthedocs.io/") embedded_doc_1.validate() embedded_doc_2 = Embedded(content="this is not a url") diff --git a/tests/document/test_instance.py b/tests/document/test_instance.py index 1d1c0c23d..cf1c2e61b 100644 --- a/tests/document/test_instance.py +++ b/tests/document/test_instance.py @@ -1499,7 +1499,7 @@ class Doc(Document): map_field = MapField(IntField(), default=lambda: {"simple": 1}) decimal_field = DecimalField(default=1.0) complex_datetime_field = ComplexDateTimeField(default=datetime.now) - url_field = URLField(default="http://mongoengine.org") + url_field = URLField(default="https://mongoengine-odm.readthedocs.io/") dynamic_field = DynamicField(default=1) generic_reference_field = GenericReferenceField( default=lambda: Simple().save() diff --git a/tests/document/test_json_serialisation.py b/tests/document/test_json_serialisation.py index 61298ab17..93f6729c3 100644 --- a/tests/document/test_json_serialisation.py +++ b/tests/document/test_json_serialisation.py @@ -79,7 +79,7 @@ class Doc(Document): map_field = MapField(IntField(), default=lambda: {"simple": 1}) decimal_field = DecimalField(default=1.0) complex_datetime_field = ComplexDateTimeField(default=datetime.now) - url_field = URLField(default="http://mongoengine.org") + url_field = URLField(default="https://mongoengine-odm.readthedocs.io/") dynamic_field = DynamicField(default=1) generic_reference_field = GenericReferenceField( default=lambda: Simple().save() diff --git a/tests/queryset/test_queryset.py b/tests/queryset/test_queryset.py index 8386249f2..7a553d126 100644 --- a/tests/queryset/test_queryset.py +++ b/tests/queryset/test_queryset.py @@ -5207,7 +5207,7 @@ class Doc(Document): map_field = MapField(IntField(), default=lambda: {"simple": 1}) decimal_field = DecimalField(default=1.0) complex_datetime_field = ComplexDateTimeField(default=datetime.datetime.now) - url_field = URLField(default="http://mongoengine.org") + url_field = URLField(default="https://mongoengine-odm.readthedocs.io/") dynamic_field = DynamicField(default=1) generic_reference_field = GenericReferenceField( default=lambda: Simple().save()