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

[WIP] Update to pandas 1.5, python 3.8 #186

Closed
wants to merge 1 commit into from

Conversation

willcohen
Copy link
Contributor

Description

In trying to add this to nixpkgs, which includes pandas 1.5.x, this can't be added. pandas was pinned to 1.3 in #108, but I assume that later versions have settled down enough for this to update. This also requires a min python version of 3.8.

Has This Been Tested?

Some FutureWarnings:

================================================================== PASSES ==================================================================

---------- coverage: platform darwin, python 3.9.12-final-0 ----------
Name                                                        Stmts   Miss  Cover
-------------------------------------------------------------------------------
camply/__init__.py                                              6      0   100%
camply/__main__.py                                              3      3     0%
camply/_version.py                                              4      0   100%
camply/cli.py                                                 222     44    80%
camply/config/__init__.py                                       7      0   100%
camply/config/api_config.py                                    30      0   100%
camply/config/data_columns.py                                  23      0   100%
camply/config/file_config.py                                   11      0   100%
camply/config/logging_config.py                                25      4    84%
camply/config/notification_config.py                           44      0   100%
camply/config/search_config.py                                 27      0   100%
camply/config/yellowstone_config.py                            50      0   100%
camply/containers/__init__.py                                   3      0   100%
camply/containers/api_responses.py                            152      4    97%
camply/containers/base_container.py                            21      1    95%
camply/containers/data_containers.py                           57      2    96%
camply/containers/gtc_api_responses.py                          9      0   100%
camply/notifications/__init__.py                                9      0   100%
camply/notifications/base_notifications.py                     36      3    92%
camply/notifications/email_notifications.py                    59     40    32%
camply/notifications/multi_provider_notifications.py           40     22    45%
camply/notifications/pushbullet.py                             37     26    30%
camply/notifications/pushover.py                               41      9    78%
camply/notifications/silent_notifications.py                   16      7    56%
camply/notifications/slack.py                                  44     33    25%
camply/notifications/telegram.py                               43     30    30%
camply/notifications/twilio.py                                 34     23    32%
camply/providers/__init__.py                                    8      0   100%
camply/providers/base_provider.py                               5      0   100%
camply/providers/going_to_camp/__init__.py                      0      0   100%
camply/providers/going_to_camp/going_to_camp_provider.py      195     28    86%
camply/providers/recreation_dot_gov/__init__.py                 0      0   100%
camply/providers/recreation_dot_gov/recdotgov_provider.py     306     43    86%
camply/providers/xanterra/__init__.py                           0      0   100%
camply/providers/xanterra/yellowstone_lodging.py              167     16    90%
camply/search/__init__.py                                       7      0   100%
camply/search/base_search.py                                  301    125    58%
camply/search/search_going_to_camp.py                          66     13    80%
camply/search/search_recreationdotgov.py                      107     20    81%
camply/search/search_yellowstone.py                            52      4    92%
camply/utils/__init__.py                                        4      0   100%
camply/utils/api_utils.py                                      21     13    38%
camply/utils/configure_camply.py                               57     44    23%
camply/utils/general_utils.py                                  14      1    93%
camply/utils/logging_utils.py                                  38      3    92%
camply/utils/yaml_utils.py                                     55      9    84%
-------------------------------------------------------------------------------
TOTAL                                                        2456    570    77%

