Skip to content

Commit 9a3e9ac

Browse files
jaimergpgoanpeca
andcommitted
Generate CFEP with Python again
Co-authored-by: Gonzalo Peña-Castellanos <[email protected]>
1 parent 2c271f2 commit 9a3e9ac

File tree

4 files changed

+15
-32
lines changed

4 files changed

+15
-32
lines changed

.ci_scripts/generate_cfep_index.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
TITLE_PATTERN = "<td>\s*Title\s*</td><td>\s*(.*)\s*</td>"
1313
STATUS_PATTERN = "<td>\s*Status\s*</td><td>\s*(.*)\s*</td>"
1414
REPO_DIR = Path(__file__).parents[1].absolute()
15-
CFEP_INDEX_RST = REPO_DIR / "sphinx" / "src" / "orga" / "cfep-index.rst"
15+
CFEP_INDEX_MD_TMPL = REPO_DIR / "docs" / "orga" / "cfep-index.md.tmpl"
16+
CFEP_INDEX_MD = REPO_DIR / "docs" / "orga" / "cfep-index.md"
1617

1718

1819
@dataclass
@@ -93,16 +94,13 @@ def get_cfeps():
9394

9495

9596
def write_cfep_index():
96-
contents = CFEP_INDEX_RST.read_text()
97-
if ".. REPLACE-THIS-LINE-WITH-THE-INDEX-OF-CFEPs" not in contents:
98-
print("!!! Skipping writing CFEP index. Already rendered?", file=sys.stderr)
99-
return
100-
rst_links = [f"- {cfep.rst_link()}" for cfep in get_cfeps()]
97+
contents = CFEP_INDEX_MD_TMPL.read_text()
98+
md_links = [f"- {cfep.md_link()}" for cfep in get_cfeps()]
10199
contents = contents.replace(
102-
".. REPLACE-THIS-LINE-WITH-THE-INDEX-OF-CFEPs",
103-
"\n".join(rst_links)
100+
"{{ cfep_list }}",
101+
"\n".join(md_links)
104102
)
105-
CFEP_INDEX_RST.write_text(contents)
103+
CFEP_INDEX_MD.write_text(contents)
106104

107105

108106
if __name__ == "__main__":

.ci_scripts/update_docs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ if [[ "$CI" == "1" ]]; then
1212
git checkout -b new_site_content
1313
fi
1414

15-
# TODO:
16-
# - Generate CFEP
15+
python "$BASE_DIR/.ci_scripts/generate_cfep_index.py"
16+
1717
# - Core and emeritus teams
1818

1919
# Build docusaurus site
@@ -24,5 +24,6 @@ npm run build
2424
# we can't redirect with the Docusaurus plugin, so just copy it
2525
cp build/news/rss.xml build/docs/news.rss
2626

27-
echo "Built website! Preview at http://localhost:8000 with:"
27+
echo "Built website! Preview with one of:"
2828
echo " python -m http.server -d build/"
29+
echo " npm run serve"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ sphinx/newsfeed/demo/_build
2929
# Docusaurus production
3030
/build
3131

32+
# Autogenerated at build time
33+
/docs/orga/cfep-index.md
34+
3235
# Generated files
3336
.docusaurus
3437
.cache-loader

docs/orga/cfep-index.md.tmpl

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,4 @@ These CFEPs are similar to [Python's PEP](https://www.python.org/dev/peps/) and
1414
CFEPs are stored in the [cfep GitHub repository](https://github.com/conda-forge/cfep).
1515
A list of conda-forge enhancement proposals (CFEP) are as follows:
1616

17-
- [CFEP-00: CFEP Template](https://github.com/conda-forge/cfep/blob/main/cfep-00.md) – *Proposed*
18-
- [CFEP-01: CFEP Purpose and Guidelines](https://github.com/conda-forge/cfep/blob/main/cfep-01.md) – *Proposed*
19-
- [CFEP-02: Upgrade default macOS Travis image to xcode6.4](https://github.com/conda-forge/cfep/blob/main/cfep-02.md) – *Accepted*
20-
- [CFEP-03: Providing manually uploaded builds on the conda-forge anaconda channel](https://github.com/conda-forge/cfep/blob/main/cfep-03.md) – *Accepted*
21-
- [CFEP-04: Policies for packaging X11-based software in conda-forge](https://github.com/conda-forge/cfep/blob/main/cfep-04.md) – *Deferred*
22-
- [CFEP-05: Providing pre-release builds on the conda-forge anaconda channel](https://github.com/conda-forge/cfep/blob/main/cfep-05.md) – *Accepted*
23-
- [CFEP-06: staged-recipes code review lifecycle](https://github.com/conda-forge/cfep/blob/main/cfep-06.md) – *Deferred*
24-
- [CFEP-07: Migration strategy to Anaconda compilers](https://github.com/conda-forge/cfep/blob/main/cfep-07.md) – *Proposed*
25-
- [CFEP-08: Packages which are “Too Big to Fail”](https://github.com/conda-forge/cfep/blob/main/cfep-08.md) – *Deferred*
26-
- [CFEP-09: Pinning Proposal System for Automatic Rebuilds](https://github.com/conda-forge/cfep/blob/main/cfep-09.md) – *Accepted*
27-
- [CFEP-10: Feedstock Statuses](https://github.com/conda-forge/cfep/blob/main/cfep-10.md) – *Deferred*
28-
- [CFEP-11: Automated Closing of Excessively Old PRs on Staged Recipes](https://github.com/conda-forge/cfep/blob/main/cfep-11.md) – *Accepted*
29-
- [CFEP-13: Securing conda-forge Uploads to anaconda.org](https://github.com/conda-forge/cfep/blob/main/cfep-13.md) – *Accepted*
30-
- [CFEP-14: Security and Systems Subteam](https://github.com/conda-forge/cfep/blob/main/cfep-14.md) – *Accepted*
31-
- [CFEP-15: Deprecate Python 2.7 and vs2008](https://github.com/conda-forge/cfep/blob/main/cfep-15.md) – *Accepted*
32-
- [CFEP-16: Setting license and license_family field](https://github.com/conda-forge/cfep/blob/main/cfep-16.md) – *Accepted*
33-
- [CFEP-17: Branches for Globally Pinned Packages](https://github.com/conda-forge/cfep/blob/main/cfep-17.md) – *Deferred*
34-
- [CFEP-18: Packaging static libraries](https://github.com/conda-forge/cfep/blob/main/cfep-18.md) – *Accepted*
35-
- [CFEP-19: Pinning Epochs](https://github.com/conda-forge/cfep/blob/main/cfep-19.md) – *Deferred*
36-
- [CFEP-20: Standard package split (dev / doc / dbg)](https://github.com/conda-forge/cfep/blob/main/cfep-20.md) – *Deferred*
17+
{{ cfep_list }}

0 commit comments

Comments
 (0)