Skip to content

Commit 1bdcdaa

Browse files
authored
Merge pull request #2084 from jaimergp/render-markdown-once
Freeze Sphinx content to Markdown All the RST Sphinx content was rendered as Markdown for Docusaurus. See e7940c0 for the rename mapping.
2 parents e89f174 + 9061d66 commit 1bdcdaa

File tree

276 files changed

+8092
-9900
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+8092
-9900
lines changed

.ci_scripts/environment.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,6 @@ channels:
33
- conda-forge
44
dependencies:
55
- python=3
6-
- conda-smithy
7-
- sphinx >=4.4
8-
- cloud_sptheme
9-
- sphinxcontrib-fulltoc
10-
- make
11-
- xonsh
12-
- myst-parser
13-
- pyyaml
14-
- jinja2
156
- requests
16-
- python-dateutil
177
- pip
18-
- python-rapidjson
19-
- termcolor
208
- nodejs 20.*
21-
- pip:
22-
- https://github.com/jaimergp/sphinx-markdown-builder/archive/admonitions.tar.gz

.ci_scripts/generate_cfep_index.py renamed to .ci_scripts/render_templated_content.py

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
1+
import csv
12
import re
2-
import requests
3-
import sys
43
import tarfile
54
from dataclasses import dataclass
65
from pathlib import Path
76
from tempfile import TemporaryDirectory
87

8+
import requests
9+
10+
911
REPO_URL = "https://github.com/conda-forge/cfep"
1012
REPO_ARCHIVE = "https://github.com/conda-forge/cfep/archive/main.tar.gz"
1113
REPO_CONTENTS = "https://api.github.com/repos/conda-forge/cfep/contents/"
1214
TITLE_PATTERN = "<td>\s*Title\s*</td><td>\s*(.*)\s*</td>"
1315
STATUS_PATTERN = "<td>\s*Status\s*</td><td>\s*(.*)\s*</td>"
1416
REPO_DIR = Path(__file__).parents[1].absolute()
15-
CFEP_INDEX_RST = REPO_DIR / "sphinx" / "src" / "orga" / "cfep-index.rst"
17+
CFEP_INDEX_MD_TMPL = REPO_DIR / "docs" / "orga" / "cfep-index.md.tmpl"
18+
CFEP_INDEX_MD = REPO_DIR / "docs" / "orga" / "cfep-index.md"
19+
GOVERNANCE_MD_TMPL = REPO_DIR / "docs" / "orga" / "governance.md.tmpl"
20+
GOVERNANCE_MD = REPO_DIR / "docs" / "orga" / "governance.md"
21+
CORE_CSV = REPO_DIR / "src" / "core.csv"
22+
EMERITUS_CSV = REPO_DIR / "src" / "emeritus.csv"
1623

1724

1825
@dataclass
@@ -93,17 +100,39 @@ def get_cfeps():
93100

94101

95102
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()]
103+
contents = CFEP_INDEX_MD_TMPL.read_text()
104+
md_links = [f"- {cfep.md_link()}" for cfep in get_cfeps()]
105+
contents = contents.replace(
106+
"{{ cfep_list }}",
107+
"\n".join(md_links)
108+
)
109+
CFEP_INDEX_MD.write_text(contents)
110+
111+
112+
def _get_formatted_names(path_file):
113+
with open(path_file, "r") as csv_file:
114+
dict_csv = csv.DictReader(csv_file)
115+
sorted_csv = sorted(dict_csv, key=lambda d: d["name"])
116+
return "\n".join(
117+
f"- [{m['name']} @{m['github_username']}]"
118+
f"(https://github.com/{m['github_username']})"
119+
for m in sorted_csv
120+
)
121+
122+
123+
def write_core_members():
124+
contents = GOVERNANCE_MD_TMPL.read_text()
125+
contents = contents.replace(
126+
"{{ core_members }}",
127+
_get_formatted_names(CORE_CSV)
128+
)
101129
contents = contents.replace(
102-
".. REPLACE-THIS-LINE-WITH-THE-INDEX-OF-CFEPs",
103-
"\n".join(rst_links)
130+
"{{ emeritus_members }}",
131+
_get_formatted_names(EMERITUS_CSV)
104132
)
105-
CFEP_INDEX_RST.write_text(contents)
133+
GOVERNANCE_MD.write_text(contents)
106134

107135

108136
if __name__ == "__main__":
109137
write_cfep_index()
138+
write_core_members()

.ci_scripts/update_docs

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

15-
pushd "$BASE_DIR/sphinx/src"
16-
make clean
17-
rm -rf "$BASE_DIR/static-sphinx"
18-
# -W --keep-going: list all warnings but fail build in case there are any
19-
make markdown SPHINXOPTS="-W --keep-going"
20-
popd
15+
# Render the templated content (e.g. CFEPs, core.csv, etc)
16+
python "$BASE_DIR/.ci_scripts/render_templated_content.py"
2117

22-
# Move rendered Sphinx markdown to Docusaurus
23-
python "$BASE_DIR/.ci_scripts/sphinx_markdown_to_docusaurus.py" "$BASE_DIR/sphinx/src/_build/markdown" docs/
24-
mkdir -p "$BASE_DIR/static-sphinx/_static"
25-
cp -r "$BASE_DIR/sphinx/src/_static" "$BASE_DIR/static-sphinx/"
2618
# Build docusaurus site
2719
npm install
2820
npm run build
@@ -31,5 +23,7 @@ npm run build
3123
# we can't redirect with the Docusaurus plugin, so just copy it
3224
cp build/news/rss.xml build/docs/news.rss
3325

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

.github/workflows/meeting-notes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
with:
2929
date: ${{ inputs.date || 'now' }}
3030
template_path: misc/DEV_MEETING_TEMPLATE.md
31-
output_path: sphinx/src/orga/minutes/%Y-%m-%d.md
31+
output_path: docs/orga/minutes/%Y-%m-%d.md
3232
hackmd_team: conda-forge
3333
force_push: true
3434
pr_body: |

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ sphinx/newsfeed/demo/_build
2222

2323
# Sphinx output gets moved to Docusaurus' static folder
2424
/static-sphinx
25-
/docs
2625

2726
# Docusaurus dependencies
2827
/node_modules
2928

3029
# Docusaurus production
3130
/build
3231

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

.readthedocs.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ If you have questions or need help, please check out our documentation for a [li
1010

1111
## Improving the docs
1212

13-
- You can help to improve the documentation! It is version-controlled in the [conda-forge.github.io repository on GitHub](https://github.com/conda-forge/conda-forge.github.io). The source text is stored in the `sphinx/src/` subdirectory and is formatted using Python’s [reStructuredText system](https://docutils.sourceforge.io/rst.html).
13+
- You can help to improve the documentation! It is version-controlled in the [conda-forge.github.io repository on GitHub](https://github.com/conda-forge/conda-forge.github.io).
1414

1515
- The docs are built on GitHub Actions and run the `.ci_scripts/update_docs` script.
1616
We are glad to know that you would like to contribute. To build the docs locally, follow the steps mentioned below:
17-
1. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the [conda-forge.github.io](https://github.com/conda-forge/conda-forge.github.io) repository to your own GitHub user account.
17+
18+
1. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the [conda-forge.github.io](https://github.com/conda-forge/conda-forge.github.io) repository to your own GitHub user account.
1819
2. [Clone](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) this fork onto your computer.
19-
3. Go into the main folder. </br>
20+
3. Go into the main folder.
2021
Run the following commands.
2122
* `conda env create -f ./.ci_scripts/environment.yml`
2223
* `conda activate conda-forge-docs`
23-
* `cd sphinx`
24-
* `cd newsfeed && pip install --no-deps .`
25-
* `cd ../src`
26-
* `make html`
24+
* For live builds, `npm install && npm run start`
25+
* For production builds, run `.ci_scripts/update_docs`
2726
4. Make and commit your changes.
2827
5. Submit a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) to the main repository proposing your changes.
2928

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,53 @@
1-
Contracting Information
2-
#######################
1+
---
2+
title: 'Contracting Information'
3+
sidebar_position: 28
4+
---
5+
6+
<a id="contracting-information"></a>
7+
8+
# Contracting Information
39

410
If you are interested in a contractual engagement to solve a specific problem that you're facing, this page details the kinds of services that are available to you. conda-forge, as an entity, does not have the ability to engage in a contractual arrangement as of now.
5-
However, there are a number of community members that you may engage with.
11+
However, there are a number of community members that you may engage with.
612
conda-forge does not endorse anyone (individuals or companies) listed on this page.
713

8-
9-
If you are interested in a service that is not listed on this page, please reach out to us on our `issue tracker <https://github.com/conda-forge/conda-forge.github.io/issues>`__, on `Element <https://app.element.io/#/room/#conda-forge:matrix.org>`__ or via emailing the core team directly at [email protected] and we will help to circulate your request more broadly within the community.
14+
If you are interested in a service that is not listed on this page, please reach out to us on our [issue tracker](https://github.com/conda-forge/conda-forge.github.io/issues), on [Element](https://app.element.io/#/room/#conda-forge:matrix.org) or via emailing the core team directly at [[email protected]](mailto:[email protected]) and we will help to circulate your request more broadly within the community.
1015

1116
Our intent with this page is to communicate whom you should contact and negotiate a contract with.
1217
We hold no liability for the outcome of those negotiations or the results of any work that is done under those terms.
1318
We will not arbitrate any contract disputes.
1419
That is between the payer and payee to hammer out on their own.
1520

21+
<a id="known-service-providers"></a>
22+
23+
## Known Service Providers
24+
25+
<a id="lab49"></a>
1626

17-
Known Service Providers
18-
***********************
27+
### Lab49
1928

20-
Lab49
21-
=====
2229
Services Offered: Architecture and Technical Design Advisory, Cloud Strategy and Migrations, Outsourced Software Development, SDLC Advisory
2330

24-
Contact Information: [email protected]
31+
Contact Information: [[email protected]](mailto:[email protected])
2532

26-
Background / Description: Lab49 is a full service strategy, design and technology consultancy with a global reach focused on financial services. We specialize in product development across the full stack, from data and analytics, through services, through next generation user interfaces.
33+
Background / Description: Lab49 is a full service strategy, design and technology consultancy with a global reach focused on financial services. We specialize in product development across the full stack, from data and analytics, through services, through next generation user interfaces.
2734

35+
<a id="quansight"></a>
2836

29-
Quansight
30-
=========
37+
### Quansight
3138

3239
Services offered: Core Library Development, Data Engineering, Algorithms / AI / ML, Infrastructure / Big Data, Visualization / Dashboards, Open Source Support, Packaging, Integration
3340

34-
Contact Info: https://www.quansight.com/consulting
41+
Contact Info: [https://www.quansight.com/consulting](https://www.quansight.com/consulting)
3542

3643
Background / Description: Quansight's goal is to create operational solutions to support your analytic and visualization needs. We automate the data-science process in a way that works for your business use cases. Quansight has the experience to assess an organization's needs and provide the best integrated solution to turn raw data into actionable quantitative insights. By employing the maintainers and contributors to many open source projects worldwide, including core aspects of the Conda ecosystem and community, we provide top talent to ensure our customers have access to the latest technology while also leveraging legacy investments.
3744

45+
<a id="becoming-a-service-provider"></a>
3846

39-
Becoming a Service Provider
40-
***************************
47+
## Becoming a Service Provider
4148

4249
The conda-forge core team reserves the right to unilaterally update this list at any time for any reason.
4350
If you are a service provider and are interested in being added to this list please open up a pull request against the conda-forge.github.io repository.
44-
Add yourself to this list and detailing the services you provide.
51+
Add yourself to this list and detailing the services you provide.
4552
Please be brief and link to existing materials on your own website where possible.
4653
Then, when ready, ping @conda-forge/core for review and merging.

docs/index.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: 'conda-forge documentation'
3+
sidebar_position: 0
4+
---
5+
6+
<a id="conda-forge-documentation"></a>
7+
8+
# conda-forge documentation
9+
10+
<a id="what-is-conda-forge"></a>
11+
12+
## What is conda-forge?
13+
14+
conda-forge is a community effort and a GitHub organization which contains repositories of conda recipes and thus provides conda packages for a wide range of software.
15+
The built distributions are uploaded to [anaconda.org/conda-forge](https://anaconda.org/conda-forge) and can be installed with [conda](https://conda.pydata.org/docs/intro.html).
16+
17+
**Missing a package that you would love to install with conda?**
18+
19+
Chances are we have already packaged it for you. You can [search](https://anaconda.org/) for packages online. Look out for packages provided by our `conda-forge` organization.
20+
21+
**Cannot find a package or only outdated versions of a package?** - Everybody is welcome to contribute to our package stack!
22+
23+
- We value all kinds of contributions — not just code. A few recommended ways to start contributing to conda-forge are:
24+
- [Contribute new packages](maintainer/adding_pkgs.md)
25+
- Help update and [maintain packages](maintainer/updating_pkgs.md)
26+
- Suggest or implement improvements for our [infrastructure](maintainer/infrastructure.md)
27+
- Help [improve the documentation](user/contributing.md#improve-docs)
28+
- For a detailed overview please refer to [Becoming involved](user/contributing.md)
29+
- To see our governance policies, see [Governance](orga/governance.md).
30+
- If you find bugs, need help, or want to talk to the developers, use our mailing lists or chat rooms:
31+
- [GitHub issues](https://github.com/conda-forge/conda-forge.github.io/issues)
32+
- [Element chatroom](https://app.element.io/#/room/#conda-forge:matrix.org)
33+
- [Discourse group](https://conda.discourse.group)
34+
- [Mailing list (archived)](https://groups.google.com/forum/#!forum/conda-forge)
35+
36+
<a id="table-of-contents"></a>
37+
38+
## Table of Contents
39+
40+
* [User Documentation](user/index.mdx)
41+
* [Maintainer Documentation](maintainer/index.mdx)
42+
* [Organisation Documentation](orga/index.mdx)
43+
* [Miscellaneous](misc/index.md)
44+
* [Contracting Information](contracting/index.md)

0 commit comments

Comments
 (0)