Skip to content

Commit

Permalink
Discovery changes for V2.0.0 (#737)
Browse files Browse the repository at this point in the history
* ENH: Updates for V2.0.0 to rename discovery codes to a standard

* ENH: Adding documentation for IO naming convention as well.

* ENH: PEP8
  • Loading branch information
AdamTheisen authored Nov 29, 2023
1 parent 3cd0a2e commit eb45a45
Show file tree
Hide file tree
Showing 22 changed files with 49 additions and 1,627 deletions.
8 changes: 0 additions & 8 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,3 @@ omit =
versioneer.py
setup.py
act/plotting/histogramdisplay.py
act/discovery/get_arm.py
act/discovery/arm.py
act/discovery/airnow.py
act/discovery/asos.py
act/discovery/cropscape.py
act/discovery/neon.py
act/discovery/noaapsl.py
act/discovery/surfrad.py
12 changes: 12 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,18 @@ the tools documentation for details on this process.
- https://flake8.pycqa.org/en/latest/
- https://www.pylint.org/

Naming Convenction
----------------------------------------

Discovery
~~~~~~~~~
When adding discovery modules or functions please adhere to the following
* Filenames should just include the name of the organization (arm) or portal (airnow) and no other filler words like get or download
* Functions should follow [get/download]_[org/portal]_[data/other description]. If it is getting data but not downloading a file, it should start with get, like get_asos_data. If it downloads a file, it should start with download. The other description can vary depending on what you are retrieving. Please check out the existing functions for ideas.

Discovery
~~~~~~~~~
Similarly, for the io modules, the names should not have filler and just be the organization or portal name. The functions should clearly indicate what it is doing like read_arm_netcdf instead of read_netcdf if the function is specific to ARM files.

Adding Secrets and Environment Variables
----------------------------------------
Expand Down
17 changes: 8 additions & 9 deletions act/discovery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@

__getattr__, __dir__, __all__ = lazy.attach(
__name__,
submodules=['get_armfiles', 'get_cropscape', 'get_airnow', 'get_noaapsl', 'get_neon', 'get_surfrad'],
submodules=['arm', 'cropscape', 'airnow', 'noaapsl', 'neon', 'surfrad'],
submod_attrs={
'get_arm': ['download_arm_data'],
'get_armfiles': ['download_data', 'download_arm_data', 'get_arm_doi'],
'get_asos': ['get_asos'],
'get_airnow': ['get_airnow_bounded_obs', 'get_airnow_obs', 'get_airnow_forecast'],
'get_cropscape': ['croptype'],
'get_noaapsl': ['download_noaa_psl_data'],
'get_neon': ['get_site_products', 'get_product_avail', 'download_neon_data'],
'get_surfrad': ['download_surfrad']
'arm': ['download_arm_data', 'get_arm_doi'],
'asos': ['get_asos_data'],
'airnow': ['get_airnow_bounded_obs', 'get_airnow_obs', 'get_airnow_forecast'],
'cropscape': ['get_crop_type'],
'noaapsl': ['download_noaa_psl_data'],
'neon': ['get_neon_site_products', 'get_neon_product_avail', 'download_neon_data'],
'surfrad': ['download_surfrad_data']
},
)
261 changes: 0 additions & 261 deletions act/discovery/get_airnow.py

This file was deleted.

Loading

0 comments on commit eb45a45

Please sign in to comment.