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

DEV: setting up vscode workspace #633

Merged
merged 6 commits into from
Jul 12, 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
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 @@
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.")

Check warning on line 1194 in rocketpy/mathutils/function.py

View check run for this annotation

Codecov / codecov/patch

rocketpy/mathutils/function.py#L1194

Added line #L1194 was not covered by tests

def plot1D(self, *args, **kwargs):
"""Deprecated method, use Function.plot_1d instead."""
Expand Down Expand Up @@ -2614,8 +2614,8 @@
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 @@
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 @@
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 @@
"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 @@
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:

Check warning on line 459 in rocketpy/simulation/monte_carlo.py

View check run for this annotation

Codecov / codecov/patch

rocketpy/simulation/monte_carlo.py#L459

Added line #L459 was not covered by tests
raise ValueError(
f"Attribute '{attr}' can not be exported. Check export_list."
)
Expand Down
Loading