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

Documentation formatting #9

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b7eac7e
Create a symlink of tardis_example.yml (#1478)
yuyizheng1112 Apr 9, 2021
25a7a87
Fix macOS tests (pickle protocol 5) (#1535)
epassaro Apr 13, 2021
c14b2cd
Typos in git_workflow guide (#1530)
Molkree Apr 13, 2021
6816e21
Enable full tests for Formal Integral (#1499)
aribalam Apr 14, 2021
ee889c8
Change the default number of interpolate_shells for the formal integr…
chvogl Apr 14, 2021
a15551c
clean template files (#1538)
epassaro Apr 14, 2021
888575d
fix version number displayed in docs (#1540)
epassaro Apr 15, 2021
c60673b
Added workflow for Documentation preview generation (#1493)
aribalam Apr 21, 2021
f9b3ca8
String formatting changes fix issue #1205
yashagg2001 Apr 21, 2021
6b44bc8
Fix issue 1485 SDEC label bugs (#1531)
atharva-2001 Apr 22, 2021
2c845d8
Add ion contributions to SDEC plotter (#1539)
MarkMageeAstro Apr 23, 2021
747390d
Restructuring r_packet.py (#1543)
andrewfullard Apr 24, 2021
64a6369
resolves issue #1370 bad YAML Output (#1546)
atharva-2001 Apr 26, 2021
923e59d
Numba formal integral (#1549)
Rodot- Apr 30, 2021
c384d74
Adding Config Value Validation for Different Parameters via Config Fi…
DhruvSondhi May 4, 2021
e3a35bb
create update refdata pipeline (#1434)
epassaro May 5, 2021
92b7e1d
added symlinks for tardis_example.yml (#1562)
parikshit14 May 12, 2021
6e31dc4
better handling of pickle5 backport (#1566)
epassaro May 12, 2021
130475c
[build docs] fixing build problem (#1569)
isaacgsmith May 13, 2021
69b60ed
Revising "Packet Propagation" page of physics docs (#1528)
isaacgsmith May 14, 2021
5166037
Adding Instructions for enabling virtual_packet_logging (#1551)
DhruvSondhi May 14, 2021
7e1a513
Fixing Config Validator rst formatting (#1553)
DhruvSondhi May 14, 2021
f84c1d0
Added support for passing Configuration object in run_tardis (#1559)
aribalam May 14, 2021
bf46269
Revert "Adding Instructions for enabling virtual_packet_logging (#155…
jaladh-singhal May 17, 2021
8e5ffe1
Fixing virtual_packet_logging instructions for line info widget (#1575)
DhruvSondhi May 18, 2021
1d5221a
Changed Quickstart Example according to #1477 (#1557)
aribalam May 20, 2021
4aec164
minor changes to compare refdata pipeline (#1578)
epassaro May 20, 2021
d361a22
Fix numba deprecation (#1571)
KevinCawley May 20, 2021
9ce981d
Fixing Team Link redirection in Code Of Conduct
DhruvSondhi May 21, 2021
7eca324
Merge pull request #1582 from DhruvSondhi/code_of_conduct_link_fix
marxwillia May 21, 2021
af41d90
Fixing issues with Citations as well as label references
DhruvSondhi May 20, 2021
cb86689
Fixing relevant citation for propagation & nebular_plasma
DhruvSondhi May 21, 2021
551bb1f
Fixing relevant changes
DhruvSondhi May 21, 2021
b8f619d
[build docs]
DhruvSondhi May 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/documentation-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup TARDIS Environment
uses: conda-incubator/setup-miniconda@v2
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/documentation-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# For more information on how to use this pipeline please refer to:
# - http://tardis-sn.github.io/tardis/development/continuous_integration.html
# - https://tardis-sn.github.io/tardis/development/documentation_preview.html

name: documentation-preview

on:
push:

jobs:
documentation_preview:

# This workflow will be triggered:
#
# 1. Only on forks, never on main repository.
# 2. If the branch name contains the word `doc`.
# 3. If the commit message includes the tag `[build docs]`.

if: github.repository_owner != 'tardis-sn' && (contains(github.ref, 'doc') || contains(github.event.head_commit.message, '[build docs]'))

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
environment-file: tardis_env3.yml
activate-environment: tardis
use-mamba: true

- name: Install package
shell: bash -l {0}
run: python setup.py install

- name: Build documentation
shell: bash -l {0}
run: python setup.py build_docs

- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Deploy site
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: docs/_build/html/
destination_dir: branch/${{ steps.extract_branch.outputs.branch }}
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ As members of the community,

This code of conduct has been adapted from the Astropy Code of Conduct, which in turn uses parts of the PSF code of conduct.

**To report any violations of the code of conduct, please contact a member of the [TARDIS core team](https://tardis-sn.github.io/tardis/team.html) (the email tardis.supernova.code@gmail.com is monitored by the core team) or the Ombudsperson (see the [team page](https://tardis-sn.github.io/tardis/team.html); who is outside of the TARDIS collaboration and will treat reports confidentially).**
**To report any violations of the code of conduct, please contact a member of the [TARDIS core team](https://tardis-sn.github.io/tardis/team_and_governance/team.html) (the email tardis.supernova.code@gmail.com is monitored by the core team) or the Ombudsperson (see the [team page](https://tardis-sn.github.io/tardis/team_and_governance/team.html); who is outside of the TARDIS collaboration and will treat reports confidentially).**
23 changes: 17 additions & 6 deletions azure-pipelines/compare-refdata.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
# For more information on how to use this pipeline please refer to:
# http://tardis-sn.github.io/tardis/development/continuous_integration.html

# IMPORTANT: Only contributors with `Write` permission can trigger the build
# by commenting `/AzurePipelines run <pipeline-name>` on the pull
# request.
#
# This feature can be disabled only through the Azure Pipelines
# dashboard.

trigger: none
pr: [ master ]

pr:
branches:
include:
- '*'

schedules:
- cron: '0 0 1 * *'
Expand Down Expand Up @@ -30,6 +41,11 @@ jobs:
fetchRefdata: false # See the comment below.
useMamba: true

- bash: |
source activate tardis
$(package.manager) install bokeh=2.2 --channel conda-forge --no-update-deps --yes
displayName: 'Install Bokeh'

# Azure Repos requires token auth for public repositories containing LFS objects (bug).
# Fetch reference data from Azure with a PAT until a fix arrives.
- bash: |
Expand All @@ -53,11 +69,6 @@ jobs:
displayName: 'Generate reference data'
condition: or(eq(variables['ref1.hash'], ''), eq(variables['ref2.hash'], ''))

- bash: |
source activate tardis
$(package.manager) install bokeh=2.2 --channel conda-forge --no-update-deps --yes
displayName: 'Install Bokeh'

- bash: |
cd $(refdata.dir)/notebooks
source activate tardis
Expand Down
9 changes: 8 additions & 1 deletion azure-pipelines/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
# http://tardis-sn.github.io/tardis/development/continuous_integration.html

trigger:
- master
branches:
include:
- '*'

pr:
branches:
include:
- '*'

variables:
codecov.token: 'a876d307-9ed5-4f5d-a6c4-e58291ac4111'
Expand Down
74 changes: 74 additions & 0 deletions azure-pipelines/update-refdata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# For more information on how to use this pipeline please refer to:
# http://tardis-sn.github.io/tardis/development/continuous_integration.html

# IMPORTANT: Only contributors with `Write` permission can trigger the build
# by commenting `/AzurePipelines run <pipeline-name>` on the pull
# request.
#
# This feature can be disabled only through the Azure Pipelines
# dashboard.

trigger: none

pr:
branches:
include:
- master

variables:
system.debug: false
commit.sha: '$(Build.SourceVersion)'
pr.number: '$(System.PullRequest.PullRequestNumber)'
build.id: '$(Build.BuildId)'
job.id: '$(System.JobId)'
log.url: 'https://dev.azure.com/tardis-sn/TARDIS/_build/results?buildId=$(build.id)&view=logs&jobId=$(job.id)'

pool:
vmImage: 'ubuntu-latest'

jobs:
- job: 'push'
steps:
- template: templates/default.yml
parameters:
fetchRefdata: false # We don't want to fetch from the mirror
useMamba: true
skipInstall: false

- bash: git clone https://github.com/tardis-sn/tardis-refdata $(refdata.dir)
displayName: 'Fetch reference data repository'

- bash: |
cd $(tardis.dir)
source activate tardis
pytest tardis --tardis-refdata=$(refdata.dir) --generate-reference
displayName: 'Generate reference data'

- bash: |
cd $(refdata.dir)
git add unit_test_data.h5
git config --local user.email "wkerzendorf+tardis@gmail.com"
git config --local user.name "TARDIS Bot"
git commit -m "update reference data (pr $(pr.number))"
git remote set-url origin https://$(bot_token)@github.com/tardis-sn/tardis-refdata
git push origin master
displayName: 'Push new reference data'

# Run only if the pipeline is triggered by a pull request.
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- task: GitHubComment@0
inputs:
gitHubConnection: 'tardis-sn'
repositoryName: 'tardis-sn/tardis'
id: $(pr.number)
comment: '**Update succeeded** $(commit.sha) <br><br> Changes pushed to [tardis-sn/tardis-refdata](/tardis-sn/tardis-refdata).'
displayName: 'Post results (success)'

- task: GitHubComment@0
inputs:
gitHubConnection: 'tardis-sn'
repositoryName: 'tardis-sn/tardis'
id: $(pr.number)
comment: '**Update failed** $(commit.sha) <br><br> For more information, check the [job log]($(log.url)).'
displayName: 'Post results (failed)'
condition: failed()
13 changes: 11 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
# This does not *have* to match the package name, but typically does
project = "TARDIS"
author = "TARDIS collaboration"
copyright = "{0}-{1}, {2}".format(2013, datetime.datetime.now().year, author)
copyright = f"{2013}-{datetime.datetime.now().year}, {author}"

master_doc = "index"
# default_role = 'obj'
Expand Down Expand Up @@ -157,7 +157,8 @@

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
html_title = "{0} v{1}".format(project, release)

html_title = f"{project} v{release}"

# Output file base name for HTML help builder.
htmlhelp_basename = project + "doc"
Expand Down Expand Up @@ -199,6 +200,13 @@ def to_html_ext(path):
return os.path.splitext(path)[0] + ".html"


def autodoc_skip_member(app, what, name, obj, skip, options):
"""Exclude specific functions/methods from the documentation"""
exclusions = ("yaml_constructors", "yaml_implicit_resolvers")
exclude = name in exclusions
return skip or exclude


def create_redirect_files(app, docname):
"""Create redirect html files at old paths specified in `redirects` list."""
template_html_path = os.path.join(
Expand All @@ -223,4 +231,5 @@ def create_redirect_files(app, docname):


def setup(app):
app.connect("autodoc-skip-member", autodoc_skip_member)
app.connect("build-finished", create_redirect_files)
Loading