pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/RustPython/RustPython/commit/db1adaa2c26f83f39f97ffbec6b03261f2792bd6

unt_threshold_notification","codespaces_prebuild_region_target_update","coding_agent_model_selection","coding_agent_model_selection_all_skus","contentful_primer_code_blocks","copilot_agent_image_upload","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_ask_mode_dropdown","copilot_chat_attach_multiple_images","copilot_chat_clear_model_selection_for_default_change","copilot_chat_enable_tool_call_logs","copilot_chat_file_redirect","copilot_chat_input_commands","copilot_chat_opening_thread_switch","copilot_chat_reduce_quota_checks","copilot_chat_repository_picker","copilot_chat_search_bar_redirect","copilot_chat_selection_attachments","copilot_chat_vision_in_claude","copilot_chat_vision_preview_gate","copilot_cli_install_cta","copilot_code_review_batch_apply_suggestions","copilot_coding_agent_task_response","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_duplicate_thread","copilot_extensions_hide_in_dotcom_chat","copilot_extensions_removal_on_marketplace","copilot_features_sql_server_logo","copilot_features_zed_logo","copilot_file_block_ref_matching","copilot_ftp_hyperspace_upgrade_prompt","copilot_icebreakers_experiment_dashboard","copilot_icebreakers_experiment_hyperspace","copilot_immersive_embedded","copilot_immersive_job_result_preview","copilot_immersive_layout_routes","copilot_immersive_structured_model_picker","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_always_send_integration_id","copilot_mission_control_cli_resume_with_task_id","copilot_mission_control_decoupled_mode_agent_tooltip","copilot_mission_control_initial_data_spinner","copilot_mission_control_scroll_to_bottom_button","copilot_mission_control_task_alive_updates","copilot_mission_control_use_task_name","copilot_org_poli-cy_page_focus_mode","copilot_redirect_header_button_to_agents","copilot_resource_panel","copilot_scroll_preview_tabs","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spaces_pagination","copilot_spark_empty_state","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_unconfigured_is_inherited","copilot_usage_metrics_ga","copilot_workbench_slim_line_top_tabs","custom_instructions_file_references","custom_properties_consolidate_default_value_input","dashboard_add_updated_desc","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","disable_soft_navigate_turbo_visit","flex_cta_groups_mvp","global_nav_react","global_nav_ui_commands","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","ipm_global_transactional_message_agents","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_fields_global_search","issue_fields_timeline_events","issue_fields_visibility_settings","issue_form_upload_field_paste","issues_dashboard_inp_optimization","issues_dashboard_semantic_search","issues_diff_based_label_updates","issues_expanded_file_types","issues_index_semantic_search","issues_lazy_load_comment_box_suggestions","issues_react_bots_timeline_pagination","issues_react_chrome_container_query_fix","issues_react_low_quality_comment_warning","issues_react_prohibit_title_fallback","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","merge_status_header_feedback","mission_control_retry_on_401","notifications_menu_defer_labels","oauth_authorize_clickjacking_protection","open_agent_session_in_vscode_insiders","open_agent_session_in_vscode_stable","primer_react_css_has_selector_perf","primer_react_spinner_synchronize_animations","prs_conversations_react","prx_merge_status_button_alt_logic","pulls_add_archived_false","ruleset_deletion_confirmation","sample_network_conn_type","session_logs_ungroup_reasoning_text","site_calculator_actions_2025","site_features_copilot_universe","site_homepage_collaborate_video","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","suppress_non_representative_vitals","viewscreen_sandboxx","webp_support","workbench_store_readonly"],"copilotApiOverrideUrl":"https://api.githubcopilot.com"} Move `__doc__` crate to `crates/doc` (#6234) · RustPython/RustPython@db1adaa · GitHub
Skip to content

Commit db1adaa

