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

dev/test setup/notes needed #423

Open
clach04 opened this issue Nov 14, 2022 · 6 comments
Open

dev/test setup/notes needed #423

clach04 opened this issue Nov 14, 2022 · 6 comments

Comments

@clach04
Copy link
Contributor

clach04 commented Nov 14, 2022

It looks like dev testing needs additional libs, I've not got a successful run so not opened a PR.

Idea; add a new requirements file for dev. I think the contents needed is:

$ cat requirements.dev
# 1.3.7
nose
# mock-4.0.3 works with Python 3.8.10
mock
# NOTE elodie.tests.filesystem_test.test_get_file_name_plain hangs... did not without mock?

# Failure: ModuleNotFoundError (No module named 'google_auth_oauthlib') ... ERROR
# 0.7.1
google_auth_oauthlib

# elodie.tests.elodie_test.test_import_file_text hangs next..


$ git diff Readme.md
diff --git a/Readme.md b/Readme.md
index c9d27c2..9515a07 100644
--- a/Readme.md
+++ b/Readme.md
@@ -41,6 +41,12 @@ cd elodie
 pip install -r requirements.txt
 ```

+Dev setup:
+
+    pip install -r requirements.dev
+    elodie/tests/run_tests.py
+
+
 ### Give Elodie a test drive

 Now that you've got the minimum dependencies installed you can start using Elodie. You'll need a photo, video or audio file and a folder you'd like Elodie to organize them into.
@jmathai
Copy link
Owner

jmathai commented Dec 11, 2022

There are a few scattered requirements.txt files. Were you unable to get the testing environment working by installing these dependencies?

https://github.com/jmathai/elodie/blob/master/requirements.txt
https://github.com/jmathai/elodie/blob/master/elodie/tests/requirements.txt
https://github.com/jmathai/elodie/blob/master/elodie/plugins/googlephotos/requirements.txt

Wonder if that can be handled by run_tests.py. This recommends calling out to pip - was hoping for something a bit nicer ... but doable - https://stackoverflow.com/a/50255019.

clach04 added a commit to clach04/elodie that referenced this issue Dec 11, 2022
@clach04
Copy link
Contributor Author

clach04 commented Dec 11, 2022

Thanks @jmathai PR posted. NOTE the last requirements file does NOT work for Python 2.7:

(py2764) C:\code\py\elodie_upstream>python -m pip install -r elodie/plugins/googlephotos/requirements.txt
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-
2-support pip 21.0 will remove support for this functionality.
Collecting google-api-python-client==1.7.9
  Downloading google-api-python-client-1.7.9.tar.gz (142 kB)
     |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 142 kB 1.6 MB/s
Collecting google-auth-oauthlib==0.4.0
  Downloading google_auth_oauthlib-0.4.0-py2.py3-none-any.whl (17 kB)
Collecting oauth2client==4.1.3
  Using cached oauth2client-4.1.3-py2.py3-none-any.whl (98 kB)
Collecting httplib2<1dev,>=0.9.2
  Downloading httplib2-0.21.0.tar.gz (350 kB)
     |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 350 kB 37 kB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting google-auth>=1.4.1
  Downloading google_auth-2.15.0-py2.py3-none-any.whl (177 kB)
     |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 177 kB 2.8 MB/s
Collecting google-auth-httplib2>=0.0.3
  Downloading google_auth_httplib2-0.1.0-py2.py3-none-any.whl (9.3 kB)
Requirement already satisfied: six<2dev,>=1.6.1 in c:\py2764\lib\site-packages (from google-api-python-client==1.7.9->-r elodie/plugins/googlephotos/requirements.
txt (line 1)) (1.9.0)
Collecting uritemplate<4dev,>=3.0.0
  Using cached uritemplate-3.0.1-py2.py3-none-any.whl (15 kB)
Collecting requests-oauthlib>=0.7.0
  Downloading requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Collecting pyasn1>=0.1.7
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting pyasn1-modules>=0.0.5
  Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting rsa>=3.1.4
  Downloading rsa-4.7.1.tar.gz (38 kB)
ERROR: Package 'rsa' requires a different Python: 2.7.18 not in '>=3.5, <4'

I've been looking at different Python versions :-)

If PR is good then this can be closed (py2.7 support would be a different/new issue).

@clach04
Copy link
Contributor Author

clach04 commented Dec 11, 2022

There are a few scattered requirements.txt files. Were you unable to get the testing environment working by installing these dependencies?

https://github.com/jmathai/elodie/blob/master/requirements.txt https://github.com/jmathai/elodie/blob/master/elodie/tests/requirements.txt https://github.com/jmathai/elodie/blob/master/elodie/plugins/googlephotos/requirements.txt

Wonder if that can be handled by run_tests.py. This recommends calling out to pip - was hoping for something a bit nicer ... but doable - https://stackoverflow.com/a/50255019.

I strongly advise against auto pip installing in the test, offering a warning/exit/skip would be significantly safer and less surprising approach.

@jmathai
Copy link
Owner

jmathai commented Dec 11, 2022

Agree on auto installing without user confirmation.

Did you submit a PR?

@clach04
Copy link
Contributor Author

clach04 commented Dec 12, 2022

#442

@clach04
Copy link
Contributor Author

clach04 commented Dec 12, 2022

I may have missed a step :-) posted/linked now

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