At the beginning of November Adam Johnson tweeted
I’ve come up with a test that we can use to decide whether a new package we’re considering depending on is well-maintained.
and linked to an article he wrote.
He came up (with the help of Twitter) twelve questions to ask of any library that you're looking at:
- Is it described as “production ready”?
- Is there sufficient documentation?
- Is there a changelog?
- Is someone responding to bug reports?
- Are there sufficient tests?
- Are the tests running with the latest <Language> version?
- Are the tests running with the latest <Integration> version?
- Is there a Continuous Integration (CI) configuration?
- Is the CI passing?
- Does it seem relatively well used?
- Has there been a commit in the last year?
- Has there been a release in the last year?
I thought it would be interesting to turn that checklist into a Click App using Simon Willison's Click App Cookiecutter.
I set out in earnest to do just that on November 8th.
I started by using the GitHub API to try and answer the questions, but quickly found that it couldn't answer them all. Then I cam across the PyPI API which helped to answer almost all of them programatically.
There's still a bit of work to do to get it where I want it to, but it's pretty sweet that I can now run a simple command and review the output to see if the package is well maintained.
You can even try it on the package I wrote!
Which will return (as of this writing) the output below:
1. Is it described as 'production ready'? The project is set to Development Status Beta 2. Is there sufficient documentation? Documentation can be found at https://github.com/ryancheley/the-well-maintained-test/blob/main/README.md 3. Is there a changelog? Yes 4. Is someone responding to bug reports? The maintainer took 0 days to respond to the bug report It has been 2 days since a comment was made on the bug. 5. Are there sufficient tests? [y/n]: y Yes 6. Are the tests running with the latest Language version? The project supports the following programming languages - Python 3.7 - Python 3.8 - Python 3.9 - Python 3.10 7. Are the tests running with the latest Integration version? This project has no associated frameworks 8. Is there a Continuous Integration (CI) configuration? There are 2 workflows - Publish Python Package - Test 9. Is the CI passing? Yes 10. Does it seem relatively well used? The project has the following statistics: - Watchers: 0 - Forks: 0 - Open Issues: 1 - Subscribers: 1 11. Has there been a commit in the last year? Yes. The last commit was on 11-20-2021 which was 2 days ago 12. Has there been a release in the last year? Yes. The last commit was on 11-20-2021 which was 2 days ago
There is still one question that I haven't been able to answer programmatically with an API and that is:
Are there sufficient tests?
When that question comes up, you're prompted in the terminal to answer either
But, it does leave room for a fix by someone else!