Commit 7f859111 authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Tweak documentation (#2152)

Summary:
- Change the version of nightly build to `Nightly Build (VERSION)`.
- Use `BUILD_VERSION` env var for release.
- Automatically change copyright year.
- Update the link to nightly in README so that the main branch directs to the corresponding document.

Because of the way CI job is setup, the resulting documentation says 0.8.0. This is fixed by https://github.com/pytorch/audio/issues/2151.

Pull Request resolved: https://github.com/pytorch/audio/pull/2152

Reviewed By: carolineechen, nateanl

Differential Revision: D33585053

Pulled By: mthrok

fbshipit-source-id: 3c2bf9fc3214c89f989f5ac65b74bc1e276a7161
parent 7b6b2d00
......@@ -2,7 +2,7 @@ torchaudio: an audio library for PyTorch
========================================
[![Build Status](https://circleci.com/gh/pytorch/audio.svg?style=svg)](https://app.circleci.com/pipelines/github/pytorch/audio)
[![Documentation](https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Ftorchaudio%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v)](https://pytorch.org/audio/)
[![Documentation](https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Ftorchaudio%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v)](https://pytorch.org/audio/main/)
[![Anaconda Badge](https://anaconda.org/pytorch/torchaudio/badges/downloads.svg)](https://anaconda.org/pytorch/torchaudio)
[![Anaconda-Server Badge](https://anaconda.org/pytorch/torchaudio/badges/platforms.svg)](https://anaconda.org/pytorch/torchaudio)
......@@ -15,14 +15,14 @@ processing library. The benefits of PyTorch can be seen in torchaudio through
having all the computations be through PyTorch operations which makes it easy
to use and feel like a natural extension.
- [Support audio I/O (Load files, Save files)](http://pytorch.org/audio/stable/)
- [Support audio I/O (Load files, Save files)](http://pytorch.org/audio/main/)
- Load a variety of audio formats, such as `wav`, `mp3`, `ogg`, `flac`, `opus`, `sphere`, into a torch Tensor using SoX
- [Kaldi (ark/scp)](http://pytorch.org/audio/stable/kaldi_io.html)
- [Dataloaders for common audio datasets](http://pytorch.org/audio/stable/datasets.html)
- [Kaldi (ark/scp)](http://pytorch.org/audio/main/kaldi_io.html)
- [Dataloaders for common audio datasets](http://pytorch.org/audio/main/datasets.html)
- Common audio transforms
- [Spectrogram, AmplitudeToDB, MelScale, MelSpectrogram, MFCC, MuLawEncoding, MuLawDecoding, Resample](http://pytorch.org/audio/stable/transforms.html)
- [Spectrogram, AmplitudeToDB, MelScale, MelSpectrogram, MFCC, MuLawEncoding, MuLawDecoding, Resample](http://pytorch.org/audio/main/transforms.html)
- Compliance interfaces: Run code using PyTorch that align with other libraries
- [Kaldi: spectrogram, fbank, mfcc](https://pytorch.org/audio/stable/compliance.kaldi.html)
- [Kaldi: spectrogram, fbank, mfcc](https://pytorch.org/audio/main/compliance.kaldi.html)
Dependencies
------------
......@@ -115,7 +115,7 @@ torchaudio.save('foo_save.wav', waveform, sample_rate) # save tensor to file, a
API Reference
-------------
API Reference is located here: http://pytorch.org/audio/
API Reference is located here: http://pytorch.org/audio/main/
Contributing Guidelines
-----------------------
......
......@@ -23,6 +23,7 @@
import os
import re
import warnings
from datetime import datetime
import pytorch_sphinx_theme
......@@ -139,19 +140,22 @@ master_doc = "index"
# General information about the project.
project = "Torchaudio"
copyright = "2018, Torchaudio Contributors"
copyright = f"{datetime.now().year}, Torchaudio Contributors"
author = "Torchaudio Contributors"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
# TODO: change to [:2] at v1.0
version = "main "
# The full version, including alpha/beta/rc tags.
# TODO: verify this works as expected
release = "main"
# `version` is visible from users
# `release` is used for metadata
if os.getenv("BUILD_VERSION"):
version = release = os.environ["BUILD_VERSION"]
else:
import torchaudio
version = f"Nightly Build ({torchaudio.__version__})"
release = "nightly"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment