Skip to content


Browse files Browse the repository at this point in the history
fix: disable mtime retrieval from github api for now. This quickly ex…
…ceeds rate limits.
  • Loading branch information
johanneskoester committed Mar 4, 2022
1 parent 4586ef7 commit 1858bb9
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions snakemake/
Expand Up @@ -233,18 +233,6 @@ class GithubFile(HostingProviderFile):
def get_path_or_uri(self):
return "{}/raw/{}/{}".format(self.repo, self.ref, self.path)

def mtime(self):
import requests

url = f"{self.repo}/commits?path={self.path}&page=1&per_page=1"
mtime = requests.get(url).json()[0]["commit"]["committer"]["date"]
assert mtime.endswith(
), "bug: expected suffix Z on Github provided time stamp"
# assume UTC and make it understandable to fromisoformat
mtime = mtime[:-1] + "+00:00"
return datetime.fromisoformat(mtime).timestamp()

class GitlabFile(HostingProviderFile):
def __init__(
Expand Down

0 comments on commit 1858bb9

Please sign in to comment.