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

What is the READTHEDOCS environment variable for? #13

Open
NikosAlexandris opened this issue Dec 1, 2020 · 1 comment
Open

What is the READTHEDOCS environment variable for? #13

NikosAlexandris opened this issue Dec 1, 2020 · 1 comment

Comments

@NikosAlexandris
Copy link
Contributor

At https://github.com/dimartinot/gee_sar_fetcher/blob/dev/geesarfetcher/__init__.py#L23-L24,
what is this variable meant for?

@dimartinot
Copy link
Owner

I build the official documentation of the app using READTHEDOCS (you can access it at this address: https://gee-sar-fetcher.readthedocs.io/en/latest/?badge=latest ).

This documentation process calls the different Python files of the app and then executes any code within these files, including this ee.Initialize() line, that is only expected to be called when the library is imported. To prevent this from being called when reathedocs builds documentation, I just check wether an env variable is set or not. The presence of the READTHEDOCS variable is used to make the check.

Hope I was understandable enough :) !

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