https://github.com/mdanalysis/mdalint
Proof of concept for a MDAnalysis linter
https://github.com/mdanalysis/mdalint
Last synced: 3 months ago
JSON representation
Proof of concept for a MDAnalysis linter
- Host: GitHub
- URL: https://github.com/mdanalysis/mdalint
- Owner: MDAnalysis
- License: gpl-2.0
- Created: 2022-03-18T10:42:22.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-18T14:02:45.000Z (over 4 years ago)
- Last Synced: 2024-10-29T17:34:54.118Z (over 1 year ago)
- Language: Python
- Size: 14.6 KB
- Stars: 4
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
MDA Lint
========
*MDA Lint is only a prototype!*
MDA Lint is a linter for MDAnalysis and for programs using MDAnalysis. It
detects the use of MDAnalysis's API, makes sure they are applied appropriately,
and offers suggestions to fix and improved their usage. The linter also awards
badges when it recognises good practices advocated by MDAnalysis.
## Usage
```bash
mdalint /path/to/library/root
```
At the end of a run, the program lists the badges that were awarded as well as
errors and warnings that were detected.
## Badges
### AnalysisBase
The tested program implements at least one analysis using the [`AnalysisBase`
API](https://docs.mdanalysis.org/stable/documentation_pages/analysis/base.html).
This API allows to implement multi-frame analyses in a way that is consistent.
In most cases, it allows analyses to benefit from improvements to MDAnalysis
without modification.
The badge is assigned when at least one class inherit from `AnalysisBase` and
implements a `_single_frame` method.
#### Errors
An error is issued when:
* a class inherit from `AnalysisBase` but does not
implements the `_single_frame` method.
* the `run` method is overwritten and does not have the `start`, `stop`,
`step`, and `verbose` arguments.
#### Warnings
A warning is issued when:
* the `run` method is overwritten.
* the `_prepare`, `_single_frame`, or `_conclude` method take unexpected
arguments.
* neither the `_single_frame` nor the `_conclude` method assign values in the
`results` attribute.
### Reader
### Parser
### Writer
### Topology attribute
### Selection keyword