CarperAI / Code-Pile

This repository contains all the code for collecting large scale amounts of code from GitHub.
MIT License
105 stars 29 forks source link

Competitive Programming Dataset (Topcoder + CodeContest + Google Code Jam) #24

Closed PhungVanDuy closed 1 year ago

ncoop57 commented 1 year ago

@PhungVanDuy this looks really good!!!! The only thing left I think would to do the same thing I specified in the other PR. Basically just reorganizing the unit tests to be pytest compliant.

PhungVanDuy commented 1 year ago

@ncoop57 I just replace gdrive with S3, and adapt the new codepile structure, please check.

ncoop57 commented 1 year ago

@PhungVanDuy thanks for updating that! The pytest still doesn't seem to be working correctly. When running pytest, I get the following error:

____________________________________________________________ ERROR collecting codepile/competitive_programming/competitive_test.py ____________________________________________________________
ImportError while importing test module '/workspaces/Code-Pile/codepile/competitive_programming/competitive_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/python/3.10.4/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
codepile/competitive_programming/competitive_test.py:4: in <module>
    from topcoder import TopCoderDataset
E   ModuleNotFoundError: No module named 'topcoder'

Also, to use pytest, you need to have the test file's name as test_*.py or *_test.py. If you enable maintainer editing, I can give a shot at fixing some of the issues: https://github.blog/2016-09-07-improving-collaboration-with-forks/

PhungVanDuy commented 1 year ago

@ncoop57 thank you for your comment, it's strange when my local still works and topcoder.py is available, anyway this line is not necessary anymore, I just updated the code file and renamed tests.py --> cp_test.py. Please check again.

ncoop57 commented 1 year ago

LGTM, merging