Kkevsterrr / geneva

automated censorship evasion for the client-side and server-side
https://censorship.ai
BSD 3-Clause "New" or "Revised" License
1.87k stars 176 forks source link

Make geneva a package #49

Open flandweber opened 1 year ago

flandweber commented 1 year ago

Distributing geneva as python project is desirable because it

I created a draft of how this could look like at https://github.com/VwCSXg/geneva/tree/pyproject. It mostly works, however some tests are failing or not finishing at all and I didn't manage to run pytest even on the main branch which is why I can`t really pin down the problems created by refactoring geneva as a package. Help in fixing those issues would be much appreciated :)

Kaimar666 commented 1 year ago

这是一封自动回复邮件。已经收到您的来信。

Kkevsterrr commented 1 year ago

This is great - thanks so much for putting in this effort! What is currently failing? I'll have some time in the coming weeks to dedicate some dev time to this, and happy to help however I can until then.

Kaimar666 commented 1 year ago

这是一封自动回复邮件。已经收到您的来信。

flandweber commented 1 year ago

Sorry for getting back to you this late, I must've missed the notification.

I generated testresults to start figuring out the problems.

For reproducibillity I used Vagrant with this Vagrantfile.txt (.txt extension because github wont let me upload otherwise) and the following command: cd /vagrant && sudo poetry run pytest --html=pytest_report.html --junitxml junit.xml --timeout 600.

flandweber commented 1 year ago

For comparison I also generated testresults.zip on the current master branch using this Vagrantfile.txt and the command sudo pip install pytest-timeout pytest-html && cd /vagrant && sudo python -m pytest --html=pytest_report.html --junitxml junit.xml --timeout 600.

Are those failing tests a problem with my setup or do you know a solution to them? Should we open a separate issue for those?

Kkevsterrr commented 1 year ago

Thanks for the followup @VwCSXg - sorry it was my turn to miss the notification!

I looked through the results. Overall, most of the failures all appear pretty minor, and it looks like your set up is pretty good.

The tests/test_tree.py::test_pretty_print test seems to indicate a missing dependency dot - this is super minor, and only used for generating diagrams of strategies if the user wishes. Not a big deal.

The tests/test_evolve.py::test_eval_only test was a bit strange to me: I traced through that failure and it looks like that could be caused by an argparsing or argument passing issue. Somehow the valid_http_contains setting is set when it should not be?

Thanks for your testing!

flandweber commented 1 year ago

Thanks for the insights @Kkevsterrr !

I'm afraid I can currently not find the time to finish porting geneva to a module-based structure since I still don't really have a good understanding of it's internals, but I'd be happy to assist anyone who wants to go ahead with the suggestion!