From cc59e246df9fe6aad5636de46079f1a5ede29453 Mon Sep 17 00:00:00 2001 From: byteskeptical <40208858+byteskeptical@users.noreply.github.com> Date: Fri, 9 Oct 2026 02:14:05 +0000 Subject: [PATCH] fix for doc site search, style fix for api diff table, style fix for API links in contents, bumping actions library version to 7 for setup-python and checkout in all workflows --- .github/workflows/document.yml | 7 +++--- .github/workflows/publish.yml | 4 ++-- .github/workflows/test.yml | 4 ++-- docs/conf.py | 11 +++++---- docs/index.rst | 26 ++++++++++---------- docs/sftpretty.rst | 43 +++++++++++++++++++++------------- 6 files changed, 54 insertions(+), 41 deletions(-) diff --git a/.github/workflows/document.yml b/.github/workflows/document.yml index 3c77a21a..aa1de10d 100644 --- a/.github/workflows/document.yml +++ b/.github/workflows/document.yml @@ -16,19 +16,18 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - python-version: ['3.13'] + python-version: ['3.14'] steps: - name: Clone Repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} - name: Build run: | python -m pip install -e ../.[doc] - mkdir _static make clean make html working-directory: ./docs diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 18b9671f..9c44e1a1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,11 +18,11 @@ jobs: steps: - name: Clone Repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 0 - name: Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} - name: Dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 089336b3..2ebd256d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,9 +22,9 @@ jobs: steps: - name: Clone Repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} - name: Runner Environment diff --git a/docs/conf.py b/docs/conf.py index 82fe0410..e8fff635 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,6 +14,7 @@ import sys from os import environ, path +from tomllib import load # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -31,6 +32,7 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.coverage', + 'sphinx_rtd_theme' ] # Add any paths that contain templates here, relative to this directory. @@ -53,10 +55,11 @@ # |version| and |release|, also used in various other places throughout the # built documents. # -# The short X.Y version. -version = '1.2.4' # The full version, including alpha/beta/rc tags. -release = '1.2.4' +with open('../pyproject.toml', 'rb') as pyproject: + release = load(pyproject)['project']['version'] +# The short X.Y version. +version = release # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -109,11 +112,9 @@ if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # otherwise, readthedocs uses their theme by default, so no need to specify it - # 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. diff --git a/docs/index.rst b/docs/index.rst index ca1339c2..30147c7b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -108,21 +108,23 @@ Example exceptions=socket.timeout, preserve_mtime=True, tries=11) -+-------------------+--------------------------+ -| API Diff | -+-------------------+--------------------------+ -| pysftp | sftpretty | -+===================+==========================+ -| cwd | cd [#]_ | -+-------------------+--------------------------+ -| makedirs | mkdir_p | -+-------------------+--------------------------+ -| walktree | {local,remote}tree [#]_ | -+-------------------+--------------------------+ +.. table:: API Diff + :class: center-cells + + +-------------------+--------------------------+ + | pysftp | sftpretty | + +===================+==========================+ + | cwd | cd [#]_ | + +-------------------+--------------------------+ + | makedirs | mkdir_p | + +-------------------+--------------------------+ + | walktree | {local,remote}tree [#]_ | + +-------------------+--------------------------+ .. [#] cwd() is a synonym for chdir(), use cd it's shorter and does the same thing. .. [#] Connection.walktree & sftp.walktree with explicit naming. -.. [*] [path_advance, path_retreat, reparent] no longer needed. +.. note:: ``path_advance``, ``path_retreat`` and ``reparent`` are no longer + needed and have been removed. Additional Information diff --git a/docs/sftpretty.rst b/docs/sftpretty.rst index 2ca4340b..e4df8d97 100644 --- a/docs/sftpretty.rst +++ b/docs/sftpretty.rst @@ -1,26 +1,37 @@ API === - + .. automodule:: sftpretty + + +:class:`~sftpretty.CnOpts` +-------------------------- +.. autoclass:: sftpretty.CnOpts :members: - - -SecurityOptions ---------------- + + +:class:`~sftpretty.Connection` +------------------------------ +.. autoclass:: sftpretty.Connection + :members: + + +:class:`~paramiko.transport.SecurityOptions` +-------------------------------------------- A simple object returned with available security preferences. - + See `Security Options `_ for details. - - -SFTPAttributes --------------- + + +:class:`~paramiko.sftp_attr.SFTPAttributes` +------------------------------------------- Representation of the attributes of a file or proxied file. - + See `SFTPAttributes `_ for details. - - -SFTPFile --------- + + +:class:`~paramiko.sftp_file.SFTPFile` +------------------------------------- Proxy object for a file on the remote server. - + See `SFTPFile `_ for details.