pyearth 0.2.2__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyearth-0.2.4/.agents/rules/code-architect.agent.md +18 -0
- pyearth-0.2.4/.agents/rules/code-fixer.agent.md +18 -0
- pyearth-0.2.4/.agents/rules/conda-env.agent.md +15 -0
- pyearth-0.2.4/.agents/rules/dep-manager.agent.md +14 -0
- pyearth-0.2.4/.agents/rules/linter-fixer.agent.md +20 -0
- pyearth-0.2.4/.agents/rules/test-writer.agent.md +17 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/.binder/environment.yml +1 -1
- pyearth-0.2.4/.flake8 +15 -0
- pyearth-0.2.4/.github/agents/code-architect.agent.md +18 -0
- pyearth-0.2.4/.github/agents/code-fixer.agent.md +35 -0
- pyearth-0.2.4/.github/agents/conda-env.agent.md +26 -0
- pyearth-0.2.4/.github/agents/dep-manager.agent.md +21 -0
- pyearth-0.2.4/.github/agents/linter-fixer.agent.md +25 -0
- pyearth-0.2.4/.github/agents/test-writer.agent.md +24 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/.github/workflows/release.yml +0 -8
- {pyearth-0.2.2 → pyearth-0.2.4}/.gitignore +3 -0
- pyearth-0.2.4/.gitpod.yml +2 -0
- pyearth-0.2.4/.pre-commit-config.yaml +53 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/.vscode/launch.json +1 -1
- pyearth-0.2.4/.vscode/settings.json +12 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/PKG-INFO +17 -5
- {pyearth-0.2.2 → pyearth-0.2.4}/README.md +4 -3
- pyearth-0.2.4/docs/ARCHITECTURE.md +281 -0
- pyearth-0.2.4/docs/DEPENDENCY_MAP.md +189 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/requirements.txt +1 -1
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/Doxyfile.in +1 -1
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/algorithm/api.rst +7 -7
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/algorithm/gis/gis.rst +14 -16
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/algorithm/toolbox/toolbox.rst +5 -5
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/authors.rst +0 -1
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/conf.py +20 -16
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/contribution.rst +0 -1
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/faq.rst +8 -5
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/story.rst +8 -8
- {pyearth-0.2.2 → pyearth-0.2.4}/environment.yml +1 -1
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/.gitignore +1 -1
- pyearth-0.2.4/pyearth/__init__.py +1 -0
- pyearth-0.2.4/pyearth/gis/__init__.py +35 -0
- pyearth-0.2.4/pyearth/gis/envi/__init__.py +5 -0
- pyearth-0.2.4/pyearth/gis/envi/envi_write_header.py +105 -0
- pyearth-0.2.4/pyearth/gis/gdal/__init__.py +115 -0
- pyearth-0.2.4/pyearth/gis/gdal/gdal_check_file_type.py +67 -0
- pyearth-0.2.4/pyearth/gis/gdal/gdal_check_raster_valid.py +79 -0
- pyearth-0.2.4/pyearth/gis/gdal/gdal_raster_format_support.py +198 -0
- pyearth-0.2.4/pyearth/gis/gdal/gdal_to_numpy_datatype.py +168 -0
- pyearth-0.2.4/pyearth/gis/gdal/gdal_validate_polygon_file.py +93 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/gdal/gdal_vector_format_support.py +107 -79
- pyearth-0.2.4/pyearth/gis/gdal/read/__init__.py +37 -0
- pyearth-0.2.4/pyearth/gis/gdal/read/raster/__init__.py +27 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/gdal/read/raster/gdal_get_raster_extent.py +30 -14
- pyearth-0.2.4/pyearth/gis/gdal/read/raster/gdal_get_raster_spatial_reference.py +96 -0
- pyearth-0.2.4/pyearth/gis/gdal/read/raster/gdal_read_ascii_file.py +97 -0
- pyearth-0.2.4/pyearth/gis/gdal/read/raster/gdal_read_envi_file.py +323 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/gdal/read/raster/gdal_read_geotiff_file.py +86 -50
- pyearth-0.2.4/pyearth/gis/gdal/read/vector/__init__.py +23 -0
- pyearth-0.2.4/pyearth/gis/gdal/read/vector/gdal_get_vector_boundary.py +90 -0
- pyearth-0.2.4/pyearth/gis/gdal/read/vector/gdal_get_vector_extent.py +119 -0
- pyearth-0.2.4/pyearth/gis/gdal/read/vector/gdal_get_vector_spatial_reference.py +101 -0
- pyearth-0.2.4/pyearth/gis/gdal/read/vector/gdal_read_vector_file.py +190 -0
- pyearth-0.2.4/pyearth/gis/gdal/write/__init__.py +25 -0
- pyearth-0.2.4/pyearth/gis/gdal/write/raster/__init__.py +17 -0
- pyearth-0.2.4/pyearth/gis/gdal/write/raster/gdal_write_envi_file.py +247 -0
- pyearth-0.2.4/pyearth/gis/gdal/write/raster/gdal_write_geotiff_file.py +281 -0
- pyearth-0.2.4/pyearth/gis/gdal/write/vector/__init__.py +15 -0
- pyearth-0.2.4/pyearth/gis/gdal/write/vector/gdal_export_point_to_vector_file.py +297 -0
- pyearth-0.2.4/pyearth/gis/gdal/write/vector/gdal_write_wkt_to_vector_file.py +129 -0
- pyearth-0.2.4/pyearth/gis/geometry/__init__.py +107 -0
- pyearth-0.2.4/pyearth/gis/geometry/calculate_angle_between_point.py +66 -0
- pyearth-0.2.4/pyearth/gis/geometry/calculate_angle_between_point_normal.py +80 -0
- pyearth-0.2.4/pyearth/gis/geometry/calculate_angle_between_vectors_degrees.py +39 -0
- pyearth-0.2.4/pyearth/gis/geometry/calculate_distance_based_on_longitude_latitude.py +78 -0
- pyearth-0.2.4/pyearth/gis/geometry/calculate_distance_to_line.py +90 -0
- pyearth-0.2.4/pyearth/gis/geometry/calculate_distance_to_plane.py +82 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/geometry/calculate_intersect_on_great_circle.py +27 -13
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/geometry/calculate_polygon_area.py +33 -15
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/geometry/calculate_spherical_triangle_area.py +6 -2
- pyearth-0.2.4/pyearth/gis/geometry/check_convex_polygon.py +68 -0
- pyearth-0.2.4/pyearth/gis/geometry/check_counter_clockwise.py +162 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/geometry/clean_geometry.py +1 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/geometry/convert_longitude_range.py +17 -122
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/geometry/create_box_from_longitude_latitude.py +7 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/geometry/douglas_peucker_geodetic.py +3 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/geometry/extract_unique_vertices_and_connectivity.py +8 -25
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/geometry/get_output_geometry_type.py +5 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/geometry/kernel.c +15091 -11234
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/geometry/kernel.pyx +4 -2
- pyearth-0.2.4/pyearth/gis/geometry/remove_duplicate_closure.py +11 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/geometry/visvalingam_whyatt_geodetic.py +9 -3
- pyearth-0.2.4/pyearth/gis/idl_handler.py +702 -0
- pyearth-0.2.4/pyearth/gis/location/Google_MetersPerPixel.py +73 -0
- pyearth-0.2.4/pyearth/gis/location/__init__.py +49 -0
- pyearth-0.2.4/pyearth/gis/location/convert_between_longitude_latitude_and_sphere_3d.py +146 -0
- pyearth-0.2.4/pyearth/gis/location/find_index_by_longitude_latitude.py +90 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/location/get_geometry_coordinates.py +40 -14
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/location/get_hydrosheds_continent_from_extent.py +3 -1
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/location/kernel.c +2841 -2255
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/location/kernel.pyx +2 -4
- pyearth-0.2.4/pyearth/gis/location/world2Pixel.py +117 -0
- pyearth-0.2.4/pyearth/gis/polar_handler.py +432 -0
- pyearth-0.2.4/pyearth/gis/spatialref/__init__.py +31 -0
- pyearth-0.2.4/pyearth/gis/spatialref/convert_between_degree_and_meter.py +112 -0
- pyearth-0.2.4/pyearth/gis/spatialref/is_wgs84_projection.py +92 -0
- pyearth-0.2.4/pyearth/gis/spatialref/reproject_coordinates.py +239 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/spatialref/utm_utility.py +38 -96
- pyearth-0.2.4/pyearth/system/__init__.py +96 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/system/create_symlink.py +26 -34
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/system/define_global_variables.py +104 -72
- pyearth-0.2.4/pyearth/system/filename.py +121 -0
- pyearth-0.2.4/pyearth/system/python/__init__.py +11 -0
- pyearth-0.2.4/pyearth/system/python/get_python_environment.py +162 -0
- pyearth-0.2.4/pyearth/system/set_linker_directory.py +143 -0
- pyearth-0.2.4/pyearth/toolbox/__init__.py +23 -0
- pyearth-0.2.4/pyearth/toolbox/analysis/__init__.py +49 -0
- pyearth-0.2.4/pyearth/toolbox/analysis/difference/__init__.py +13 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/analysis/difference/difference_polygon_with_polygon_file.py +4 -3
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/analysis/difference/difference_polyline_with_polygon_file.py +4 -3
- pyearth-0.2.4/pyearth/toolbox/analysis/extract/__init__.py +33 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/analysis/extract/clip_raster_by_polygon_file.py +5 -4
- pyearth-0.2.4/pyearth/toolbox/analysis/extract/clip_vector_by_bounding_box.py +265 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/analysis/extract/clip_vector_by_polygon_file.py +9 -8
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/analysis/extract/exclude_vector_by_polygon_file.py +5 -4
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/analysis/extract/exclude_vector_by_polygon_files.py +5 -4
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/analysis/extract/filter_vector_by_attribute.py +3 -1
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/analysis/extract/filter_vector_by_polygon.py +3 -1
- pyearth-0.2.4/pyearth/toolbox/analysis/image/__init__.py +13 -0
- pyearth-0.2.4/pyearth/toolbox/analysis/image/raster_process.py +300 -0
- pyearth-0.2.4/pyearth/toolbox/analysis/intersect/__init__.py +13 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/analysis/intersect/intersect_polygon_with_polygon_file.py +7 -9
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/analysis/intersect/intersect_polyline_with_polygon_file.py +4 -3
- pyearth-0.2.4/pyearth/toolbox/analysis/union/__init__.py +5 -0
- pyearth-0.2.4/pyearth/toolbox/analysis/union/union_polygon_file.py +196 -0
- pyearth-0.2.4/pyearth/toolbox/conversion/__init__.py +25 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/conversion/convert_polygon_to_polyline_file.py +8 -7
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/conversion/convert_vector_format.py +13 -17
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/conversion/convert_vector_to_global_raster.py +4 -2
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/conversion/rasterize_vector.py +6 -2
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/conversion/vectorize_raster.py +3 -2
- pyearth-0.2.4/pyearth/toolbox/data/__init__.py +26 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/data/beta/add_variable_to_netcdf.py +1 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/data/cgpercentiles.py +3 -2
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/data/convert_time_series_daily_to_monthly.py +6 -5
- pyearth-0.2.4/pyearth/toolbox/data/list/__init__.py +6 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/data/list/check_if_duplicates.py +1 -1
- pyearth-0.2.4/pyearth/toolbox/data/list/list_alg.py +59 -0
- pyearth-0.2.4/pyearth/toolbox/data/ocean/__init__.py +7 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/data/ocean/define_land_ocean_mask.py +16 -5
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/data/remove_outliers.py +3 -2
- pyearth-0.2.4/pyearth/toolbox/data/vector/__init__.py +7 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/data/vector/copy_geometry_without_attributes.py +12 -11
- pyearth-0.2.4/pyearth/toolbox/date/__init__.py +19 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/date/dt2cal.py +12 -14
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/date/julian.py +7 -7
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/date/timer.py +2 -2
- pyearth-0.2.4/pyearth/toolbox/geometry/__init__.py +5 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/geometry/calculate_hexagon_area.py +2 -1
- pyearth-0.2.4/pyearth/toolbox/management/__init__.py +41 -0
- pyearth-0.2.4/pyearth/toolbox/management/raster/__init__.py +13 -0
- pyearth-0.2.2/pyearth/toolbox/management/raster/merge_rasters.py → pyearth-0.2.4/pyearth/toolbox/management/raster/merge_raster_files.py +10 -21
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/management/raster/reproject.py +5 -3
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/management/raster/resample.py +7 -6
- pyearth-0.2.4/pyearth/toolbox/management/vector/__init__.py +35 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/management/vector/fields.py +20 -13
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/management/vector/merge_features.py +10 -12
- pyearth-0.2.2/pyearth/toolbox/management/vector/merge_files.py → pyearth-0.2.4/pyearth/toolbox/management/vector/merge_vector_files.py +36 -22
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/management/vector/polygon_calculator.py +16 -14
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/management/vector/remove_small_polygon.py +33 -12
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/management/vector/reproject.py +6 -4
- pyearth-0.2.4/pyearth/toolbox/math/__init__.py +19 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/math/gap_fill_by_window.py +17 -14
- pyearth-0.2.4/pyearth/toolbox/math/stat/__init__.py +13 -0
- pyearth-0.2.4/pyearth/toolbox/math/stat/remap.py +49 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/math/stat/scipy_bivariate_kde.py +3 -2
- pyearth-0.2.4/pyearth/toolbox/mesh/__init__.py +17 -0
- pyearth-0.2.4/pyearth/toolbox/mesh/algorithm/__init__.py +33 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/mesh/algorithm/convert_coordinates.py +29 -16
- pyearth-0.2.4/pyearth/toolbox/mesh/algorithm/convert_nvector_point.py +85 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/mesh/algorithm/find_minimal_enclosing_polygon.py +3 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/mesh/algorithm/save_points_as_polygon.py +11 -7
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/mesh/algorithm/split_by_length.py +83 -31
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/mesh/circle.py +8 -3
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/mesh/line.py +103 -31
- pyearth-0.2.4/pyearth/toolbox/mesh/nvector.py +93 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/mesh/point.py +96 -59
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/mesh/polygon.py +155 -86
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/mesh/polyline.py +23 -16
- pyearth-0.2.4/pyearth/toolbox/reader/__init__.py +15 -0
- pyearth-0.2.4/pyearth/toolbox/reader/line_count.py +27 -0
- pyearth-0.2.4/pyearth/toolbox/reader/parse_xml_file.py +81 -0
- pyearth-0.2.4/pyearth/toolbox/reader/read_configuration_file.py +38 -0
- pyearth-0.2.4/pyearth/toolbox/reader/split_string_into_chunk.py +32 -0
- pyearth-0.2.4/pyearth/toolbox/reader/text_reader_string.py +89 -0
- pyearth-0.2.4/pyearth/toolbox/spatialindex/__init__.py +3 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth.egg-info/PKG-INFO +17 -5
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth.egg-info/SOURCES.txt +43 -12
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth.egg-info/requires.txt +13 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyproject.toml +21 -4
- {pyearth-0.2.2 → pyearth-0.2.4}/setup.py +5 -3
- pyearth-0.2.4/tests/example/test_idl_split.py +70 -0
- pyearth-0.2.4/tests/test_data.py +67 -0
- pyearth-0.2.4/tests/test_date.py +153 -0
- pyearth-0.2.4/tests/test_gdal_format.py +222 -0
- pyearth-0.2.4/tests/test_gdal_io.py +275 -0
- pyearth-0.2.4/tests/test_geometry.py +204 -0
- pyearth-0.2.4/tests/test_idl_handler.py +150 -0
- pyearth-0.2.4/tests/test_location.py +203 -0
- pyearth-0.2.4/tests/test_math.py +87 -0
- pyearth-0.2.4/tests/test_mesh.py +105 -0
- pyearth-0.2.4/tests/test_polar_handler.py +38 -0
- pyearth-0.2.4/tests/test_reader.py +139 -0
- pyearth-0.2.4/tests/test_spatialref.py +159 -0
- pyearth-0.2.4/tests/test_system.py +198 -0
- pyearth-0.2.4/tests/test_toolbox_geometry.py +26 -0
- pyearth-0.2.2/.gitpod.yml +0 -2
- pyearth-0.2.2/.vscode/settings.json +0 -5
- pyearth-0.2.2/pyearth/__init__.py +0 -1
- pyearth-0.2.2/pyearth/gis/envi/envi_write_header.py +0 -82
- pyearth-0.2.2/pyearth/gis/gdal/gdal_check_file_type.py +0 -44
- pyearth-0.2.2/pyearth/gis/gdal/gdal_check_raster_valid.py +0 -83
- pyearth-0.2.2/pyearth/gis/gdal/gdal_raster_format_support.py +0 -132
- pyearth-0.2.2/pyearth/gis/gdal/gdal_to_numpy_datatype.py +0 -121
- pyearth-0.2.2/pyearth/gis/gdal/gdal_validate_polygon_file.py +0 -42
- pyearth-0.2.2/pyearth/gis/gdal/read/__init__.py +0 -0
- pyearth-0.2.2/pyearth/gis/gdal/read/raster/__init__.py +0 -0
- pyearth-0.2.2/pyearth/gis/gdal/read/raster/gdal_get_raster_spatial_reference.py +0 -54
- pyearth-0.2.2/pyearth/gis/gdal/read/raster/gdal_read_ascii_file.py +0 -61
- pyearth-0.2.2/pyearth/gis/gdal/read/raster/gdal_read_envi_file.py +0 -192
- pyearth-0.2.2/pyearth/gis/gdal/read/vector/__init__.py +0 -0
- pyearth-0.2.2/pyearth/gis/gdal/read/vector/gdal_get_vector_boundary.py +0 -113
- pyearth-0.2.2/pyearth/gis/gdal/read/vector/gdal_get_vector_extent.py +0 -122
- pyearth-0.2.2/pyearth/gis/gdal/read/vector/gdal_get_vector_spatial_reference.py +0 -60
- pyearth-0.2.2/pyearth/gis/gdal/read/vector/gdal_read_vector_file.py +0 -88
- pyearth-0.2.2/pyearth/gis/gdal/write/__init__.py +0 -0
- pyearth-0.2.2/pyearth/gis/gdal/write/raster/__init__.py +0 -0
- pyearth-0.2.2/pyearth/gis/gdal/write/raster/gdal_write_envi_file.py +0 -137
- pyearth-0.2.2/pyearth/gis/gdal/write/raster/gdal_write_geotiff_file.py +0 -152
- pyearth-0.2.2/pyearth/gis/gdal/write/vector/__init__.py +0 -0
- pyearth-0.2.2/pyearth/gis/gdal/write/vector/gdal_export_point_to_vector_file.py +0 -261
- pyearth-0.2.2/pyearth/gis/gdal/write/vector/gdal_write_wkt_to_vector_file.py +0 -97
- pyearth-0.2.2/pyearth/gis/geometry/__init__.py +0 -0
- pyearth-0.2.2/pyearth/gis/geometry/calculate_angle_between_point.py +0 -55
- pyearth-0.2.2/pyearth/gis/geometry/calculate_angle_between_point_normal.py +0 -118
- pyearth-0.2.2/pyearth/gis/geometry/calculate_angle_between_vectors_degrees.py +0 -23
- pyearth-0.2.2/pyearth/gis/geometry/calculate_distance_based_on_longitude_latitude.py +0 -66
- pyearth-0.2.2/pyearth/gis/geometry/calculate_distance_to_line.py +0 -132
- pyearth-0.2.2/pyearth/gis/geometry/calculate_distance_to_plane.py +0 -129
- pyearth-0.2.2/pyearth/gis/geometry/check_convex_polygon.py +0 -73
- pyearth-0.2.2/pyearth/gis/geometry/check_counter_clockwise.py +0 -72
- pyearth-0.2.2/pyearth/gis/geometry/international_date_line_utility.py +0 -1150
- pyearth-0.2.2/pyearth/gis/location/Google_MetersPerPixel.py +0 -120
- pyearth-0.2.2/pyearth/gis/location/__init__.py +0 -0
- pyearth-0.2.2/pyearth/gis/location/convert_between_longitude_latitude_and_sphere_3d.py +0 -347
- pyearth-0.2.2/pyearth/gis/location/find_index_by_longitude_latitude.py +0 -164
- pyearth-0.2.2/pyearth/gis/location/world2Pixel.py +0 -145
- pyearth-0.2.2/pyearth/gis/spatialref/__init__.py +0 -0
- pyearth-0.2.2/pyearth/gis/spatialref/convert_between_degree_and_meter.py +0 -105
- pyearth-0.2.2/pyearth/gis/spatialref/is_wgs84_projection.py +0 -15
- pyearth-0.2.2/pyearth/gis/spatialref/reproject_coordinates.py +0 -280
- pyearth-0.2.2/pyearth/system/__init__.py +0 -0
- pyearth-0.2.2/pyearth/system/filename.py +0 -73
- pyearth-0.2.2/pyearth/system/python/__init__.py +0 -0
- pyearth-0.2.2/pyearth/system/python/get_python_environment.py +0 -242
- pyearth-0.2.2/pyearth/system/set_linker_directory.py +0 -162
- pyearth-0.2.2/pyearth/toolbox/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/analysis/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/analysis/difference/__init__.py +0 -1
- pyearth-0.2.2/pyearth/toolbox/analysis/extract/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/analysis/intersect/__init__.py +0 -1
- pyearth-0.2.2/pyearth/toolbox/conversion/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/data/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/data/beta/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/data/list/__init__.py +0 -1
- pyearth-0.2.2/pyearth/toolbox/data/list/list_alg.py +0 -31
- pyearth-0.2.2/pyearth/toolbox/data/netcdf/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/data/ocean/__init__.py +0 -1
- pyearth-0.2.2/pyearth/toolbox/data/vector/__init__.py +0 -1
- pyearth-0.2.2/pyearth/toolbox/date/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/geometry/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/geometry/create_gcs_buffer_zone.py +0 -1149
- pyearth-0.2.2/pyearth/toolbox/management/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/management/raster/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/management/vector/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/math/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/math/array/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/math/stat/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/math/stat/remap.py +0 -94
- pyearth-0.2.2/pyearth/toolbox/mesh/__init__.py +0 -1
- pyearth-0.2.2/pyearth/toolbox/mesh/algorithm/__init__.py +0 -1
- pyearth-0.2.2/pyearth/toolbox/mesh/hexaon/__init__.py +0 -1
- pyearth-0.2.2/pyearth/toolbox/mesh/hexaon/create_hexagon_mesh.py +0 -527
- pyearth-0.2.2/pyearth/toolbox/mesh/latlon/__init__.py +0 -1
- pyearth-0.2.2/pyearth/toolbox/mesh/latlon/create_latlon_mesh.py +0 -477
- pyearth-0.2.2/pyearth/toolbox/mesh/nvector.py +0 -114
- pyearth-0.2.2/pyearth/toolbox/mesh/square/__init__.py +0 -1
- pyearth-0.2.2/pyearth/toolbox/mesh/square/create_square_mesh.py +0 -297
- pyearth-0.2.2/pyearth/toolbox/reader/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/reader/beta/__init__.py +0 -0
- pyearth-0.2.2/pyearth/toolbox/reader/line_count.py +0 -20
- pyearth-0.2.2/pyearth/toolbox/reader/parse_xml_file.py +0 -74
- pyearth-0.2.2/pyearth/toolbox/reader/read_configuration_file.py +0 -33
- pyearth-0.2.2/pyearth/toolbox/reader/split_string_into_chunk.py +0 -20
- pyearth-0.2.2/pyearth/toolbox/reader/text_reader_string.py +0 -168
- pyearth-0.2.2/pyearth/toolbox/spatialindex/__init__.py +0 -7
- {pyearth-0.2.2 → pyearth-0.2.4}/.binder/README.md +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/LICENSE.md +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/MANIFEST.in +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/Makefile +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/make.bat +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/_static/.gitkeep +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/algorithm/system/system.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/getting-started.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/index.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/docs/source/support.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/gis/location/kernel.pxd +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/cython/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4/pyearth/toolbox/data/beta}/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/data/beta/replace_variable_in_netcdf.py +0 -0
- {pyearth-0.2.2/pyearth/gis → pyearth-0.2.4/pyearth/toolbox/data/netcdf}/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/date/day_in_month.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/date/day_of_year.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/date/leap_year.py +0 -0
- {pyearth-0.2.2/pyearth/gis/envi → pyearth-0.2.4/pyearth/toolbox/math/array}/__init__.py +0 -0
- {pyearth-0.2.2/pyearth/gis/gdal → pyearth-0.2.4/pyearth/toolbox/reader/beta}/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth/toolbox/reader/beta/parse_xml_file_e3sm.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth.egg-info/dependency_links.txt +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/pyearth.egg-info/top_level.txt +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/setup.cfg +0 -0
- {pyearth-0.2.2 → pyearth-0.2.4}/tests/example/test.py +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Rule: Architecture, Layering & Modularity
|
|
2
|
+
|
|
3
|
+
Guidelines for evaluating and structuring Python package dependencies and module organization.
|
|
4
|
+
|
|
5
|
+
## Scope & Token Efficiency
|
|
6
|
+
- **Targeted Scope:** Focus architectural analysis strictly on the specific package, submodule, or design question requested. Do not attempt whole-repository full-text scans.
|
|
7
|
+
- **Context Guard:** Never read more than 5 full files into context. Use symbol navigation, AST summaries, or grep to evaluate dependencies efficiently.
|
|
8
|
+
|
|
9
|
+
## Universal 3-Tier Layering Principles
|
|
10
|
+
Organize Python package code into a clean bottom-up dependency hierarchy:
|
|
11
|
+
1. **Tier 1: Primitives & Foundations** (system utilities, OS wrappers, base constants, raw data containers). Must NOT import from higher tiers.
|
|
12
|
+
2. **Tier 2: Core Domain & Engines** (algorithms, numerical routines, domain data models, transformation engines). Imports Tier 1 only.
|
|
13
|
+
3. **Tier 3: Interfaces & Pipelines** (public exports, high-level orchestration, workflow runners, CLI commands). Imports Tier 1 and Tier 2.
|
|
14
|
+
|
|
15
|
+
## Dependency Rules
|
|
16
|
+
- **Strict Directionality:** Higher tiers may import lower tiers; lower tiers must NEVER import higher tiers.
|
|
17
|
+
- **Zero Circular Dependencies:** Circular imports are strictly forbidden. Extract shared dependencies into lower-tier utility modules or use deferred typing imports (`if TYPE_CHECKING:`).
|
|
18
|
+
- **Loose Coupling:** Minimize inter-module cross-calls. Keep modules focused on a single responsibility.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Rule: Code Debugging & Troubleshooting
|
|
2
|
+
|
|
3
|
+
Guidelines and constraints for diagnosing, debugging, and resolving code defects and test failures.
|
|
4
|
+
|
|
5
|
+
## Python Environment & Execution
|
|
6
|
+
- **Dynamic Interpreter Resolution:** Always resolve the active Python interpreter before executing commands:
|
|
7
|
+
1. Check `.vscode/settings.json` for `"python.defaultInterpreterPath"`.
|
|
8
|
+
2. Fall back to `${workspaceFolder}/.venv/bin/python`, `${workspaceFolder}/venv/bin/python`, or `python3`.
|
|
9
|
+
- **Invoke via Interpreter:** Always run tools through the resolved interpreter:
|
|
10
|
+
`<python_interpreter> -m pytest <path_to_test_file> [-k test_name] -v`
|
|
11
|
+
- **Never Run Bare `pytest` or `python`:** Non-interactive subshells may lack PATH activation, causing `command not found` or library import errors.
|
|
12
|
+
- **Targeted Test Execution Only:** Never run repository-wide test suites (`pytest tests/`) for localized fixes. Run only the specific test file or function relevant to the defect.
|
|
13
|
+
|
|
14
|
+
## Bug Fixing Constraints
|
|
15
|
+
- **Minimal Blast Radius:** Limit modifications strictly to the files directly responsible (maximum 3 files). Never reformat or refactor unrelated code.
|
|
16
|
+
- **No Backward-Compatibility Burden:** Do not introduce legacy shims, alias assignments, or wrapper functions. When replacing or modernizing an implementation, switch call sites over directly and cleanly.
|
|
17
|
+
- **Fail-Fast Guard (Max 2 Attempts):** If a fix does not pass tests after 2 attempts, STOP immediately. Summarize what was tried, report the error log, and request user guidance rather than looping.
|
|
18
|
+
- **Canonical Naming:** Always use canonical, standard snake_case function and module names.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Rule: Python Environment & Interpreter Resolution
|
|
2
|
+
|
|
3
|
+
Guidelines for resolving and verifying Python environments across workspaces.
|
|
4
|
+
|
|
5
|
+
## Saved Workspace Configuration (Default)
|
|
6
|
+
- **Primary Resolution:** Check `.vscode/settings.json` for `"python.defaultInterpreterPath"`.
|
|
7
|
+
- **Secondary Resolution:** Check for local virtual environments (`${workspaceFolder}/.venv` or `${workspaceFolder}/venv`).
|
|
8
|
+
- **Verification (Max 1 Step):**
|
|
9
|
+
`<saved_interpreter> --version`
|
|
10
|
+
If functional, use this interpreter path for all Python tool execution and proceed directly.
|
|
11
|
+
|
|
12
|
+
## Constraints
|
|
13
|
+
- Never execute verbose discovery commands such as `conda config --show` or `conda info` (they waste tens of thousands of tokens).
|
|
14
|
+
- Never create, modify, or destroy Conda or virtual environments automatically without explicit user instructions.
|
|
15
|
+
- Never run dynamic environment updates (`conda env update`) during task execution.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Rule: Package Dependencies & Build Configuration
|
|
2
|
+
|
|
3
|
+
Guidelines for managing package configuration, dependencies, and build specifications in Python projects.
|
|
4
|
+
|
|
5
|
+
## Environment & Tool Execution
|
|
6
|
+
- **Dynamic Interpreter Resolution:** Resolve the active Python interpreter from `.vscode/settings.json` (`python.defaultInterpreterPath`) or `${workspaceFolder}/.venv/bin/python`.
|
|
7
|
+
- **Run Package Tools via Interpreter:**
|
|
8
|
+
`<python_interpreter> -m pip install -e . --no-deps`
|
|
9
|
+
- **Never Run Bare `pip`:** Subshells may point to system Python instead of the project's environment.
|
|
10
|
+
|
|
11
|
+
## Packaging Standards
|
|
12
|
+
- Use modern `pyproject.toml` configuration. Do not introduce legacy `requirements.txt` files unless explicitly requested.
|
|
13
|
+
- Validate all newly added dependencies against existing version constraints before adding.
|
|
14
|
+
- **Fail-Fast Guard:** If editable install or build fails, STOP immediately. Output the exact build log to the user rather than retrying in an automated loop.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Rule: Code Quality, Typing & Formatting
|
|
2
|
+
|
|
3
|
+
Guidelines for code style, type annotations, and linting across Python workspaces.
|
|
4
|
+
|
|
5
|
+
## Scope & Target Bounds
|
|
6
|
+
- **Targeted Scope Only:** Inspect and format ONLY the specific files requested by the user or touched during the current task. Never run repository-wide lint or format sweeps.
|
|
7
|
+
- **Dynamic Package Structure:** Identify the package root by reading `pyproject.toml` or finding the directory containing `__init__.py`. Tests live in `tests/`.
|
|
8
|
+
|
|
9
|
+
## Quality Guidelines
|
|
10
|
+
- Include type hints for all public functions, arguments, and return types.
|
|
11
|
+
- Write clean Google-style docstrings for public classes and functions.
|
|
12
|
+
- Preserve all existing comments and docstrings unrelated to your changes.
|
|
13
|
+
- Never introduce backward-compatible shims or duplicate alias assignments.
|
|
14
|
+
|
|
15
|
+
## Tool Execution & Fail-Fast Guard
|
|
16
|
+
- **Execute via Resolved Python:**
|
|
17
|
+
`<python_interpreter> -m ruff check <target_file>`
|
|
18
|
+
`<python_interpreter> -m flake8 <target_file>`
|
|
19
|
+
- **Missing Tool Guard:** If a quality tool (`ruff`, `mypy`, `flake8`) is not installed in the environment, report that it is missing and complete your turn immediately. Do NOT attempt automated installation or retry in a loop.
|
|
20
|
+
- **Single Pass Only:** Never iterate continuously trying to achieve "zero warnings". Apply clean fixes in one pass, report any remaining warnings in your final summary, and stop.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Rule: Unit Test Authoring & Repair
|
|
2
|
+
|
|
3
|
+
Guidelines for writing and repairing pytest unit tests across Python workspaces.
|
|
4
|
+
|
|
5
|
+
## Execution & Environment
|
|
6
|
+
- **Dynamic Interpreter Resolution:** Resolve the active interpreter from `.vscode/settings.json` (`python.defaultInterpreterPath`) or `${workspaceFolder}/.venv/bin/python`.
|
|
7
|
+
- **Run Tests via Interpreter:**
|
|
8
|
+
`<python_interpreter> -m pytest <path_to_test_file> -v`
|
|
9
|
+
- **Never Run Bare `pytest`:** Subshells lack conda/venv activation and will fail with `command not found`.
|
|
10
|
+
- **Targeted Test Execution Only:** Run ONLY the specific test file being authored or repaired. Never run the full test suite.
|
|
11
|
+
|
|
12
|
+
## Test Design Guidelines
|
|
13
|
+
- **Targeted Scope:** Write or repair tests only for the specific module or function requested by the user. Do not initiate open-ended test coverage audits across the entire repository.
|
|
14
|
+
- **Placement:** Place test files inside `tests/` following the pattern `tests/test_<module_name>.py`.
|
|
15
|
+
- **Coverage Focus:** Validate happy paths and critical edge cases (e.g., empty sequences, boundary values, invalid inputs).
|
|
16
|
+
- **Fail-Fast Guard (Max 2 Attempts):** If a new test fails after 2 repair attempts, STOP immediately. Report the failing assertion, expected vs actual values, and ask the user for clarification.
|
|
17
|
+
- **Canonical Naming:** Test canonical functions and classes directly; never test or create legacy compatibility aliases.
|
pyearth-0.2.4/.flake8
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[flake8]
|
|
2
|
+
# Increase the line length to avoid E501
|
|
3
|
+
max-line-length = 150
|
|
4
|
+
|
|
5
|
+
# Ignore specific error codes:
|
|
6
|
+
# E501: Line too long
|
|
7
|
+
# F401: Module imported but unused
|
|
8
|
+
# F841: Local variable is assigned to but never used
|
|
9
|
+
# E402: Module level import not at top of file
|
|
10
|
+
# E203: Whitespace before ':' (conflicts with black slices)
|
|
11
|
+
# E741: Ambiguous variable name
|
|
12
|
+
# F811: Redefinition of unused name (conflicts with TYPE_CHECKING guards)
|
|
13
|
+
# F403: Wildcard imports from global variables
|
|
14
|
+
extend-ignore = E203, E501, F401, F841, E402, F541, E741, F811, F403
|
|
15
|
+
exclude = .git,__pycache__,build,dist,docs,.venv
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "code-architect"
|
|
3
|
+
description: "Analyzes targeted Python module dependencies, hierarchy, and structural patterns with strict context bounds across any Python repository."
|
|
4
|
+
tools: ["read_file", "search_workspace"]
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a senior software architect and Python code structure specialist. Your role is to analyze module dependencies, layered architecture, and structural organization for any Python package.
|
|
9
|
+
|
|
10
|
+
## Analysis Guidelines
|
|
11
|
+
- **Targeted Scope:** Focus your architectural analysis ONLY on the specific package, submodule, or files requested by the user. Do not attempt to read or analyze the entire codebase at once.
|
|
12
|
+
- **Context Guard (Read Limit):** Never read entire large files or more than 5 files into context during a single session. Use search, outline inspection, or symbol lookups to understand imports and relationships efficiently.
|
|
13
|
+
- **Universal Layering Principles:** Evaluate module architecture against a clean bottom-up dependency model:
|
|
14
|
+
1. **Foundations & Primitives:** Low-level system utilities, OS operations, data types, constants (no imports of higher layers).
|
|
15
|
+
2. **Core Domain & Engines:** Algorithms, computational models, mathematical transforms, pure logic.
|
|
16
|
+
3. **High-Level Workflows & Interfaces:** Public API exports, CLI commands, application runners, user-facing pipelines.
|
|
17
|
+
*Rule:* Higher layers may import lower layers; lower layers must NEVER import higher layers. Zero circular imports allowed.
|
|
18
|
+
- **Output Standard:** Provide concise, structured recommendations with bullet points and file references. Never modify code directly.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "code-fixer"
|
|
3
|
+
description: "Diagnoses, debugs, and fixes targeted code defects and failing tests with strict token and execution bounds across any Python repository."
|
|
4
|
+
tools: ["read_file", "search_workspace", "edit_file", "run_terminal_cmd"]
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are an expert software engineer and code troubleshooting specialist for Python packages. Your role is to diagnose, debug, and resolve targeted code defects, runtime exceptions, and failing tests.
|
|
9
|
+
|
|
10
|
+
## Dynamic Environment & Execution
|
|
11
|
+
- **Resolve Python Interpreter:** Before running commands, determine the active Python interpreter using this priority:
|
|
12
|
+
1. Check `.vscode/settings.json` for `"python.defaultInterpreterPath"`.
|
|
13
|
+
2. Fall back to `${workspaceFolder}/.venv/bin/python`, `${workspaceFolder}/venv/bin/python`, or `python3`.
|
|
14
|
+
- **Always Execute via the Resolved Interpreter:**
|
|
15
|
+
`<python_interpreter> -m pytest <path_to_test_file> [-k test_name] -v`
|
|
16
|
+
- **Never Run Bare `pytest` or `python`:** In subshells, bare commands often hit system Python or fail with `command not found`.
|
|
17
|
+
- **Targeted Test Execution Only:** Never run repository-wide test suites (`pytest tests/`). Only execute the specific test file or function reproducing the defect.
|
|
18
|
+
|
|
19
|
+
## Debugging Workflow
|
|
20
|
+
1. **Analyze & Target (Scope Limit: ≤ 3 files):**
|
|
21
|
+
- Review the problem description, error message, or stack trace.
|
|
22
|
+
- Inspect ONLY the directly relevant files. Do not scan or read unrelated modules.
|
|
23
|
+
2. **Devise the Fix:**
|
|
24
|
+
- Implement the cleanest and most direct fix addressing the root cause.
|
|
25
|
+
- **No Backward-Compatibility Burden:** Do not introduce legacy shims, alias assignments, or wrapper functions. When replacing or updating an approach, switch over directly and cleanly.
|
|
26
|
+
3. **Verify with Fail-Fast Guard (Max 2 Attempts):**
|
|
27
|
+
- Run the target test command to verify the fix.
|
|
28
|
+
- If the fix fails verification after 2 attempts, STOP immediately. Summarize the error, what was attempted, and return control to the user.
|
|
29
|
+
4. **Summarize Outcome:**
|
|
30
|
+
- Provide a concise summary of the root cause, changes made, and test output.
|
|
31
|
+
|
|
32
|
+
## Hard Constraints
|
|
33
|
+
- **Scope Limit:** Do not touch, reformat, or refactor unrelated code.
|
|
34
|
+
- **Fail-Fast on Missing Tools:** If any terminal command returns `command not found` (exit code 127), stop immediately and report the missing tool; do not attempt automated package installation.
|
|
35
|
+
- **Canonical Naming:** Always use canonical function, class, and variable names.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "conda-env"
|
|
3
|
+
description: "Inspects, verifies, or switches the active Python environment and updates .vscode/settings.json across any Python repository."
|
|
4
|
+
tools: ["read_file", "edit_file", "run_terminal_cmd"]
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the Python environment manager for this repository.
|
|
9
|
+
|
|
10
|
+
## Execution Workflow (Max 2 Steps)
|
|
11
|
+
1. **Verify Saved Interpreter (Default):**
|
|
12
|
+
- Check `.vscode/settings.json` for `"python.defaultInterpreterPath"`.
|
|
13
|
+
- If present, test that it runs:
|
|
14
|
+
`<saved_interpreter> --version`
|
|
15
|
+
- If functional, report the active interpreter path and Python version, then exit immediately. Do not perform any further discovery.
|
|
16
|
+
2. **Environment Discovery (Only If Not Configured or User Requests Switch):**
|
|
17
|
+
- Check if a local virtual environment exists (`.venv` or `venv`).
|
|
18
|
+
- If using Conda, list environments using only:
|
|
19
|
+
`conda env list`
|
|
20
|
+
- Never run verbose commands like `conda config --show`, `conda info`, or `conda env update`.
|
|
21
|
+
- Save the selected interpreter path into `.vscode/settings.json` under `"python.defaultInterpreterPath"`.
|
|
22
|
+
|
|
23
|
+
## Hard Constraints
|
|
24
|
+
- Never create, delete, or update Conda or virtual environments automatically without explicit user instructions.
|
|
25
|
+
- Never dump full Conda configurations or solver trees into chat.
|
|
26
|
+
- Always complete within 1-2 tool calls.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "dep-manager"
|
|
3
|
+
description: "Manages package configuration, dependencies, and build specs in pyproject.toml across any Python repository."
|
|
4
|
+
tools: ["read_file", "edit_file", "run_terminal_cmd"]
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the dependency and build manager for this Python package.
|
|
9
|
+
|
|
10
|
+
## Dynamic Environment & Execution
|
|
11
|
+
- **Resolve Python Interpreter:** Before running package installation or builds, resolve the interpreter:
|
|
12
|
+
1. Check `.vscode/settings.json` for `"python.defaultInterpreterPath"`.
|
|
13
|
+
2. Fall back to `${workspaceFolder}/.venv/bin/python`, `${workspaceFolder}/venv/bin/python`, or `python3`.
|
|
14
|
+
- **Execute via Resolved Interpreter:**
|
|
15
|
+
`<python_interpreter> -m pip install -e . --no-deps`
|
|
16
|
+
- **Never Run Bare `pip`:** Subshells may point to system Python instead of your project's environment.
|
|
17
|
+
|
|
18
|
+
## Guidelines
|
|
19
|
+
- This project uses `pyproject.toml`. Do not introduce legacy `requirements.txt` files unless explicitly requested.
|
|
20
|
+
- Validate all new dependencies against existing version constraints before adding.
|
|
21
|
+
- **Fail-Fast Guard:** If editable install or build fails, STOP immediately. Output the exact build error log to the user instead of retrying or attempting automated solver loops.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "linter-fixer"
|
|
3
|
+
description: "Enforces typing, formatting, and docstrings on targeted Python files with strict loop bounds across any Python repository."
|
|
4
|
+
tools: ["read_file", "search_workspace", "edit_file", "run_terminal_cmd"]
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the code quality specialist for the Python codebase.
|
|
9
|
+
|
|
10
|
+
## Scope & Target Bounds
|
|
11
|
+
- **Targeted Scope Only:** Inspect and fix ONLY the specific file(s) provided by the user or touched in the current task. Never execute repository-wide lint scans.
|
|
12
|
+
- **Dynamic Package Structure:** Identify the package root by reading `name` in `pyproject.toml` or looking for the primary directory containing `__init__.py`. Tests are located in `tests/`.
|
|
13
|
+
|
|
14
|
+
## Quality Guidelines
|
|
15
|
+
- Ensure public functions and classes in target files have complete type hints and clean Google-style docstrings.
|
|
16
|
+
- Preserve existing comments and docstrings unrelated to your changes.
|
|
17
|
+
- Do not maintain backward-compatibility aliases or legacy shims; use canonical names only.
|
|
18
|
+
|
|
19
|
+
## Execution & Fail-Fast Guard
|
|
20
|
+
- **Resolve Python Interpreter:** Check `.vscode/settings.json` for `"python.defaultInterpreterPath"`, or fall back to `${workspaceFolder}/.venv/bin/python` or `python3`.
|
|
21
|
+
- **Execute Quality Tools via Interpreter:**
|
|
22
|
+
`<python_interpreter> -m ruff check <path_to_file>`
|
|
23
|
+
`<python_interpreter> -m flake8 <path_to_file>`
|
|
24
|
+
- **Missing Tool Guard:** If a requested tool (e.g., `ruff`, `mypy`, `flake8`) is not installed in the environment, DO NOT attempt to install it and DO NOT retry in a loop. Immediately report that the tool is absent and complete your turn.
|
|
25
|
+
- **Single Pass Only (No Infinite Loops):** Never loop continuously trying to achieve "zero warnings". Apply clean fixes in a single pass. If any warnings or type mismatches remain, list them in your final summary and stop.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "test-writer"
|
|
3
|
+
description: "Writes and repairs unit tests for specific modules using pytest with bounded execution across any Python repository."
|
|
4
|
+
tools: ["read_file", "search_workspace", "edit_file", "run_terminal_cmd"]
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the test engineer for this Python package.
|
|
9
|
+
|
|
10
|
+
## Dynamic Environment & Execution
|
|
11
|
+
- **Resolve Python Interpreter:** Before running tests, determine the active Python interpreter:
|
|
12
|
+
1. Check `.vscode/settings.json` for `"python.defaultInterpreterPath"`.
|
|
13
|
+
2. Fall back to `${workspaceFolder}/.venv/bin/python`, `${workspaceFolder}/venv/bin/python`, or `python3`.
|
|
14
|
+
- **Always Execute via the Resolved Interpreter:**
|
|
15
|
+
`<python_interpreter> -m pytest <path_to_test_file> -v`
|
|
16
|
+
- **Never Run Bare `pytest`:** Subshells may lack PATH activation, causing `command not found` or library import errors.
|
|
17
|
+
- **Targeted Test Execution Only:** Run ONLY the specific test file being written or repaired. Never run the full test suite.
|
|
18
|
+
|
|
19
|
+
## Guidelines & Scope
|
|
20
|
+
- **Targeted Scope:** Write or repair tests ONLY for the specific module or function requested by the user. Do not attempt repository-wide test generation.
|
|
21
|
+
- **Test Placement:** Place tests inside the project's test directory (typically `tests/test_<module>.py`).
|
|
22
|
+
- **Test Design:** Verify primary behavior and key boundary/edge cases (e.g., empty inputs, valid ranges). Keep test functions concise and readable.
|
|
23
|
+
- **Fail-Fast Guard (Max 2 Attempts):** If a test fails after 2 repair attempts, STOP. Report the failing assertion, expected behavior, and actual output for user review rather than retrying in an endless loop.
|
|
24
|
+
- **Clean Code:** Use canonical function and class names only. Do not test or introduce legacy backward-compatibility aliases.
|
|
@@ -42,14 +42,6 @@ jobs:
|
|
|
42
42
|
exit 1
|
|
43
43
|
fi
|
|
44
44
|
|
|
45
|
-
- name: Publish to Test PyPI (optional)
|
|
46
|
-
if: github.event.release.prerelease
|
|
47
|
-
env:
|
|
48
|
-
TWINE_USERNAME: __token__
|
|
49
|
-
TWINE_PASSWORD: ${{ secrets.PYPI_TEST }}
|
|
50
|
-
run: |
|
|
51
|
-
twine upload --repository testpypi dist/*
|
|
52
|
-
|
|
53
45
|
- name: Publish to PyPI
|
|
54
46
|
if: "!github.event.release.prerelease"
|
|
55
47
|
env:
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v6.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
exclude: ^meta\.yaml$
|
|
9
|
+
- id: check-added-large-files
|
|
10
|
+
- id: check-merge-conflict
|
|
11
|
+
- id: check-toml
|
|
12
|
+
- id: debug-statements
|
|
13
|
+
- id: mixed-line-ending
|
|
14
|
+
|
|
15
|
+
- repo: https://github.com/psf/black
|
|
16
|
+
rev: 26.10.1
|
|
17
|
+
hooks:
|
|
18
|
+
- id: black
|
|
19
|
+
language_version: python3
|
|
20
|
+
args: [--line-length=88]
|
|
21
|
+
|
|
22
|
+
- repo: https://github.com/pycqa/flake8
|
|
23
|
+
rev: 7.4.1
|
|
24
|
+
hooks:
|
|
25
|
+
- id: flake8
|
|
26
|
+
exclude: ^docs/
|
|
27
|
+
|
|
28
|
+
- repo: https://github.com/pycqa/isort
|
|
29
|
+
rev: 10.0.0b1
|
|
30
|
+
hooks:
|
|
31
|
+
- id: isort
|
|
32
|
+
args: [--profile=black, --line-length=88]
|
|
33
|
+
|
|
34
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
35
|
+
rev: v2.4.0
|
|
36
|
+
hooks:
|
|
37
|
+
- id: mypy
|
|
38
|
+
args: [--ignore-missing-imports, --explicit-package-bases]
|
|
39
|
+
exclude: ^docs/
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
- repo: https://github.com/codespell-project/codespell
|
|
43
|
+
rev: v2.4.3
|
|
44
|
+
hooks:
|
|
45
|
+
- id: codespell
|
|
46
|
+
args: [--write-changes, "--ignore-words-list=aline,pring,afile,hav"]
|
|
47
|
+
exclude: ^(.*\.geojson|.*\.tif|.*\.tiff)$
|
|
48
|
+
|
|
49
|
+
- repo: https://github.com/asottile/pyupgrade
|
|
50
|
+
rev: v3.22.0
|
|
51
|
+
hooks:
|
|
52
|
+
- id: pyupgrade
|
|
53
|
+
args: [--py38-plus]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"python.defaultInterpreterPath": "/Users/changliao/miniforge3/envs/earthenv/bin/python",
|
|
3
|
+
"python.pythonPath": "/Users/changliao/miniforge3/envs/earthenv/bin/python",
|
|
4
|
+
"python.envFile": "${workspaceFolder}/.env",
|
|
5
|
+
"terminal.integrated.env.osx": {
|
|
6
|
+
"PYTHONPATH": "${workspaceFolder}:${env:PYTHONPATH}"
|
|
7
|
+
},
|
|
8
|
+
"editor.renderWhitespace": "all",
|
|
9
|
+
"workbench.colorTheme": "Tomorrow Night Blue",
|
|
10
|
+
"python-envs.defaultEnvManager": "ms-python.python:conda",
|
|
11
|
+
"python-envs.defaultPackageManager": "ms-python.python:conda"
|
|
12
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyearth
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Python for Earth Science.
|
|
5
5
|
Author-email: Chang Liao <changliao.climate@gmail.com>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -14,13 +14,14 @@ Classifier: Operating System :: OS Independent
|
|
|
14
14
|
Classifier: Intended Audience :: Science/Research
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
21
|
Classifier: Topic :: Scientific/Engineering
|
|
21
22
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
22
23
|
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
23
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.9
|
|
24
25
|
Description-Content-Type: text/markdown
|
|
25
26
|
License-File: LICENSE.md
|
|
26
27
|
Requires-Dist: numpy
|
|
@@ -40,18 +41,29 @@ Requires-Dist: mypy; extra == "dev"
|
|
|
40
41
|
Requires-Dist: sphinx; extra == "dev"
|
|
41
42
|
Requires-Dist: sphinx-rtd-theme; extra == "dev"
|
|
42
43
|
Provides-Extra: docs
|
|
44
|
+
Requires-Dist: breathe; extra == "docs"
|
|
43
45
|
Requires-Dist: sphinx; extra == "docs"
|
|
44
46
|
Requires-Dist: sphinx-rtd-theme; extra == "docs"
|
|
45
47
|
Requires-Dist: myst-parser; extra == "docs"
|
|
46
48
|
Provides-Extra: test
|
|
47
49
|
Requires-Dist: pytest>=7.0; extra == "test"
|
|
48
50
|
Requires-Dist: pytest-cov; extra == "test"
|
|
51
|
+
Provides-Extra: mesh
|
|
52
|
+
Requires-Dist: alphashape; extra == "mesh"
|
|
53
|
+
Requires-Dist: geopandas; extra == "mesh"
|
|
54
|
+
Provides-Extra: ocean
|
|
55
|
+
Requires-Dist: cartopy; extra == "ocean"
|
|
56
|
+
Provides-Extra: all
|
|
57
|
+
Requires-Dist: alphashape; extra == "all"
|
|
58
|
+
Requires-Dist: cartopy; extra == "all"
|
|
59
|
+
Requires-Dist: geopandas; extra == "all"
|
|
49
60
|
Dynamic: license-file
|
|
50
61
|
|
|
51
62
|
### PyEarth
|
|
52
63
|
|
|
53
64
|
[](https://zenodo.org/badge/latestdoi/67889575)
|
|
54
|
-
[](https://pepy.tech/project/pyearth)
|
|
65
|
+
[](https://pepy.tech/project/pyearth)
|
|
66
|
+
[](https://anaconda.org/conda-forge/pyearth)
|
|
55
67
|
|
|
56
68
|
Every hiker/camper would love to have a leatherman pocket knife around because it is lightweight, versatile and reliable, sometimes life saving.
|
|
57
69
|
|
|
@@ -175,9 +187,9 @@ Performance-critical geometry and location calculations are accelerated with Cyt
|
|
|
175
187
|
- `pyearth.gis.geometry.kernel` - Fast geometry operations
|
|
176
188
|
- `pyearth.gis.location.kernel` - Efficient location calculations
|
|
177
189
|
|
|
178
|
-
### Related Packages in
|
|
190
|
+
### Related Packages in PyEarthSuite
|
|
179
191
|
|
|
180
|
-
PyEarth works seamlessly with other
|
|
192
|
+
PyEarth works seamlessly with other PyEarthSuite packages:
|
|
181
193
|
|
|
182
194
|
|
|
183
195
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
### PyEarth
|
|
2
2
|
|
|
3
3
|
[](https://zenodo.org/badge/latestdoi/67889575)
|
|
4
|
-
[](https://pepy.tech/project/pyearth)
|
|
4
|
+
[](https://pepy.tech/project/pyearth)
|
|
5
|
+
[](https://anaconda.org/conda-forge/pyearth)
|
|
5
6
|
|
|
6
7
|
Every hiker/camper would love to have a leatherman pocket knife around because it is lightweight, versatile and reliable, sometimes life saving.
|
|
7
8
|
|
|
@@ -125,9 +126,9 @@ Performance-critical geometry and location calculations are accelerated with Cyt
|
|
|
125
126
|
- `pyearth.gis.geometry.kernel` - Fast geometry operations
|
|
126
127
|
- `pyearth.gis.location.kernel` - Efficient location calculations
|
|
127
128
|
|
|
128
|
-
### Related Packages in
|
|
129
|
+
### Related Packages in PyEarthSuite
|
|
129
130
|
|
|
130
|
-
PyEarth works seamlessly with other
|
|
131
|
+
PyEarth works seamlessly with other PyEarthSuite packages:
|
|
131
132
|
|
|
132
133
|
|
|
133
134
|
|