-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
2,179 additions
and
1,704 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
from pathlib import Path | ||
|
||
from .build import DocBuilder | ||
|
||
|
||
def finalize_builddir(repo_name): | ||
'Bookkeeping on the docs build directory' | ||
root = Path('_build') / repo_name | ||
with open(root / '.nojekyll', 'w') as fh: | ||
fh.write('') | ||
"Bookkeeping on the docs build directory" | ||
root = Path("_build") / repo_name | ||
with open(root / ".nojekyll", "w") as fh: | ||
fh.write("") | ||
|
||
|
||
def build_root(repo_name): | ||
'''Build the top-level documentation. | ||
"""Build the top-level documentation. | ||
See :py:mod:`.build` on building sub-projects. | ||
''' | ||
with DocBuilder(repo_name, '.') as builder: | ||
""" | ||
with DocBuilder(repo_name, ".") as builder: | ||
builder.build() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
from datetime import date | ||
import subprocess | ||
from datetime import date | ||
|
||
|
||
def get_tag_infos(cut_off_date): | ||
'''Get fluent.* tags newer than cut_off_date. | ||
"""Get fluent.* tags newer than cut_off_date. | ||
TagInfo objects are ordered by committer date, newest first. | ||
''' | ||
""" | ||
taglines = subprocess.run( | ||
[ | ||
'git', 'tag', '--list', 'fluent.*', | ||
'--sort=-committerdate', | ||
'--format=%(refname:lstrip=2) %(committerdate:short)', | ||
"git", | ||
"tag", | ||
"--list", | ||
"fluent.*", | ||
"--sort=-committerdate", | ||
"--format=%(refname:lstrip=2) %(committerdate:short)", | ||
], | ||
encoding='utf-8', | ||
encoding="utf-8", | ||
stdout=subprocess.PIPE, | ||
check=True | ||
check=True, | ||
).stdout.splitlines() | ||
return [ | ||
ti for ti in (TagInfo(line) for line in taglines) | ||
if ti.date > cut_off_date | ||
] | ||
return [ti for ti in (TagInfo(line) for line in taglines) if ti.date > cut_off_date] | ||
|
||
|
||
class TagInfo: | ||
def __init__(self, tagline): | ||
tag, date_string = tagline.split(' ') | ||
self.project, self.version = tag.split('@') | ||
tag, date_string = tagline.split(" ") | ||
self.project, self.version = tag.split("@") | ||
self.date = date.fromisoformat(date_string) | ||
|
||
@property | ||
def tag(self): | ||
return f'{self.project}@{self.version}' | ||
return f"{self.project}@{self.version}" | ||
|
||
def __repr__(self): | ||
return f'{self.tag} ({self.date})' | ||
return f"{self.tag} ({self.date})" |
Oops, something went wrong.