-
Notifications
You must be signed in to change notification settings - Fork 5
Core tracking #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
m-aciek
wants to merge
21
commits into
main
Choose a base branch
from
core-tracking
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+148
−41
Open
Core tracking #162
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
0a14a6b
try to filter
m-aciek 74eda6b
Add core completion data in the backend script
m-aciek c4e89fa
Resolve clone path to absolute to avoid ValueError
m-aciek dea3d75
Merge branch 'refs/heads/main' into core-tracking
m-aciek 2e44144
Resolve merge path to absolute to avoid ValueError
m-aciek e253a66
Replace resolve with absolute
m-aciek 0e47223
Add rudimentary core tracker
m-aciek 301da7d
Sort by core completion
m-aciek 1d13c81
Add top margin for second progress bar
m-aciek da52a69
Fix filtering of tutorial chapters
m-aciek 5250e22
Extract progress bar to a separate template
m-aciek e50d599
Display label on the progress bar
m-aciek dce1f8d
Use Bootstrap's progress bar styling
m-aciek 3d64f7f
Use Jinja's with to fix contexts
m-aciek 6667243
Bigger
m-aciek 8511848
Don't use project variable in progress template
m-aciek 3c6750b
Upgrade jQuery and Bootstrap
m-aciek 2ed1f09
Add outer label and styling
m-aciek 5511b60
Add script for calculating width
m-aciek 14810fe
Bootstrap 5: container in navbar, toggler update
m-aciek fb191e8
Fix initialization for stop iteration on commits
m-aciek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| {# Reusable progress bar partial | ||
| Expects variables in the include call: | ||
| - width: numeric width percentage (0-100) | ||
| - change: numeric change value (same units as width) or falsy | ||
| #} | ||
| <div class="progress {{ extra_container_class }}"> | ||
| <div class="progress-bar main-bar" style="width: {{ width }}%; | ||
| {% if change and width %} | ||
| {# compute the relative change percentage safely #} | ||
| {% set rel = (change * 100 / width) %} | ||
| background: linear-gradient(to left, #94cf96 {{ rel }}%, #4caf50 {{ rel }}%); | ||
| {% else %} | ||
| background-color: #4caf50; | ||
| {% endif %}"> | ||
| {{ kind }}: {{ '{:.2f}%'.format(width) }} {% if change >= 0.01 %}({{ '{:+.2f}%'.format(change) }}){% endif %} | ||
| </div> | ||
| <div class="progress-bar outer-label"> | ||
| {{ kind }}: {{ '{:.2f}%'.format(width) }} {% if change >= 0.01 %}({{ '{:+.2f}%'.format(change) }}){% endif %} | ||
| </div> | ||
| </div> |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import unittest | ||
| from datetime import datetime | ||
| import support | ||
|
|
||
| from jinja2 import Environment, FileSystemLoader | ||
|
|
||
| with support.import_scripts(): | ||
| import generate | ||
| import repositories | ||
|
|
||
|
|
||
| class testIndex(unittest.TestCase): | ||
| def test_renders(self): | ||
| env = Environment(loader=FileSystemLoader('templates')) | ||
| language_project_data = generate.LanguageProjectData( | ||
| language=repositories.Language('pl', 'Polish'), | ||
| repository='python-docs-pl', | ||
| branch='3.14', | ||
| core_completion=100, | ||
| completion=50, | ||
| core_change=1, | ||
| change=2, | ||
| built=True, | ||
| translated_name='Polish', | ||
| contribution_link='https://example.com', | ||
| ) | ||
| env.get_template('index.html.jinja').render( | ||
| completion_progress=[language_project_data], | ||
| generation_time=datetime.now(), | ||
| duration=100, | ||
| ) | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| unittest.main() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.