Skip to content
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

Add smv_build_targets option to configure multiple build targets #74

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Commits on May 31, 2021

  1. Add ability to configure multiple build targets

    Add smv_build_targets configuration option. This will allow users to
    specify an arbitrary number of build targets to build for each version
    of the documentation, and specify whether it should be available to
    documentation consumers to download. This supports all sphinx builders,
    and output formats where there is a single output file. For build
    targets where there are multiple output files (such as html), all archive
    formats supported by shutil.make_archive are supported. Downloadable
    build targets are placed in an `artefacts/` directory within each
    versions build directory.
    
    Add smv_clean_intermediate_files configuration option. This will allow
    users to determine whether the intermediate files are removed or not.
    This is a useful configuration option where the generated build
    artefacts are not for public download consumption.
    
    Reorder build arguments passed to `sphinx` such that the source and
    build directory are the first two arguments. This is to ensure that
    there is compatability between the `-M` and `-b` sphinx build flags,
    which have slightly different APIs.
    samuel-emrys committed May 31, 2021
    Configuration menu
    Copy the full SHA
    21ea597 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2021

  1. Add method to discover artefact paths

    Add apathto method to discover artefact paths.
    
    Add dictionary comprehension to pair build target names and artefact
    paths to each version object. This will ensure that the build artefacts
    for the current build is accessible via the current_version key in
    html_context.
    
    Add modifier to replace slashes in branch names with hyphens for file
    naming purposes. This will ensure that the file name is not split and a
    truncated version used for the artefact name.
    
    Add shutil.py as a third party library to ensure backwards compatability
    can be achieved with python 3.6. shutil.copytree only accepts the
    dir_exists_ok argument from python 3.8.
    
    Add unit tests and update metadata schema with appropriate mocked
    objects for app configuration.
    samuel-emrys committed Jun 1, 2021
    Configuration menu
    Copy the full SHA
    53c48a5 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2021

  1. Add documentation for build target configuration

    Add documentation detailing appropriate configuration of the
    smv_build_targets configuration setting including exemplars to
    illustrate the features and also limitations of this feature.
    
    Add documentation detailing appropriate configuration of the
    smv_clean_intermediate_files configuration setting.
    
    Add exemplar usage of the new artefacts object in the html context
    within template files.
    
    Closes sphinx-contrib#70.
    samuel-emrys committed Jun 2, 2021
    Configuration menu
    Copy the full SHA
    c2903a9 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2021

  1. Add more advanced artefact file matching

    Add file matching that accounts for project names that include spaces
    and is case insensitive. This is to match how latex and other builders
    generate their artefacts.
    
    Use only the project name from the build configuration rather than the
    configuration on each branch to account for when the project name has
    been changed to display differently.
    samuel-emrys committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    40d6ff3 View commit details
    Browse the repository at this point in the history
  2. Pattern match artefacts when more than one result

    Refactored pattern matching to only match patterns when there's more
    than one result. When there's one result, this is assumed to be the
    build artefact, which should provide some flexibility for artefact
    recognition without sacrificing quality. This also opens the door for
    future filtering based on user specified patterns.
    samuel-emrys committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    3c9dcbc View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2021

  1. Add support to locate artefacts from nested paths

    Trying to access a download artefact from a page other than the root
    would fail to resolve the correct artefact path. This change adds
    support to resolve the correct path from any page the user is located
    on.
    
    Add unit tests to confirm this feature works as expected, and also to
    ensure artefacts are found correctly when the project name contains
    spaces and variable casing.
    samuel-emrys committed Jun 5, 2021
    Configuration menu
    Copy the full SHA
    cd72335 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2022

  1. Ensure non-downloadable build targets dont populate the artefacts htm…

    …l context
    
    * Add feature to ensure that build targets with downloadable=False don't
      populate the artifacts html context. This fixes a bug in which setting
      downloadable=False would provide a download link with the provided
      HTML jinja templates. Setting downloadable=False will now no longer
      result in a download link being made available.
    samuel-emrys committed Oct 26, 2022
    Configuration menu
    Copy the full SHA
    502b798 View commit details
    Browse the repository at this point in the history