========================================================= short test summary info ==========================================================
PASSED tests/test_notifications.py::test_pushover_message
PASSED tests/test_notifications.py::test_pushover_campsite
PASSED tests/cli/test_campgrounds.py::test_list_recdotgov_campgrounds
PASSED tests/cli/test_campgrounds.py::test_campground_search_by_recarea_id
PASSED tests/cli/test_campgrounds.py::test_campground_search_by_campsite_id
PASSED tests/cli/test_campgrounds.py::test_campground_search_yellowstone
PASSED tests/cli/test_campsites.py::test_no_options_passed
PASSED tests/cli/test_campsites.py::test_search_by_recarea
PASSED tests/cli/test_campsites.py::test_search_by_campground
PASSED tests/cli/test_campsites.py::test_search_by_another_yaml
PASSED tests/cli/test_campsites.py::test_search_by_campsite_id
PASSED tests/cli/test_campsites.py::test_search_by_equipment
PASSED tests/cli/test_campsites.py::test_search_multiple_campsites
PASSED tests/cli/test_campsites.py::test_search_error_prone_campground
PASSED tests/cli/test_going_to_camp.py::test_goingtocamp_list_recareas
PASSED tests/cli/test_going_to_camp.py::test_goingtocamp_equipment_types
PASSED tests/cli/test_main.py::test_main_succeeds
PASSED tests/cli/test_main.py::test_debug
PASSED tests/cli/test_recreation_areas.py::test_search_recreation_areas
PASSED tests/search_providers/test_goingtocamp_search.py::test_going_to_camp_get_all_campsites
PASSED tests/search_providers/test_recdotgov_search.py::test_get_searchable_campgrounds_recarea
PASSED tests/search_providers/test_recdotgov_search.py::test_get_searchable_campgrounds_campground
PASSED tests/search_providers/test_recdotgov_search.py::test_get_campsite_specific_campgrounds
PASSED tests/search_providers/test_yellowstone_search.py::test_yellowstone_get_all_campsites
FAILED tests/cli/test_campsites.py::test_search_by_yaml - FutureWarning: In a future version of pandas, a length 1 tuple will be returned when iterating over a groupby with a grouper equal to a...
FAILED tests/cli/test_campsites.py::test_search_nights - FutureWarning: In a future version of pandas, a length 1 tuple will be returned when iterating over a groupby with a grouper equal to a...
FAILED tests/cli/test_campsites.py::test_search_yellowstone - FutureWarning: In a future version of pandas, a length 1 tuple will be returned when iterating over a groupby with a grouper equal to a...
FAILED tests/cli/test_campsites.py::test_search_by_yellowstone_campground - FutureWarning: In a future version of pandas, a length 1 tuple will be returned when iterating over a groupby with a grouper equal to a...
FAILED tests/cli/test_campsites.py::test_search_persist_json - FileNotFoundError: [Errno 2] No such file or directory: '/Users/wcohen/programming/python/camply/test_file.json'
FAILED tests/cli/test_campsites.py::test_search_persist_pickle - FileNotFoundError: [Errno 2] No such file or directory: '/Users/wcohen/programming/python/camply/test_file.pickle'
FAILED tests/cli/test_going_to_camp.py::test_goingtocamp_search_by_equipment_types - FutureWarning: In a future version of pandas, a length 1 tuple will be returned when iterating over a groupby with a grouper equal to a...
FAILED tests/search_providers/test_recdotgov_search.py::test_get_all_campsites_recarea - FutureWarning: In a future version of pandas, a length 1 tuple will be returned when iterating over a groupby with a grouper equal to a...
FAILED tests/search_providers/test_recdotgov_search.py::test_get_all_campsites_campground - FutureWarning: In a future version of pandas, a length 1 tuple will be returned when iterating over a groupby with a grouper equal to a...
FAILED tests/search_providers/test_recdotgov_search.py::test_get_campsite_specific_results - FutureWarning: In a future version of pandas, a length 1 tuple will be returned when iterating over a groupby with a grouper equal to a...
====================================================== 10 failed, 24 passed in 55.37s ======================================================
ERROR: InvocationError for command /Users/wcohen/programming/python/camply/.tox/py/bin/pytest -rA --capture=sys --cov=camply tests/ (exited with code 1)
flake8 create: /Users/wcohen/programming/python/camply/.tox/flake8
flake8 installdeps: flake8, flake8-bugbear, flake8-docstrings, flake8-typing-imports, pep8-naming
flake8 installed: attrs==22.2.0,flake8==6.0.0,flake8-bugbear==23.1.14,flake8-docstrings==1.6.0,flake8-typing-imports==1.14.0,mccabe==0.7.0,pep8-naming==0.13.3,pycodestyle==2.10.0,pydocstyle==6.2.3,pyflakes==3.0.1,snowballstemmer==2.2.0
flake8 run-test-pre: PYTHONHASHSEED='1114487092'
flake8 run-test: commands[0] | flake8 camply/ tests/
camply/config/notification_config.py:55:9: B028 'DEFAULT_SUBJECT_LINE' is manually surrounded by quotes, consider using the `!r` conversion flag.
camply/notifications/pushover.py:103:29: B028 'value' is manually surrounded by quotes, consider using the `!r` conversion flag.
camply/providers/going_to_camp/going_to_camp_provider.py:127:21: B028 'search_string' is manually surrounded by quotes, consider using the `!r` conversion flag.
camply/providers/going_to_camp/going_to_camp_provider.py:338:26: B028 'rec_area_id' is manually surrounded by quotes, consider using the `!r` conversion flag.
camply/providers/recreation_dot_gov/recdotgov_provider.py:96:21: B028 'search_string' is manually surrounded by quotes, consider using the `!r` conversion flag.
camply/utils/configure_camply.py:98:28: B028 'config_value' is manually surrounded by quotes, consider using the `!r` conversion flag.
ERROR: InvocationError for command /Users/wcohen/programming/python/camply/.tox/flake8/bin/flake8 camply/ tests/ (exited with code 1)
_________________________________________________________________ summary __________________________________________________________________
ERROR:   py: commands failed
ERROR:   flake8: commands failed

Checklist:

  • I've read the contributing guidelines of this project
  • I've installed and used .pre_commit on all my code
  • I have documented my code, particularly in hard-to-understand areas
  • I have made any necessary corresponding changes to the documentation

@willcohen willcohen changed the title Update to pandas 1.5, python 3.8 [WIP] Update to pandas 1.5, python 3.8 Jan 18, 2023
@willcohen willcohen marked this pull request as draft January 18, 2023 14:52
@juftin
Copy link
Owner

juftin commented Jan 19, 2023

Nice, thanks @willcohen. The project is currently pinned on Pandas 1.3 due to compatibility with Python 3.7+. Right now I'm undecided on exactly when to abandon Python 3.7. I was planning to officially stop supporting 3.7 when it goes EOL (2023-06-27) - but could be open to doing this sooner if it helps get camply into more peoples hands and not less. What do you think?

@juftin
Copy link
Owner

juftin commented Apr 23, 2023

Hey @willcohen, camply has been upgraded to Python 3.8 and Pandas 1.5. Hopefully this unblocks your nixpkgs work.

@juftin juftin closed this Apr 23, 2023
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

Successfully merging this pull request may close these issues.

2 participants