GEUS-Glaciology-and-Climate / pypromice

Process AWS data from L0 (raw logger) through Lx (end user)
https://pypromice.readthedocs.io
GNU General Public License v2.0
12 stars 4 forks source link

Entry points fix #196

Closed PennyHow closed 8 months ago

PennyHow commented 9 months ago

This PR addresses the issue raised with generating a conda-forge feedstock for pypromice, as noted here: https://github.com/conda-forge/staged-recipes/pull/22932. I also opened an issue to highlight this #195

The CLI scripts (found in the bin/ directory) have now been moved to their respective modules in pypromice. The CLI scripts are now mapped in the pypromice package setup.py as entry_points rather than scripts. By doing so, the conda-forge package for pypromice should be compatible across all platforms (linux, os, windows). In pypi package testing, it all seems to work fine.

I've also put in some unit tests for the CLI scripts. These are held in each of the modules' unittest classes. To call on the CLI functionality, I have been using os.system() and merely test that the help prompt can be loaded.

Warning: if we implement this on our servers then our shell scripts in the aws-operational-processing repo will need to be altered because of the slight difference in CLI function names. I mainly did this because I think the syntax for function names needs updating... happy to change this back if it is too troublesome, but at some point I would like to change the naming conventions in pypromice so that we have consistency.

PennyHow commented 9 months ago

Branch opened on aws-operational-processing with changed pypromice CLI names: https://github.com/GEUS-Glaciology-and-Climate/aws-operational-processing/tree/update-pypromice-names