Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Mar 5, 2021
1 parent beddf08 commit 66785aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/events-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Nightly events
# https://jasonet.co/posts/scheduled-actions/
# https://github.saobby.my.eu.orgmunity/t/distinct-job-for-each-schedule/17811/2
on:
push: {}
schedule:
- cron: "0 0 * * *" # At the end of every day

Expand Down
5 changes: 2 additions & 3 deletions requirements/adjust_versions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# stdlib
import os
import platform
import re
import sys
Expand Down Expand Up @@ -29,11 +30,9 @@ def main(path_req: str, torch_version: str = None) -> None:
dep_versions = VERSIONS_LUT.get(torch_version, VERSIONS_NONE)
dep_versions["torch"] = torch_version
for lib in dep_versions:
if not dep_versions[lib]:
continue
version = dep_versions[lib]
replace = f"{lib}=={version}\n"
req = re.sub(rf"{lib}[>=]*[\d\.]*\n", replace, req)
req = re.sub(rf"{lib}[>=]*[\d\.]*{os.linesep}", replace, req)

with open(path_req, "w") as fp:
fp.write(req)
Expand Down

0 comments on commit 66785aa

Please sign in to comment.