Skip to content

Commit

Permalink
Merge pull request #286 from mdekstrand/tweak/doc-share-bibtex
Browse files Browse the repository at this point in the history
Share BibTeX retrieval across LensKit projects
  • Loading branch information
mdekstrand committed Nov 8, 2021
2 parents 7c71e8b + c1a53b9 commit 85d0582
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
12 changes: 12 additions & 0 deletions lkbuild/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
from invoke import task
from . import env
import yaml
import requests

__ALL__ = [
'dev_lock',
'conda_platform'
]

BIBTEX_URL = 'https://paperpile.com/eb/YdOlWmnlit'
BIBTEX_FILE = Path('docs/lenskit.bib')


@task(iterable=['extras'])
def dev_lock(c, platform=None, extras=None, version=None, blas=None, env_file=False):
Expand Down Expand Up @@ -81,3 +85,11 @@ def conda_platform(c, gh_output=False):
print('::set-output name=conda-platform::' + plat)
else:
print(plat)


@task
def update_bibtex(c):
"Update the BibTeX file"
res = requests.get(BIBTEX_URL)
print('updating file', BIBTEX_FILE)
BIBTEX_FILE.write_text(res.text, encoding='utf-8')
15 changes: 0 additions & 15 deletions tasks.py
Original file line number Diff line number Diff line change
@@ -1,16 +1 @@
from pathlib import Path
import requests
from invoke import task

from lkbuild.tasks import *

BIBTEX_URL = 'https://paperpile.com/eb/YdOlWmnlit'
BIBTEX_FILE = Path('doc/lenskit.bib')


@task
def update_bibtex(c):
"Update the BibTeX file"
res = requests.get(BIBTEX_URL)
print('updating file', BIBTEX_FILE)
BIBTEX_FILE.write_text(res.text, encoding='utf-8')

0 comments on commit 85d0582

Please sign in to comment.