From 6c8c52abeefb5ae8b9d13e7ece1d1c39ce8df3cc Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Sun, 18 Oct 2020 18:04:02 +1100 Subject: [PATCH 1/6] redirect sitemap urls --- maintainer/update_json_stubs_sitemap.py | 88 +++++++++++++++---------- 1 file changed, 54 insertions(+), 34 deletions(-) diff --git a/maintainer/update_json_stubs_sitemap.py b/maintainer/update_json_stubs_sitemap.py index b0c493e5f4e..d74d26cd4dc 100644 --- a/maintainer/update_json_stubs_sitemap.py +++ b/maintainer/update_json_stubs_sitemap.py @@ -100,7 +100,7 @@ def write_redirect(file, version='', outfile=None): latest_version = None for ver in versions[::-1]: - if 'dev' in ver['version']: + if '-dev' in ver['version']: dev_version = ver['version'] break else: @@ -117,10 +117,54 @@ def write_redirect(file, version='', outfile=None): # latest/index.html -> latest release (not dev docs) # stable/ : a copy of the release docs with the highest number (2.0.0 instead of 1.0.0) # dev/ : a copy of the develop docs with the highest number (2.0.0-dev instead of 1.0.1-dev) +# sitemap.xml files are updated by replacing URL strings + +def redirect_sitemap(old_version, new_version): + """Replace paths in copied sitemap.xml with new directory path + + Sitemaps can only contain URLs 'within' that directory structure. + For more, see https://www.sitemaps.org/faq.html#faq_sitemap_location + """ + file = f"{new_version}/sitemap.xml" + old = f"{URL}/{old_version}/" + new = f"{URL}/{new_version}/" + try: + with open(file, "r") as f: + contents = f.read() + except OSError: + raise ValueError(f"{file} not found") + redirected = contents.replace(old, new) + with open(file, "w") as f: + f.write(redirected) + print(f"Redirected URLs in {file} from {old} to {new}") + + +def add_or_update_version(version): + """Add or update the version path to versions.json""" + for ver in versions: + if ver["version"] == version: + ver["url"] = os.path.join(URL, version) + break + else: + versions.append({ + "version": version, + "display": version, + "url": os.path.join(URL, version), + "latest": False + }) + + +def copy_version(old_version, new_version): + """Copy docs from one directory to another with all bells and whistles""" + shutil.copytree(old_version, new_version) + print(f"Copied {old_version} to {new_version}") + redirect_sitemap(old_version, new_version) + add_or_update_version(new_version) + +# Copy stable/ docs and write redirects from root level docs if latest: - shutil.copytree(VERSION, "stable") - print(f"Copied {VERSION} to stable/") + copy_version(VERSION, "stable") html_files = glob.glob(f'stable/**/*.html', recursive=True) for file in html_files: # below should be true because we only globbed stable/* paths @@ -136,45 +180,21 @@ def write_redirect(file, version='', outfile=None): write_redirect(file, '', outfile) - - +# Separate just in case we update versions.json or muck around manually +# with docs if latest_version: write_redirect('index.html', "stable") write_redirect('index.html', latest_version, 'latest/index.html') - for ver in versions: - if ver["version"] == "stable": - ver["url"] = os.path.join(URL, "stable") - break - else: - versions.append({ - "version": "stable", - "display": "stable", - "url": os.path.join(URL, "stable"), - "latest": False - }) - - -if dev_version: - if dev_version == VERSION: - shutil.copytree(VERSION, "dev") - print(f"Copied {VERSION} to dev/") - - for ver in versions: - if ver["version"] == "dev": - ver["url"] = os.path.join(URL, "dev") - break - else: - versions.append({ - "version": "dev", - "display": "dev", - "url": os.path.join(URL, "dev"), - "latest": False - }) +# Copy dev/ docs +if dev_version and dev_version == VERSION: + copy_version(VERSION, "dev") +# update versions.json online with open("versions.json", 'w') as f: json.dump(versions, f, indent=2) + # ========= WRITE SUPER SITEMAP.XML ========= # make one big sitemap.xml ET.register_namespace('xhtml', "http://www.w3.org/1999/xhtml") From 197a9399208cbbd616ff95cbc5668c48e21707ce Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Sun, 18 Oct 2020 18:07:18 +1100 Subject: [PATCH 2/6] undo: change site to lilyminium's --- .travis.yml | 90 ++++++++++++++-------------- maintainer/deploy_docs_via_travis.sh | 2 +- package/doc/sphinx/source/conf.py | 2 +- 3 files changed, 47 insertions(+), 47 deletions(-) diff --git a/.travis.yml b/.travis.yml index bf09b8efadd..1441ab0bb89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,9 @@ os: env: global: - - secure: "VJ8cMKXuVe7e6vlBeUkd8j6wUbxYF0Yja6CHn0tmpzVGm3CCBXxoZcgvgtfyJTjf+2nqKIjsIy4FdYIkotXYaD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5ggox4vZVVgmlJo8KT6zonTNl8EdKwIzUDh1ZrpiNv3yMgt030heTFL6EJ30xRQJZkwwklJBPgDuARz2FxyKk+hO8IR7AuGLICwP1IpUASXaKeSD1K09qUnmB8W8RO5YhnLu7ABr6oghU9t63r1V0jLTCvYbO4SQIJ2muNsTay/rKo5QtzklPka/5Kud6KyIrsKb4=" - GH_DOC_BRANCH=develop - - GH_REPOSITORY=github.com/MDAnalysis/mdanalysis.git + - GH_REPOSITORY=github.com/lilyminium/mdanalysis.git - GIT_CI_USER=TravisCI - GIT_CI_EMAIL=TravisCI@mdanalysis.org - MDA_DOCDIR=${TRAVIS_BUILD_DIR}/package/doc/html/html @@ -42,11 +42,11 @@ env: matrix: # Run a coverage test for most versions - - CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" + # - CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" - PYTHON_VERSION=3.8 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" - - PYTHON_VERSION=3.7 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" - - NUMPY_VERSION=1.16.0 - - NUMPY_VERSION=dev EVENT_TYPE="cron" + # - PYTHON_VERSION=3.7 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" + # - NUMPY_VERSION=1.16.0 + # - NUMPY_VERSION=dev EVENT_TYPE="cron" matrix: fast_finish: true @@ -60,44 +60,44 @@ matrix: INSTALL_HOLE="false" PIP_DEPENDENCIES="${PIP_DEPENDENCIES} sphinx==1.8.5 sphinx-sitemap sphinx_rtd_theme msmb_theme==1.2.0" - - env: NAME="Lint" - PYLINTRC="${TRAVIS_BUILD_DIR}/package/.pylintrc" - MAIN_CMD="pylint --py3k package/MDAnalysis && pylint --py3k testsuite/MDAnalysisTests" - SETUP_CMD="" - BUILD_CMD="" - CONDA_DEPENDENCIES="" - INSTALL_HOLE="false" - - - env: NAME="asv check" - PYTHON_VERSION=3.6 - CODECOV="false" - MAIN_CMD="" - SETUP_CMD="" - PIP_DEPENDENCIES="${PIP_DEPENDENCIES} setuptools<45.0.0" - ASV_CHECK="true" - - - env: NAME="pypi check" - PYTHON_VERSION=3.7 - CODECOV="false" - MAIN_CMD="cd package && python setup.py" - SETUP_CMD="sdist" - BUILD_CMD="" - INSTALL_HOLE="false" - CONDA_DEPENDENCIES="setuptools cython twine" - PYPI_CHECK="true" - - - os: osx - env: PYTHON_VERSION=3.6 - NUMPY_VERSION=1.17.3 - - - env: NAME='minimal' - PIP_DEPENDENCIES="" - CONDA_DEPENDENCIES=${CONDA_MIN_DEPENDENCIES} - INSTALL_HOLE="false" - CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" - - allow_failures: - - env: NUMPY_VERSION=dev EVENT_TYPE="cron" + # - env: NAME="Lint" + # PYLINTRC="${TRAVIS_BUILD_DIR}/package/.pylintrc" + # MAIN_CMD="pylint --py3k package/MDAnalysis && pylint --py3k testsuite/MDAnalysisTests" + # SETUP_CMD="" + # BUILD_CMD="" + # CONDA_DEPENDENCIES="" + # INSTALL_HOLE="false" + + # - env: NAME="asv check" + # PYTHON_VERSION=3.6 + # CODECOV="false" + # MAIN_CMD="" + # SETUP_CMD="" + # PIP_DEPENDENCIES="${PIP_DEPENDENCIES} setuptools<45.0.0" + # ASV_CHECK="true" + + # - env: NAME="pypi check" + # PYTHON_VERSION=3.7 + # CODECOV="false" + # MAIN_CMD="cd package && python setup.py" + # SETUP_CMD="sdist" + # BUILD_CMD="" + # INSTALL_HOLE="false" + # CONDA_DEPENDENCIES="setuptools cython twine" + # PYPI_CHECK="true" + + # - os: osx + # env: PYTHON_VERSION=3.6 + # NUMPY_VERSION=1.17.3 + + # - env: NAME='minimal' + # PIP_DEPENDENCIES="" + # CONDA_DEPENDENCIES=${CONDA_MIN_DEPENDENCIES} + # INSTALL_HOLE="false" + # CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" + + # allow_failures: + # - env: NUMPY_VERSION=dev EVENT_TYPE="cron" before_install: # Workaround for Travis CI macOS bug (https://github.com/travis-ci/travis-ci/issues/6307) @@ -155,7 +155,7 @@ after_success: # turn off blocking as it causes large writes to stdout to fail # (see https://github.com/travis-ci/travis-ci/issues/4704) - | - if [[ ${TRAVIS_PULL_REQUEST} == "false" ]] && [[ ${BUILD_DOCS} == "true" ]] ; then + if [[ ${BUILD_DOCS} == "true" ]] ; then python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);' cd ${TRAVIS_BUILD_DIR}/package/MDAnalysis export GH_DOC_BRANCH=${TRAVIS_BRANCH} diff --git a/maintainer/deploy_docs_via_travis.sh b/maintainer/deploy_docs_via_travis.sh index 52c613e6b89..66c393e45ac 100644 --- a/maintainer/deploy_docs_via_travis.sh +++ b/maintainer/deploy_docs_via_travis.sh @@ -59,7 +59,7 @@ git reset upstream/gh-pages # dev/ is a copy of the dev docs with the highest number (so 2.0.0-dev instead of 1.0.1-dev) # stable/ is a copy of the release docs with the highest number mkdir latest -export URL="https://docs.mdanalysis.org" +export URL="https://minium.com.au/mdanalysis" python ${MAINTAIN_DIR}/update_json_stubs_sitemap.py touch . touch .nojekyll diff --git a/package/doc/sphinx/source/conf.py b/package/doc/sphinx/source/conf.py index a149c769a8f..992dc988dbc 100644 --- a/package/doc/sphinx/source/conf.py +++ b/package/doc/sphinx/source/conf.py @@ -49,7 +49,7 @@ # they are now at docs.mdanalysis.org/, which requires a CNAME DNS record # pointing to mdanalysis.github.io. To change this URL you should change/delete # the CNAME record for "docs" and update the URL in GitHub settings -site_url = "https://docs.mdanalysis.org/" +site_url = "https://minium.com.au/mdanalysis" # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] From 2ac8c5c82f90610cb63e95b4d0e062df6a146dfb Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Sun, 18 Oct 2020 19:09:49 +1100 Subject: [PATCH 3/6] test changed version --- package/MDAnalysis/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/MDAnalysis/version.py b/package/MDAnalysis/version.py index 0c6a22554ec..32ed65f97da 100644 --- a/package/MDAnalysis/version.py +++ b/package/MDAnalysis/version.py @@ -67,4 +67,4 @@ # e.g. with lib.log #: Release of MDAnalysis as a string, using `semantic versioning`_. -__version__ = "2.0.0-dev0" # NOTE: keep in sync with RELEASE in setup.py +__version__ = "1.0.0" # NOTE: keep in sync with RELEASE in setup.py From b8e2ef71eabcd7244b6ac798035c068186da75c0 Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Sun, 18 Oct 2020 19:18:14 +1100 Subject: [PATCH 4/6] Revert "test changed version" This reverts commit 2ac8c5c82f90610cb63e95b4d0e062df6a146dfb. --- package/MDAnalysis/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/MDAnalysis/version.py b/package/MDAnalysis/version.py index 32ed65f97da..0c6a22554ec 100644 --- a/package/MDAnalysis/version.py +++ b/package/MDAnalysis/version.py @@ -67,4 +67,4 @@ # e.g. with lib.log #: Release of MDAnalysis as a string, using `semantic versioning`_. -__version__ = "1.0.0" # NOTE: keep in sync with RELEASE in setup.py +__version__ = "2.0.0-dev0" # NOTE: keep in sync with RELEASE in setup.py From efa6721c0812346942b6ff4b577aff317edd067d Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Sun, 18 Oct 2020 19:18:24 +1100 Subject: [PATCH 5/6] Revert "undo: change site to lilyminium's" This reverts commit 197a9399208cbbd616ff95cbc5668c48e21707ce. --- .travis.yml | 90 ++++++++++++++-------------- maintainer/deploy_docs_via_travis.sh | 2 +- package/doc/sphinx/source/conf.py | 2 +- 3 files changed, 47 insertions(+), 47 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1441ab0bb89..bf09b8efadd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,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uT6D4z26fHVGzk4knMeTROCfHoZo2T8as5EeFDvcbXGva82BnF+aCFxj/d9f1VC3too7bsY+gBBUu/oxVizDWDEby+2Iz2EzUGG3YltF0MjaLrFQ5ggox4vZVVgmlJo8KT6zonTNl8EdKwIzUDh1ZrpiNv3yMgt030heTFL6EJ30xRQJZkwwklJBPgDuARz2FxyKk+hO8IR7AuGLICwP1IpUASXaKeSD1K09qUnmB8W8RO5YhnLu7ABr6oghU9t63r1V0jLTCvYbO4SQIJ2muNsTay/rKo5QtzklPka/5Kud6KyIrsKb4=" - GH_DOC_BRANCH=develop - - GH_REPOSITORY=github.com/lilyminium/mdanalysis.git + - GH_REPOSITORY=github.com/MDAnalysis/mdanalysis.git - GIT_CI_USER=TravisCI - GIT_CI_EMAIL=TravisCI@mdanalysis.org - MDA_DOCDIR=${TRAVIS_BUILD_DIR}/package/doc/html/html @@ -42,11 +42,11 @@ env: matrix: # Run a coverage test for most versions - # - CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" + - CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" - PYTHON_VERSION=3.8 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" - # - PYTHON_VERSION=3.7 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" - # - NUMPY_VERSION=1.16.0 - # - NUMPY_VERSION=dev EVENT_TYPE="cron" + - PYTHON_VERSION=3.7 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" + - NUMPY_VERSION=1.16.0 + - NUMPY_VERSION=dev EVENT_TYPE="cron" matrix: fast_finish: true @@ -60,44 +60,44 @@ matrix: INSTALL_HOLE="false" PIP_DEPENDENCIES="${PIP_DEPENDENCIES} sphinx==1.8.5 sphinx-sitemap sphinx_rtd_theme msmb_theme==1.2.0" - # - env: NAME="Lint" - # PYLINTRC="${TRAVIS_BUILD_DIR}/package/.pylintrc" - # MAIN_CMD="pylint --py3k package/MDAnalysis && pylint --py3k testsuite/MDAnalysisTests" - # SETUP_CMD="" - # BUILD_CMD="" - # CONDA_DEPENDENCIES="" - # INSTALL_HOLE="false" - - # - env: NAME="asv check" - # PYTHON_VERSION=3.6 - # CODECOV="false" - # MAIN_CMD="" - # SETUP_CMD="" - # PIP_DEPENDENCIES="${PIP_DEPENDENCIES} setuptools<45.0.0" - # ASV_CHECK="true" - - # - env: NAME="pypi check" - # PYTHON_VERSION=3.7 - # CODECOV="false" - # MAIN_CMD="cd package && python setup.py" - # SETUP_CMD="sdist" - # BUILD_CMD="" - # INSTALL_HOLE="false" - # CONDA_DEPENDENCIES="setuptools cython twine" - # PYPI_CHECK="true" - - # - os: osx - # env: PYTHON_VERSION=3.6 - # NUMPY_VERSION=1.17.3 - - # - env: NAME='minimal' - # PIP_DEPENDENCIES="" - # CONDA_DEPENDENCIES=${CONDA_MIN_DEPENDENCIES} - # INSTALL_HOLE="false" - # CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" - - # allow_failures: - # - env: NUMPY_VERSION=dev EVENT_TYPE="cron" + - env: NAME="Lint" + PYLINTRC="${TRAVIS_BUILD_DIR}/package/.pylintrc" + MAIN_CMD="pylint --py3k package/MDAnalysis && pylint --py3k testsuite/MDAnalysisTests" + SETUP_CMD="" + BUILD_CMD="" + CONDA_DEPENDENCIES="" + INSTALL_HOLE="false" + + - env: NAME="asv check" + PYTHON_VERSION=3.6 + CODECOV="false" + MAIN_CMD="" + SETUP_CMD="" + PIP_DEPENDENCIES="${PIP_DEPENDENCIES} setuptools<45.0.0" + ASV_CHECK="true" + + - env: NAME="pypi check" + PYTHON_VERSION=3.7 + CODECOV="false" + MAIN_CMD="cd package && python setup.py" + SETUP_CMD="sdist" + BUILD_CMD="" + INSTALL_HOLE="false" + CONDA_DEPENDENCIES="setuptools cython twine" + PYPI_CHECK="true" + + - os: osx + env: PYTHON_VERSION=3.6 + NUMPY_VERSION=1.17.3 + + - env: NAME='minimal' + PIP_DEPENDENCIES="" + CONDA_DEPENDENCIES=${CONDA_MIN_DEPENDENCIES} + INSTALL_HOLE="false" + CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis" + + allow_failures: + - env: NUMPY_VERSION=dev EVENT_TYPE="cron" before_install: # Workaround for Travis CI macOS bug (https://github.com/travis-ci/travis-ci/issues/6307) @@ -155,7 +155,7 @@ after_success: # turn off blocking as it causes large writes to stdout to fail # (see https://github.com/travis-ci/travis-ci/issues/4704) - | - if [[ ${BUILD_DOCS} == "true" ]] ; then + if [[ ${TRAVIS_PULL_REQUEST} == "false" ]] && [[ ${BUILD_DOCS} == "true" ]] ; then python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);' cd ${TRAVIS_BUILD_DIR}/package/MDAnalysis export GH_DOC_BRANCH=${TRAVIS_BRANCH} diff --git a/maintainer/deploy_docs_via_travis.sh b/maintainer/deploy_docs_via_travis.sh index 66c393e45ac..52c613e6b89 100644 --- a/maintainer/deploy_docs_via_travis.sh +++ b/maintainer/deploy_docs_via_travis.sh @@ -59,7 +59,7 @@ git reset upstream/gh-pages # dev/ is a copy of the dev docs with the highest number (so 2.0.0-dev instead of 1.0.1-dev) # stable/ is a copy of the release docs with the highest number mkdir latest -export URL="https://minium.com.au/mdanalysis" +export URL="https://docs.mdanalysis.org" python ${MAINTAIN_DIR}/update_json_stubs_sitemap.py touch . touch .nojekyll diff --git a/package/doc/sphinx/source/conf.py b/package/doc/sphinx/source/conf.py index 992dc988dbc..a149c769a8f 100644 --- a/package/doc/sphinx/source/conf.py +++ b/package/doc/sphinx/source/conf.py @@ -49,7 +49,7 @@ # they are now at docs.mdanalysis.org/, which requires a CNAME DNS record # pointing to mdanalysis.github.io. To change this URL you should change/delete # the CNAME record for "docs" and update the URL in GitHub settings -site_url = "https://minium.com.au/mdanalysis" +site_url = "https://docs.mdanalysis.org/" # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] From fb029cc50f01edb0e033911a70122719ddf1f821 Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Sun, 18 Oct 2020 20:03:43 +1100 Subject: [PATCH 6/6] pep8 --- maintainer/update_json_stubs_sitemap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maintainer/update_json_stubs_sitemap.py b/maintainer/update_json_stubs_sitemap.py index d74d26cd4dc..a4cd9e537bd 100644 --- a/maintainer/update_json_stubs_sitemap.py +++ b/maintainer/update_json_stubs_sitemap.py @@ -119,9 +119,10 @@ def write_redirect(file, version='', outfile=None): # dev/ : a copy of the develop docs with the highest number (2.0.0-dev instead of 1.0.1-dev) # sitemap.xml files are updated by replacing URL strings + def redirect_sitemap(old_version, new_version): """Replace paths in copied sitemap.xml with new directory path - + Sitemaps can only contain URLs 'within' that directory structure. For more, see https://www.sitemaps.org/faq.html#faq_sitemap_location """