pgh-public-meetings / city-scrapers-pitt

Pittsburgh City Scrapers: sourcing public meetings in Pittsburgh
https://pgh-public-meetings.github.io/events/
MIT License
19 stars 66 forks source link

Consider fixing the python version for development #161

Open will-snavely opened 3 years ago

will-snavely commented 3 years ago

We can discuss the pros and cons of this. Currently, we are running three different python versions through CI (3.6, 3.7, 3.8), and our documentation says that you can install any of those python versions. It might be worth just choosing a reasonable version of python and fixing it. It would help with Pipfile issues, for example. It would also make setup a little easier to debug, if we just enforce a single, known-to-work version of Python. Any thoughts?

will-snavely commented 3 years ago

Some text from pipenv's website:

General Recommendations & Version Control

Generally, keep both Pipfile and Pipfile.lock in version control.

Do not keep Pipfile.lock in version control if multiple versions of Python are being targeted.

Specify your target Python version in your Pipfile’s [requires] section. Ideally, you should only have one target
Python version, as this is a deployment tool. python_version should be in the format X.Y and python_full_version 
should be in X.Y.Z format.

From: https://pipenv-fork.readthedocs.io/en/latest/basics.html#general-recommendations-version-control

ben-nathanson commented 3 years ago

If this makes it easier for us to focus on shipping spiders and less on fixing dependencies I'm all for it.

I wonder what the context for this decision was originally - supporting three versions was inherited when we forked the Pittsburgh City Scrapers project. This might be a mechanism for having some flexibility e.g. if a dependency doesn't yet support Python 3.8, we can just fall back to 3.7. That said, I can't recall any problems so far with changes to Python itself.

To the points raised by the Pipenv docs, I would really like to keep Pipfile.lock because it gives us reproducible builds. I'm less attached to having multiple Python versions.

tl;dr I see no problem with just sticking to Python 3.7 and bumping up the version number regularly.

wsnavely commented 3 years ago

I talked about this with Bonnie a little bit after the meeting. I agree that keeping the lock file is a good idea, especially since we are running a daily cron job. We want that to have a consistent setup.

Beyond that, I think we have some options. Some ideas are:

will-snavely commented 3 years ago

Some more things I learned: