Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS- and API-key dependencies in examples #9

Open
dataspider opened this issue Nov 2, 2024 · 1 comment
Open

OS- and API-key dependencies in examples #9

dataspider opened this issue Nov 2, 2024 · 1 comment

Comments

@dataspider
Copy link

Please make the examples independent of your operating system and your API key.

You have lines like file_path = "/Users/matthewpreisser/Documents/Research/Codes/SVInsight" (looks like MacOS) in svinsight_example_Harris_County.py or file_path = "C:/Users/pp7545/Documents/research/SVInsight" (looks like Windows) in SVInsight_example_SETx.ipynb (you might also want to include jupyterlab in the dev dependencies, btw).
Instead of those, programmatically generate the absolute paths to match the OS your code is run on or tell people to create some kind of .env file to specify your root and read the env via a suitable library.

Regarding the API key: You are redistributing the census data for two countries with the repository, so it seems that you could easily use these data to demonstrate your functionality without making API calls (and then just have an API call demo in a separate example). I don't want to have to get an API key just to try out some software (I know that many people working in your field will have one anyway, but relying on an API key in the examples is unnecessary, so why not make the package more accessible?).
Please also check the data licensing situation for the data that you are redistributing, and include the applicable licensing terms in a DATALICENSE file or as a separate section of your license file.

openjournals/joss-reviews#7212

@mdp0023
Copy link
Owner

mdp0023 commented Nov 10, 2024

Thank you for the suggestion and I agree this will increase the accessibility of the package for first time users. Since the data download functions won’t redownload the input data with the default overwrite parameter (overwrite=False), and as you mentioned the data is provided with the package, the examples should work now without requiring a current API. I also removed the file paths and made them absolute paths, thank you for catching that. The appropriate language has also been added to the license with regard to the included data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants