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

Enforce Sphinx docstring error and warning fixes #295

Merged
merged 7 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
DEFAULT_BRANCH: "master"
# If these SPHINXOPTS are enabled, then be strict about the
# builds and fail on any warnings.
#SPHINXOPTS: "-W --keep-going -T"
SPHINXOPTS: "-W --keep-going -T"
GENERATE_PDF: false # to enable, must be 'true' lowercase
GENERATE_SINGLEHTML: false # to enable, must be 'true' lowercase
PDF_FILENAME: lesson.pdf
Expand Down
15 changes: 14 additions & 1 deletion Documentation/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

import sys
import sys, os
from pathlib import Path

sys.path.insert(0, str(Path('..', '..').resolve()))
Expand All @@ -25,6 +25,13 @@
]

templates_path = ['_templates']
# Create a dummy _templates folder if it does not exist
try:
os.mkdir("_templates")
except:
pass


exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


Expand All @@ -35,3 +42,9 @@
html_theme = 'sphinx_rtd_theme'
html_logo = "logo_color.png"
html_static_path = ['_static']

# Create a dummy _static folder if it does not exist
try:
os.mkdir("_static")
except:
pass
2 changes: 1 addition & 1 deletion pyVlsv/vlsvreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@ def fsgrid_array_to_vg(self, array):
of this reader.

:param array: array with first three dimensions corresponding to the
dimensions of the fsgrid associated with this reader.
dimensions of the fsgrid associated with this reader.
:returns: Vlasov grid data (in file order) of array averaged to Vlasov Grid.
'''
cellIds=self.read_variable("CellID")
Expand Down
9 changes: 5 additions & 4 deletions scripts/magnetopause2d.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
'''
Finds the magnetopause position by tracing steamines of the plasma flow for two-dimensional Vlasiator runs. Needs the yt package.
'''

import matplotlib.pylab as plt
import numpy as np
import pytools as pt
Expand All @@ -6,10 +10,7 @@
from yt.visualization.api import Streamlines


'''
Finds the magnetopause position by tracing steamines of the plasma flow for two-dimensional Vlasiator runs
Needs the yt package
'''


def interpolate(streamline, x_points):

Expand Down
38 changes: 19 additions & 19 deletions scripts/magnetopause3d.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
'''
Finds the magnetopause position by tracing steamines of the plasma flow for three-dimensional Vlasiator runs. Needs the yt package.
'''
from pyCalculations import ids3d
import matplotlib.pylab as plt
import numpy as np
Expand All @@ -8,10 +11,7 @@
from mpl_toolkits import mplot3d
from yt.visualization.api import Streamlines

'''
Finds the magnetopause position by tracing steamines of the plasma flow for three-dimensional Vlasiator runs
Needs the yt package
'''



def to_Re(m): #meters to Re
Expand Down Expand Up @@ -64,21 +64,21 @@ def make_surface(coords):
How it works:
Three points make a triangle, triangles make the surface.
For every two planes next to each other:
take every other point from plane1, every other from plane2 (in order!)
from list of points: every three points closest to each other make a surface

Example:
plane 1: [v1, v2, v3, v4]
plane 2: [v5, v6, v7, v8]

-> list: [v1, v5, v2, v6, v3,...]
-> triangles:
v1 v5 v2
v5 v2 v6
v2 v6 v3
.
.
.
- take every other point from plane1, every other from plane2 (in order!)
- from list of points: every three points closest to each other make a surface

Example:
plane 1: [v1, v2, v3, v4]
plane 2: [v5, v6, v7, v8]

-> list: [v1, v5, v2, v6, v3,...]
-> triangles:
v1 v5 v2
v5 v2 v6
v2 v6 v3
.
.
.

'''
verts = [] #points
Expand Down