Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 4373ecc6f4d857be4d05a63dafe2304ab3f4f81a authored by Petr Kungurtsev on 05 July 2022, 09:43:19 UTC, committed by GitHub on 05 July 2022, 09:43:19 UTC
Experimental Apple Silicon (M1) support (#1924)
1 parent 5110164
  • Files
  • Changes
  • c75bac1
  • /
  • doc
  • /
  • versions.py
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:4373ecc6f4d857be4d05a63dafe2304ab3f4f81a
directory badge Iframe embedding
swh:1:dir:1fe128b1f3833e4c540e8b5f767abde08485bc97
content badge Iframe embedding
swh:1:cnt:0e578616e0a9cb67863d2189bd7cd0fd90fb3bea
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
versions.py
# Copyright 2022 The GPflow Contributors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Code for keeping track of different versions of documentation.
"""
from enum import Enum
from pathlib import Path

# gpflow.__version__ does not seem reliable when used from a branch, so we read the VERSION file
# directly. (That's also a lot faster than importing gpflow...)
_GPFLOW_VERSION_FILE = Path(__file__).parent.parent / "VERSION"


class Branch(Enum):
    DEVELOP = "develop"
    """
    Building the `develop` branch means we're creating temporary documentation.

    Use this if in doubt.
    """

    MASTER = "master"
    """
    Building the `master` branch means we're creating a new release.
    """

    @property
    def version(self) -> str:
        """
        Returns the version of code / documentation this branch refers to.
        """
        if self == Branch.DEVELOP:
            return "develop"
        else:
            assert self == Branch.MASTER
            return _GPFLOW_VERSION_FILE.read_text().strip()
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top