bundestag / gesetze-tools

Scripts to maintain German law git repository
GNU Lesser General Public License v3.0
113 stars 21 forks source link

Cleanup for Python3 #17

Closed darkdragon-001 closed 3 years ago

darkdragon-001 commented 3 years ago

Using 2to3 tool, flynt tool and pyupgrade tool together with manual fixes.

ulfgebhardt commented 3 years ago

This looks good, how can we test it @darkdragon-001 ?

darkdragon-001 commented 3 years ago

@ulfgebhardt I am trying to run all these scripts manually once. I will remove the WIP: prefix once all of them are working.


You should get a working setup for review as well:

$ git clone git@github.com:bundestag/gesetze-tools.git
$ cd gesetze-tools
$ python3 -m pip install -r requirements.txt
$ python3 <myscript.py> --help

All the scripts have will print a help page with usage examples.

ulfgebhardt commented 3 years ago

I will not do that locally, but on workflows thats cool.

I have put this together in 5mins https://github.com/bundestag/gesetze-tools/pull/19 - can you take a look and maybe get it to run? Feel free to merge it into this branch and fix it there so you can setup the right python versions etc.

darkdragon-001 commented 3 years ago

I will not do that locally, but on workflows thats cool.

Why not? You can also run this in a docker container

docker run -it --rm --entrypoint bash python:3.6

I have put this together in 5mins #19 - can you take a look and maybe get it to run? Feel free to merge it into this branch and fix it there so you can setup the right python versions etc.

I will check it out the next days and comment in that PR.

I will remove the WIP: prefix once all of them are working.

Syntax should be fine. Scraper functionality will be restored in separate commits. Can be merged.

ulfgebhardt commented 3 years ago

Feel free to merge