-
Notifications
You must be signed in to change notification settings - Fork 23
#1370 - support import and export of PMC CSVs #1376
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
alitheg
wants to merge
2
commits into
main
Choose a base branch
from
arm
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.
+2,238
−75
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| {% extends "layouts/base-admin.html" %} | ||
|
|
||
| {%- block title -%}Import preview: {{ committee_key }} ~ ATR{%- endblock title -%} | ||
|
|
||
| {%- block description -%}Review the catalogue import for {{ committee_key }}.{%- endblock description -%} | ||
|
|
||
| {% block content %} | ||
| <h1>Import preview: {{ committee_key }}</h1> | ||
| <p><a href="/admin/catalog/{{ committee_key }}">Cancel</a></p> | ||
| {{ preview }} | ||
| {{ form }} | ||
| {% endblock content %} |
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,56 @@ | ||
| {% extends "layouts/base-admin.html" %} | ||
|
|
||
| {%- block title -%}Import catalogue: {{ committee_key }} ~ ATR{%- endblock title -%} | ||
|
|
||
| {%- block description -%}Upload catalogue CSVs to correct {{ committee_key }}.{%- endblock description -%} | ||
|
|
||
| {% block content %} | ||
| <h1>Import catalogue: {{ committee_key }}</h1> | ||
| <p><a href="/admin/catalog/{{ committee_key }}">Back to {{ committee_key }}</a></p> | ||
| <h2>Download current entries</h2> | ||
| <p> | ||
| Each file holds this committee's current entries, in the same columns the upload expects, so a | ||
| file you download can be edited and uploaded straight back. | ||
| </p> | ||
| <ul> | ||
| <li><a href="/admin/catalog/{{ committee_key }}/export?table=projects">projects.csv</a></li> | ||
| <li><a href="/admin/catalog/{{ committee_key }}/export?table=releases">releases.csv</a></li> | ||
| <li><a href="/admin/catalog/{{ committee_key }}/export?table=artifacts">artifacts.csv</a></li> | ||
| </ul> | ||
| <h2>Upload</h2> | ||
| <p> | ||
| The files you upload <strong>are</strong> this committee's catalogue. Download, edit, upload: | ||
| what the files list is what the committee ends up with, so an added row is an entry added, a | ||
| removed row is an entry deleted, and an edited row is an entry corrected. Nothing is written | ||
| until you confirm the preview on the next page. | ||
| </p> | ||
| <p> | ||
| Each file is optional, and the deepest one you upload decides how far the replacement reaches. | ||
| artifacts.csv replaces the artifacts; releases.csv replaces the releases and their artifacts; | ||
| projects.csv replaces the projects, their releases and their artifacts. Upload the levels below | ||
| the one you are correcting, or the preview will warn you what is about to be left empty. | ||
| </p> | ||
| <p> | ||
| The import applies as a whole or not at all. If any row cannot be applied it is reported as a | ||
| conflict, nothing is changed, and you can fix the file and upload again. This is deliberate: a | ||
| row that fell out would be deleted rather than corrected. | ||
| </p> | ||
| <p> | ||
| Because the rows are rewritten, columns the CSVs do not carry are reset. Run | ||
| <strong>Update projects</strong> afterwards to restore project metadata, and re-import | ||
| signatures and lifecycle events if you have them. | ||
| </p> | ||
| <p> | ||
| <strong>Add and update only</strong> turns the replacement off. Rows are matched against what | ||
| is already catalogued: a row that matches nothing is added, one that names a different project | ||
| moves there, and one that matches where it says it is does nothing. Nothing is deleted, a row | ||
| that cannot be applied is skipped and the rest still go ahead, and columns other than the keys | ||
| are not written back. Use it to top a committee up rather than to correct it. | ||
| </p> | ||
| <p> | ||
| Projects carrying live release-workflow data are never changed or deleted by this page, in | ||
| either mode. To move a project to another committee, or to rename or merge one, use the actions | ||
| on the committee page instead. | ||
| </p> | ||
| {{ form }} | ||
| {% endblock content %} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field is
default=True, but because browsers don't send anything when the field is unchecked, that's when we apply the default. So when the field is checked, the browser sends"on"and we setTrue. If the field is unchecked, the browser sends nothing, and we use the default, which isTrue. Therefore it's impossible to turn this field off.I wonder if we can add a static lint for this. Might be difficult because the field element is a consequence of the Python type of the property.