Skip to content

Commit

Permalink
Merge pull request #633 from RocketPy-Team/dev/setting-up-vscode
Browse files Browse the repository at this point in the history
DEV: setting up vscode workspace
  • Loading branch information
Gui-FernandesBR authored Jul 12, 2024
2 parents 758f29d + 4de2918 commit 2defa9a
Show file tree
Hide file tree
Showing 6 changed files with 252 additions and 17 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,6 @@ cython_debug/
*.docx
*.pdf

# VSCode project settings
.vscode/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
Expand Down
23 changes: 23 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"recommendations": [
"ambooth.git-rename",
"github.vscode-pull-request-github",
"gruntfuggly.todo-tree",
"mechatroner.rainbow-csv",
"ms-python.black-formatter",
"ms-python.debugpy",
"ms-python.pylint",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"ms-toolsai.jupyter-keymap",
"ms-toolsai.jupyter-renderers",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-toolsai.vscode-jupyter-slideshow",
"ms-vscode.cmake-tools",
"ms-vscode.makefile-tools",
"njpwerner.autodocstring",
"streetsidesoftware.code-spell-checker",
"trond-snekvik.simple-rst",
]
}
214 changes: 214 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
{
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"autoDocstring.docstringFormat": "numpy",
"cSpell.enableFiletypes": [
"python",
"jupyter",
"markdown",
"restructuredtext"
],
"cSpell.language": "en-US",
"cSpell.words": [
"Abdulklech",
"adjugate",
"akima",
"allclose",
"altitudemode",
"Alves",
"amax",
"arange",
"arccos",
"arcsin",
"arctan",
"argmax",
"argmin",
"argsort",
"atol",
"attrname",
"autoclass",
"autofetch",
"autopep",
"autouse",
"axhline",
"axup",
"axvline",
"behaviour",
"bijective",
"brentq",
"Calebe",
"calisto",
"Calisto",
"Cardano's",
"cardanos",
"carlo",
"CDEFGHJKLMNPQRSTUVWXX",
"Ceotto",
"cesaroni",
"Cesaroni",
"cftime",
"changealphaint",
"Chassikos",
"clabel",
"clalpha",
"cmap",
"cmcens",
"coeff",
"coeffs",
"colorbar",
"colormaps",
"contourf",
"conusnest",
"cstride",
"csys",
"datapoints",
"ddot",
"deletechars",
"dimgrey",
"discretizes",
"disp",
"dtype",
"ECMWF",
"edgecolor",
"epsabs",
"epsrel",
"errstate",
"evals",
"exponentiated",
"extrap",
"facecolor",
"fastapi",
"Fernandes",
"fftfreq",
"figsize",
"filt",
"fmax",
"fmin",
"fontsize",
"freestream",
"funcified",
"funcify",
"GEFS",
"genfromtxt",
"geopotential",
"geopotentials",
"getdata",
"getfixturevalue",
"Giorgio",
"Giovani",
"github",
"Glauert",
"gmaps",
"Gomes",
"grav",
"hemis",
"hgtprs",
"hgtsfc",
"HIRESW",
"hspace",
"ICONEU",
"idxmax",
"imageio",
"imread",
"intc",
"interp",
"Interquartile",
"intp",
"ipywidgets",
"isbijective",
"isin",
"jsonpickle",
"jupyter",
"Karman",
"linalg",
"linestyle",
"linewidth",
"loadtxt",
"LSODA",
"lvhaack",
"Mandioca",
"mathutils",
"maxdepth",
"mbar",
"meshgrid",
"Metrum",
"mult",
"Mumma",
"NASADEM",
"NDAP",
"ndarray",
"NDRT",
"NETCDF",
"newlinestring",
"newmultigeometry",
"newpolygon",
"nfev",
"NOAA",
"NOAA's",
"noaaruc",
"num2pydate",
"outerboundaryis",
"planform",
"polystyle",
"powerseries",
"Projeto",
"prometheus",
"pytz",
"Rdot",
"referece",
"relativetoground",
"reynolds",
"ROABs",
"rocketpy",
"rstride",
"rtol",
"rucsoundings",
"rwork",
"savetxt",
"savgol",
"scilimits",
"searchsorted",
"seealso",
"simplekml",
"SIRGAS",
"somgl",
"Somigliana",
"SRTM",
"SRTMGL",
"subintervals",
"ticklabel",
"timezonefinder",
"tmpprs",
"toctree",
"trapz",
"TRHEDDS",
"triggerfunc",
"twinx",
"udot",
"ufunc",
"ugrdprs",
"USGS",
"uwyo",
"vectorize",
"vgrdprs",
"viridis",
"vmax",
"vmin",
"vonkarman",
"Weibull",
"windrose",
"wireframe",
"wspace",
"xlabel",
"xlim",
"xticks",
"ylabel",
"ylim",
"zdir",
"zlabel",
"zlim"
]
}
4 changes: 2 additions & 2 deletions rocketpy/environment/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Environment: # pylint: disable=too-many-public-methods
True if the user already set a topographic profile. False otherwise.
Environment.max_expected_height : float
Maximum altitude in meters to keep weather data. The altitude must be
above sea level (ASL). Especially useful for controlling plottings.
above sea level (ASL). Especially useful for controlling plots.
Can be altered as desired by doing `max_expected_height = number`.
Environment.pressure_ISA : Function
Air pressure in Pa as a function of altitude as defined by the
Expand Down Expand Up @@ -962,7 +962,7 @@ def set_atmospheric_model( # pylint: disable=too-many-branches
.. note::
Time referece for the Forecasts are:
Time reference for the Forecasts are:
- ``GFS``: `Global` - 0.25deg resolution - Updates every 6
hours, forecast for 81 points spaced by 3 hours
Expand Down
15 changes: 8 additions & 7 deletions rocketpy/mathutils/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ def plot(self, *args, **kwargs):
elif self.__dom_dim__ == 2:
self.plot_2d(*args, **kwargs)
else:
print("Error: Only functions with 1D or 2D domains are plottable!")
print("Error: Only functions with 1D or 2D domains can be plotted.")

def plot1D(self, *args, **kwargs):
"""Deprecated method, use Function.plot_1d instead."""
Expand Down Expand Up @@ -2614,8 +2614,8 @@ def isbijective(self):
return len(distinct_map) == len(x_data_distinct) == len(y_data_distinct)
else:
raise TypeError(
"Only Functions whose source is a list of points can be "
"checked for bijectivity."
"`isbijective()` method only supports Functions whose "
"source is an array."
)

def is_strictly_bijective(self):
Expand Down Expand Up @@ -2667,8 +2667,8 @@ def is_strictly_bijective(self):
return np.all(y_data_diff >= 0) or np.all(y_data_diff <= 0)
else:
raise TypeError(
"Only Functions whose source is a list of points can be "
"checked for bijectivity."
"`is_strictly_bijective()` method only supports Functions "
"whose source is an array."
)

def inverse_function(self, approx_func=None, tol=1e-4):
Expand All @@ -2678,8 +2678,9 @@ def inverse_function(self, approx_func=None, tol=1e-4):
and only if F is bijective. Makes the domain the range and the range
the domain.
If the Function is given by a list of points, its bijectivity is
checked and an error is raised if it is not bijective.
If the Function is given by a list of points, the method
`is_strictly_bijective()` is called and an error is raised if the
Function is not bijective.
If the Function is given by a function, its bijection is not
checked and may lead to inaccuracies outside of its bijective region.
Expand Down
10 changes: 5 additions & 5 deletions rocketpy/simulation/monte_carlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,10 @@ def __check_export_list(self, export_list):
"lateral_surface_wind",
}
)
# NOTE: exportables needs to be updated with Flight numerical properties
# example: You added the property 'inclination' to Flight, so you may
# need to add it to exportables as well. But don't add other types.
exportables = set(
# NOTE: this list needs to be updated with Flight numerical properties
# example: You added the property 'inclination' to Flight.
# But don't add other types.
can_be_exported = set(
{
"inclination",
"heading",
Expand Down Expand Up @@ -456,7 +456,7 @@ def __check_export_list(self, export_list):
raise TypeError("Variables in export_list must be strings.")

# Checks if attribute is not valid
if attr not in exportables:
if attr not in can_be_exported:
raise ValueError(
f"Attribute '{attr}' can not be exported. Check export_list."
)
Expand Down

0 comments on commit 2defa9a

Please sign in to comment.