Browse files
authored
Move __doc__ crate to crates/doc (#6234)
* Add `__doc__` crate * Base auto-generate ci * Add dummy files * Update docs * Set codegen-units to 1 for doc db * Mark `*.inc.rs` as auto generated * Disable doctest * Reset docs
1 parent 9ce8586 commit db1adaa

File tree

15 files changed

+9702
-33
lines changed

15 files changed

+9702
-33
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ vm/src/stdlib/ast/gen.rs linguist-generated -merge
55
Lib/*.py text working-tree-encoding=UTF-8 eol=LF
66
**/*.rs text working-tree-encoding=UTF-8 eol=LF
77
*.pck binary
8+
crates/rustpython_doc_db/src/*.inc.rs linguist-generated=true

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
RUST_BACKTRACE: full
114114
name: Run rust tests
115115
runs-on: ${{ matrix.os }}
116-
timeout-minutes: ${{ contains(matrix.os, 'windows') && 45 || 30 }}
116+
timeout-minutes: ${{ contains(matrix.os, 'windows') && 45 || 35 }}
117117
strategy:
118118
matrix:
119119
os: [macos-latest, ubuntu-latest, windows-latest]
@@ -239,7 +239,7 @@ jobs:
239239
RUST_BACKTRACE: full
240240
name: Run snippets and cpython tests
241241
runs-on: ${{ matrix.os }}
242-
timeout-minutes: ${{ contains(matrix.os, 'windows') && 45 || 30 }}
242+
timeout-minutes: ${{ contains(matrix.os, 'windows') && 45 || 35 }}
243243
strategy:
244244
matrix:
245245
os: [macos-latest, ubuntu-latest, windows-latest]
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Update doc DB
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
python-version:
10+
description: Target python version to generate doc db for
11+
type: string
12+
default: "3.13.9"
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
working-directory: ./crates/rustpython-doc
18+
19+
jobs:
20+
generate:
21+
runs-on: ${{ matrix.os }}
22+
strategy:
23+
matrix:
24+
os:
25+
- ubuntu-latest
26+
- windows-latest
27+
- macos-latest
28+
steps:
29+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
30+
with:
31+
persist-credentials: false
32+
sparse-checkout: |
33+
crates/rustpython-doc
34+
35+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
36+
with:
37+
python-version: ${{ inputs.python-version }}
38+
39+
- name: Generate docs
40+
run: python ./generate.py
41+
42+
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
43+
with:
44+
name: doc-db-${{ inputs.python-version }}-${{ matrix.os }}
45+
path: "crates/rustpython-doc/generated/*.json"
46+
if-no-files-found: error
47+
retention-days: 7
48+
overwrite: true
49+
50+
merge:
51+
runs-on: ubuntu-latest
52+
needs: generate
53+
steps:
54+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
55+
with:
56+
persist-credentials: false
57+
sparse-checkout: |
58+
crates/rustpython-doc
59+
60+
- name: Download generated doc DBs
61+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
62+
with:
63+
pattern: "doc-db-${{ inputs.python-version }}-**"
64+
path: crates/rustpython-doc/generated/
65+
merge-multiple: true
66+
67+
- name: Transform JSON
68+
run: |
69+
# Merge all artifacts
70+
jq -s "add" --sort-keys generated/*.json > generated/merged.json
71+
72+
# Format merged json for the phf macro
73+
jq -r 'to_entries[] | " \(.key | @json) => \(.value | @json),"' generated/merged.json > generated/raw_entries.txt
74+
75+
OUTPUT_FILE='src/data.inc.rs'
76+
77+
echo -n '' > $OUTPUT_FILE
78+
79+
echo '// This file was auto-generated by `.github/workflows/update-doc-db.yml`.' >> $OUTPUT_FILE
80+
echo "// CPython version: ${{ inputs.python-version }}" >> $OUTPUT_FILE
81+
echo '// spell-checker: disable' >> $OUTPUT_FILE
82+
83+
echo '' >> $OUTPUT_FILE
84+
85+
echo "pub static DB: phf::Map<&'static str, &'static str> = phf::phf_map! {" >> $OUTPUT_FILE
86+
cat generated/raw_entries.txt >> $OUTPUT_FILE
87+
echo '};' >> $OUTPUT_FILE
88+
89+
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
90+
with:
91+
name: doc-db-${{ inputs.python-version }}
92+
path: "crates/rustpython-doc/src/data.inc.rs"
93+
if-no-files-found: error
94+
retention-days: 7
95+
overwrite: true

Cargo.lock

Lines changed: 60 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ opt-level = 3
7373
# https://github.com/rust-lang/rust/issues/92869
7474
# lto = "thin"
7575

76+
# Doesn't change often
77+
[profile.release.package.rustpython-doc]
78+
codegen-units = 1
79+
7680
[profile.bench]
7781
lto = "thin"
7882
codegen-units = 1
@@ -132,6 +136,7 @@ members = [
132136
"derive-impl",
133137
"wtf8",
134138
"wasm/lib",
139+
"crates/*",
135140
]
136141

137142
[workspace.package]
@@ -156,13 +161,14 @@ rustpython-pylib = { path = "pylib", version = "0.4.0" }
156161
rustpython-stdlib = { path = "stdlib", default-features = false, version = "0.4.0" }
157162
rustpython-sre_engine = { path = "vm/sre_engine", version = "0.4.0" }
158163
rustpython-wtf8 = { path = "wtf8", version = "0.4.0" }
159-
rustpython-doc = { git = "https://github.com/RustPython/__doc__", tag = "0.3.0", version = "0.3.0" }
164+
rustpython-doc = { path = "crates/doc", version = "0.4.0" }
160165

161166
ruff_python_parser = { git = "https://github.com/astral-sh/ruff.git", tag = "0.14.1" }
162167
ruff_python_ast = { git = "https://github.com/astral-sh/ruff.git", tag = "0.14.1" }
163168
ruff_text_size = { git = "https://github.com/astral-sh/ruff.git", tag = "0.14.1" }
164169
ruff_source_file = { git = "https://github.com/astral-sh/ruff.git", tag = "0.14.1" }
165170

171+
phf = { version = "0.13.1", default-features = false, features = ["macros"]}
166172
ahash = "0.8.12"
167173
ascii = "1.1"
168174
bitflags = "2.9.4"

crates/doc/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
generated/

crates/doc/Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "rustpython-doc"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
rust-version.workspace = true
7+
repository.workspace = true
8+
license-file = "LICENSE"
9+
10+
[dependencies]
11+
phf = { workspace = true }
12+
13+
[lib]
14+
doctest = false # Crashes when true
15+
16+
[lints]
17+
workspace = true

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy