diff --git a/README.md b/README.md index edf06447c6982e5ba66a2741c9eaa5e20e19d998..32d4aee1af112e13503da182e8f9955d51421257 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # hydrolink - + The term "hydrolink" refers to the process of linking spatial data to a stream network. This is similar to the analogy of providing an address on a road network and provides locational context and position within a stream network. Hydrolinking data to a common stream network allows information to be centralized, supporting landscape scale analyses and modeling efforts. Versions of the National Hydrography Dataset (NHD) are often used as a spatial framework for modeling and describing aquatic biological and hydrologic systems at larger geographic scales. @@ -21,7 +21,7 @@ Daniel Wieferich - dwieferich@usgs.gov ## USGS Software Release Information -Wieferich, D.J., Serna, B. 2023. hydrolink Version-1.0.0. U.S. Geological Survey software release. https://doi.org/10.5066/P9DGZVXW. +Wieferich, D.J., Serna, B., Labriola, L. 2023. hydrolink Version-1.0.1. U.S. Geological Survey software release. https://doi.org/10.5066/P9DGZVXW. IP-`151836` diff --git a/hydrolink/__init__.py b/hydrolink/__init__.py index fc193150721be6b30503fecdf9431ae0958a80fd..573429af4c7aa711c5de862b7dc9426ed1641ecb 100644 --- a/hydrolink/__init__.py +++ b/hydrolink/__init__.py @@ -5,4 +5,4 @@ __author__ = """Daniel J Wieferich""" __email__ = 'dwieferich@usgs.gov' # provide version, PEP - three components ("major.minor.micro") -__version__ = '1.0.0' +__version__ = '1.0.1' diff --git a/hydrolink/nhd_hr.py b/hydrolink/nhd_hr.py index 6d4211729fe2a421e8d09070b7f29d28c7f437d8..2e748f675385f66a371f9d023b06b4a87f0deab1 100644 --- a/hydrolink/nhd_hr.py +++ b/hydrolink/nhd_hr.py @@ -22,6 +22,7 @@ from shapely.geometry import Point NHD_BASE_URL = "https://hydromaintenance.nationalmap.gov/arcgis/rest/services/HEM/NHDHigh/MapServer" + class HighResPoint: """Class specific for hydrolinking point data to the NHDHR.""" @@ -114,7 +115,7 @@ class HighResPoint: hydro_type='flowline', outfile_name='nhdhr_hydrolink_output.csv', similarity_cutoff=0.6 - ): + ): """Build hydrolinking pipeline based on specified method and hydro_type. Description @@ -150,7 +151,7 @@ class HighResPoint: """ # Currently these options are hard coded to force a standard approach - hydro_type_options = ['flowline','waterbody'] + hydro_type_options = ['flowline', 'waterbody'] method_options = ['name_match', 'closest'] similarity_cutoff_max = 1.0 similarity_cutoff_min = 0.6 @@ -158,15 +159,15 @@ class HighResPoint: if hydro_type not in hydro_type_options: self.message = f'Parameter hydro_type is restricted to options: {hydro_type_options}.' self.error_handling() - + if method not in method_options: self.message = f'Parameter method is restricted to options: {method_options}.' self.error_handling() - + if 0.6 > similarity_cutoff or 1.0 < similarity_cutoff: self.message = f'Parameter similarity_cutoff should be a float between min: {similarity_cutoff_min} and max: {similarity_cutoff_max}.' self.error_handling() - + if self.status == 1: self.build_nhd_query(query=['hem_flowline', 'hem_waterbody']) if hydro_type == 'waterbody': @@ -211,7 +212,7 @@ class HighResPoint: are not currently included in the tool. In some cases these services split flowlines into multiple layers (e.g., in-network and non-network) and will require multiple service calls (not handled in current code). These services can be accessed at https://hydro.nationalmap.gov/arcgis/rest/services/. - + """ # hem flowlines within a buffer of coordinates diff --git a/hydrolink/nhd_mr.py b/hydrolink/nhd_mr.py index f06cb13f2f871b569ae85347ff841d7a91d03493..b4bb0fd265a4deae389f1aabb42df663cbfdf5f7 100644 --- a/hydrolink/nhd_mr.py +++ b/hydrolink/nhd_mr.py @@ -23,6 +23,7 @@ from shapely.geometry import Point NHD_BASE_URL = "https://watersgeo.epa.gov/arcgis/rest/services/NHDPlus/NHDPlus/MapServer" + class MedResPoint: """Class specific for hydrolinking point data to the NHDPlusV2.1.""" @@ -143,7 +144,7 @@ class MedResPoint: Values between 0 and 1.0, range of similarity between 0 representing no match to 1.0 being perfect match. """ - hydro_type_options = ['flowline','waterbody'] + hydro_type_options = ['flowline', 'waterbody'] method_options = ['name_match', 'closest'] similarity_cutoff_max = 1.0 similarity_cutoff_min = 0.6 @@ -151,11 +152,11 @@ class MedResPoint: if hydro_type not in hydro_type_options: self.message = f'Parameter hydro_type is restricted to options: {hydro_type_options}.' self.error_handling() - + if method not in method_options: self.message = f'Parameter method is restricted to options: {method_options}.' self.error_handling() - + if 0.6 > similarity_cutoff or 1.0 < similarity_cutoff: self.message = f'Parameter similarity_cutoff should be a float between min: {similarity_cutoff_min} and max: {similarity_cutoff_max}.' self.error_handling() diff --git a/requirements_dev.txt b/requirements_dev.txt index 854b58bb0f4fa5e658270919257366f2d3f50582..6f08071330eda33ccc4bce330e15fead60536bac 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -2,4 +2,5 @@ requests==2.28.2 geopandas==0.12.2 pytest==7.2.2 black==23.1.0 -validators==0.20.0 \ No newline at end of file +validators==0.20.0 +bumpversion==0.6.0 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 21ecdbbb0c411f3b6effa68ca3e548ddd4e979af..82b4f585ad6c1c18a0783e236d857c52d19f470a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.0.0 +current_version = 1.0.1 commit = True tag = True @@ -7,8 +7,6 @@ tag = True [bumpversion:file:hydrolink/__init__.py] -[bumpversion:file:code.json] - [bumpversion:file:README.md] search = Version-{current_version} replace = Version-{new_version} diff --git a/setup.py b/setup.py index 3331999645bab0758ba6505b6ea24e772af8e710..37999719b93a4b7fa61c9a99735090b07522206a 100644 --- a/setup.py +++ b/setup.py @@ -38,6 +38,6 @@ setup( test_suite='tests', tests_require=test_requirements, url='https://code.usgs.gov/sas/bioscience/hlt/hydrolink', - version='1.0.0', + version='1.0.1', zip_safe=False, )