diff --git a/.gitignore b/.gitignore index 6b349a562..92ab5e3e0 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..3b60e9fc0 --- /dev/null +++ b/.vscode/extensions.json @@ -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", + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..16014706e --- /dev/null +++ b/.vscode/settings.json @@ -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" + ] +} \ No newline at end of file diff --git a/rocketpy/environment/environment.py b/rocketpy/environment/environment.py index 8e4fb6fc4..b6b2f6aa3 100644 --- a/rocketpy/environment/environment.py +++ b/rocketpy/environment/environment.py @@ -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 @@ -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 diff --git a/rocketpy/mathutils/function.py b/rocketpy/mathutils/function.py index d10ffe89a..d4dd6b806 100644 --- a/rocketpy/mathutils/function.py +++ b/rocketpy/mathutils/function.py @@ -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.""" @@ -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): @@ -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): @@ -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. diff --git a/rocketpy/simulation/monte_carlo.py b/rocketpy/simulation/monte_carlo.py index 0e3a06bd3..cbe7b6734 100644 --- a/rocketpy/simulation/monte_carlo.py +++ b/rocketpy/simulation/monte_carlo.py @@ -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", @@ -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." )