icesat2py / icepyx

Python tools for obtaining and working with ICESat-2 data
https://icepyx.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
219 stars 107 forks source link

Integration tests can only be run with the password to the `"icepyx_devteam"` URS account #614

Open mfisher87 opened 2 months ago

mfisher87 commented 2 months ago

I work around this with this change:

diff --git a/icepyx/tests/conftest.py b/icepyx/tests/conftest.py
index 5bc5eb8..4c643f6 100644
--- a/icepyx/tests/conftest.py
+++ b/icepyx/tests/conftest.py
@@ -35,7 +35,11 @@ def email():

 def pytest_configure(config):
     # append to netrc file and set permissions level
-    args = ("icepyx_devteam", "urs.earthdata.nasa.gov", os.getenv("NSIDC_LOGIN"))
+    args = (
+        os.getenv("EARTHDATA_USERNAME"),
+        "urs.earthdata.nasa.gov",
+        os.getenv("EARTHDATA_PASSWORD"),
+    )
     netrc_file = os.path.join(os.path.expanduser("~"), ".netrc")
     with open(netrc_file, "a+") as f:
         f.write("machine {1} login {0} password {2}\n".format(*args))

But I'm not sure why this is the way it is, so I figured I'd start with an issue :)