Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Make into proper lib add additional dependencies and CLI #32

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

ncoop57
Copy link

@ncoop57 ncoop57 commented May 14, 2022

…nltk punkt

@ncoop57 ncoop57 changed the title Make into proper lib and add additional dependencies and downloading … Make into proper lib add additional dependencies and CLI May 15, 2022
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated
'PyPDF2 == 1.26.0',
'beautifulsoup4 == 4.9.3',
'fastcore == 1.4.2',
'huggingface_hub == 0.6.0',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarification, your commit's goal is to make it into a lib but will it be also pushed to hugging face? And have you considered adding it to PyPI ?

( I see you're the author of #12 )

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The huggingface hub thing was not supposed to be there, I was playing around with some dependencies and forgot to remove that. As for uploading it pypi, I can do that, but I wasn't sure if @paulbricman you were interested in having the keys to the kingdom so to speak for managing the pypi package. If not, I can get it setup on PyPi

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the meantime, can you double check the dependencies to make sure all are needed ? That means removing huggingface_hub to start with.

For the PyPi let's wait on @paulbricman's answer

@ncoop57
Copy link
Author

ncoop57 commented May 21, 2022

@thiswillbeyourgithub I think I address all your comments. Lemme know what you think


if not file.exists():
print("File not found!")
raise SystemExit()
else:
full_text = file.read_text()
full_text = file.read_text()[:1_000]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be best to reduce the size of the example text rather than silently reading only a portion don't you think ? Anyhow why do you feel this is necessary ? Is the text really that big ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was doing it to get quick results since it is an example script. I think it would be easier for people understand the output. I agree, it would be better to reduce the example text than this since people might not look to closely at it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not that big so I'll go ahead and just undo this change here and leave the file alone

with open(output_file.absolute(), "a") as of:
of.write(string)
auto.consume_var(full_text)
auto.to_json("output.json", prefix="")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this a substantial change, can you confirrmed you have tested it ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I've tested it. The other way kept failing since it was made with an outdated API. I'm betting the other examples also don't work, but I haven't looked at those

@@ -0,0 +1,39 @@
from autocards.autocards import Autocards
from fastcore.script import *
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity, I would prefer avoiding star import if you don't mind.

sys.path.append("../../.")
from autocards import Autocards
# import sys
# sys.path.append("../../.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comment it instead of removing it?

@thiswillbeyourgithub
Copy link
Collaborator

thiswillbeyourgithub commented May 22, 2022

Thanks a lot for the improvement! I added a few questions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants