diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37abed8..2053b7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: auto-update-conda: true auto-activate-base: true miniconda-version: 'latest' - python-version: "3.10" + python-version: "3.11" environment-file: lecture-python-programming.myst/environment.yml activate-environment: lecture-python-programming - name: Install quantecon-book-theme @@ -24,24 +24,6 @@ jobs: run: | pip uninstall -y quantecon-book-theme python -m pip install . - - name: Install sphinx-multitoc-numbering - shell: bash -l {0} - run: | - git clone https://github.com/executablebooks/sphinx-multitoc-numbering.git - cd sphinx-multitoc-numbering - python setup.py install - cd ../ && rm -rf sphinx-multitoc-numbering - - name: Install sphinx-exercise - shell: bash -l {0} - run: | - git clone https://github.com/executablebooks/sphinx-exercise.git - cd sphinx-exercise - python setup.py install - cd ../ && rm -rf sphinx-exercise - - name: Install Dependencies - shell: bash -l {0} - run: | - pip install jupyter-book - name: Display Conda Environment Versions shell: bash -l {0} run: conda list @@ -57,7 +39,7 @@ jobs: uses: nwtgck/actions-netlify@v1.1 with: publish-dir: 'lecture-python-programming.myst/_build/html/' - production-branch: master + production-branch: main github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: "Preview Deploy from GitHub Actions" env: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5960efa..1a6f7c2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,7 @@ name: continuous-integration on: push: - branches: [master] + branches: [main] tags: - 'v*' pull_request: @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: "3.11" - uses: pre-commit/action@v3.0.0 tests: @@ -22,14 +22,11 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.11"] # Only test the latest major release of Sphinx because otherwise we need to # keep multiple versions of regression tests on file and this creates lots of # noise in the tests. sphinx: ["~=5.0"] - include: - - os: macos-latest - python-version: 3.x runs-on: ${{ matrix.os }} steps: @@ -51,7 +48,7 @@ jobs: pytest --durations=10 --cov=quantecon_book_theme --cov-report=xml --cov-report=term-missing - name: Upload to Codecov - if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9 && github.repository == 'QuantEcon/quantecon-book-theme' && github.event_name == 'pull_request' + if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.11 && github.repository == 'QuantEcon/quantecon-book-theme' && github.event_name == 'pull_request' uses: codecov/codecov-action@v3.1.4 with: name: ebp-qbt-pytests-py3.7 @@ -70,7 +67,7 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" - name: Build package run: | python -m pip install -U pip build diff --git a/pyproject.toml b/pyproject.toml index e92c4f1..0fe6707 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,11 +70,11 @@ doc = [ test = [ "myst_nb", "coverage", - "pytest~=7.1", + "pytest", "pytest-cov", "beautifulsoup4", "sphinx_thebe", - "pytest-regressions~=2.0.1", + "pytest-regressions", "sphinx_copybutton", "sphinx_togglebutton", ] diff --git a/src/quantecon_book_theme/__init__.py b/src/quantecon_book_theme/__init__.py index 0ed1e5c..9a5eafd 100644 --- a/src/quantecon_book_theme/__init__.py +++ b/src/quantecon_book_theme/__init__.py @@ -230,8 +230,8 @@ def get_github_src_folder(app): if repo_url: branch = config_theme.get("repository_branch") if not branch: - # Explicitly check in cae branch is "" - branch = "master" + # Explicitly check in case branch is "" + branch = "main" relpath = config_theme.get("path_to_docs", "") org, repo = repo_url.strip("/").split("/")[-2:] context.update( diff --git a/src/quantecon_book_theme/assets/styles/index.scss b/src/quantecon_book_theme/assets/styles/index.scss index e0bc5dc..1ff36a4 100644 --- a/src/quantecon_book_theme/assets/styles/index.scss +++ b/src/quantecon_book_theme/assets/styles/index.scss @@ -1193,13 +1193,13 @@ tt { } } -div.admonition, .admonition { +div.admonition, +.admonition { font-size: 0.9rem; margin: 1.5rem auto; padding: 0 1rem 0.5rem 1rem; page-break-inside: avoid; - box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.1), - 0 0 0.05rem rgba(0, 0, 0, 0.1); + box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.1), 0 0 0.05rem rgba(0, 0, 0, 0.1); > .admonition-title { position: relative; margin: 0 -1rem; diff --git a/src/quantecon_book_theme/launch.py b/src/quantecon_book_theme/launch.py index 63490b6..7047bb3 100644 --- a/src/quantecon_book_theme/launch.py +++ b/src/quantecon_book_theme/launch.py @@ -182,5 +182,5 @@ def _is_notebook(app, pagename): def _get_branch(config_theme): branch = config_theme.get("nb_branch") if not branch: - branch = "master" + branch = "main" return branch diff --git a/tests/sites/base/conf.py b/tests/sites/base/conf.py index 3f2a46a..1a382f1 100644 --- a/tests/sites/base/conf.py +++ b/tests/sites/base/conf.py @@ -24,7 +24,7 @@ "repository_url": "https://github.com/executablebooks/sphinx-book-theme", "nb_repository_url": "https://github.com/executablebooks/sphinx-book-theme", "navigation_with_keys": True, - # "repository_branch": "master", # Not using this, should default to master + # "repository_branch": "main", # Not using this, should default to main "launch_buttons": { "binderhub_url": "https://mybinder.org", "jupyterhub_url": "https://datahub.berkeley.edu", diff --git a/tests/test_build/test_build_book.html b/tests/test_build/test_build_book.html index 455429b..f9af32a 100644 --- a/tests/test_build/test_build_book.html +++ b/tests/test_build/test_build_book.html @@ -23,38 +23,41 @@ 3. Section 1 index - - -