chappertron / lammps-analyser

A linter for the LAMMPS scripting language
GNU General Public License v2.0
0 stars 0 forks source link

Add rerun detection for building the docs files #8

Open chappertron opened 2 months ago

chappertron commented 2 months ago

Only reconvert the docs if the source .rst files have changed, simply based on modified time. Perhaps the hash of the contents might work instead.

How this might be achieved:

The DocInfo might look like this:

@dataclass
class DocInfo:
    src: Path
    dest: Path
    last_modified: float # Seconds since epoch from os.path.getmtime
    indices: List[String] # The Indexes from the files.
    to_reconvert: bool # Whether this file should get re-converted to md.

Other bits of information may be added in the future, such as Version added to lammps etc.