-
Notifications
You must be signed in to change notification settings - Fork 0
Modifications to the copier #6
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
base: main
Are you sure you want to change the base?
Changes from all commits
4f342c6
43890f9
cfc7f3d
c1791d9
50ff4d7
308ea55
cfc7696
6932f1e
2223add
498b54b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,8 @@ _tasks: | |
| REQUIRED_APPROVING_REVIEW_COUNT="{{ required_approving_review_count }}" | ||
| REQUIRE_LAST_PUSH_APPROVAL="{{ require_last_push_approval | lower }}" | ||
| REQUIRE_CONVERSATION_RESOLUTION="{{ require_conversation_resolution | lower }}" | ||
| ./copier_scripts/run_tasks.sh | ||
|
|
||
| #./copier_scripts/run_tasks.sh | ||
|
|
||
| # Questions to ask the user | ||
| _message_before_copy: | | ||
|
|
@@ -85,8 +86,8 @@ repository_slug: | |
| is_public_repo: | ||
| type: bool | ||
| help: "Not prompted. This is computed for re-use." | ||
| default: "{{ repository_visibility == 'public' }}" | ||
| when: false | ||
| default: false | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Am I reading this incorrect? It seems to say is_public_repo is false on default if repository_visibility is public?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So that means : If the user sets repository_visibility to "public", then is_public_repo will be available (and its value will be false unless overridden) so this boolian variable will only be available if the user sets the repo to public otherwise by default it will be set to false :)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this might be causing issues with PIRR.md / codeql.yml |
||
| when: "{{ repository_visibility == 'public' }}" | ||
|
|
||
| module_name: | ||
| type: str | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @${{ code_owners }} |
This file was deleted.
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like codeql.yml isn't being generated when the repo is set to Public |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,8 +160,6 @@ cython_debug/ | |
| # Bandit | ||
| .bandit | ||
|
|
||
| # Copier helpers | ||
| copier_scripts/ | ||
|
|
||
| # DS_Store files | ||
| .DS_Store | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # Policy Compliance Checklist | ||
|
|
||
| This document verifies compliance with ONS policies for the ${{ values.repository_name }} project. | ||
| This document verifies compliance with ONS policies for the ${{ repository_name }} project. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the $ signs are not necessary in jinja... in the generated repo this displays as 'This document verifies compliance with ONS policies for the $test-repo project.' unfortunately it looks like there are a lot of $ signs, not sure if it's worth removing them |
||
|
|
||
| ## GitHub Usage Policy Compliance | ||
|
|
||
|
|
@@ -15,12 +15,12 @@ This document verifies compliance with ONS policies for the ${{ values.repositor | |
| - **Configuration**: | ||
| - Security updates: Always enabled | ||
| - Version updates: Configurable via template options | ||
| - Open PR limit: {{ values.dependabot_open_pull_requests_limit or 10 }} | ||
| - Open PR limit: {{ dependabot_open_pull_requests_limit or 10 }} | ||
|
|
||
| ### ✅ CODEOWNERS File | ||
| - **Status**: Generated automatically | ||
| - **Location**: `.github/CODEOWNERS` | ||
| - **Owners**: {{ values.code_owners }} | ||
| - **Owners**: {{ code_owners }} | ||
|
|
||
| ### ✅ README File | ||
| - **Status**: Generated with comprehensive documentation | ||
|
|
@@ -33,7 +33,7 @@ This document verifies compliance with ONS policies for the ${{ values.repositor | |
| - **Badge**: License badge included in README | ||
|
|
||
| ### ✅ Branching Strategy | ||
| - **Default Branch**: {{ values.default_branch }} | ||
| - **Default Branch**: {{ default_branch }} | ||
| - **Protection Rules**: Configured via Backstage template | ||
| - **Reviews Required**: Minimum 1 approving review | ||
| - **Status Checks**: CI/CD workflows must pass | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| # ${{ values.repository_name }} | ||
| # ${{ repository_name }} | ||
|
|
||
| [](https://github.com/${{ values.repository_owner }}/${{ values.repository_name }}/actions/workflows/ci.yml) | ||
| [](https://github.com/${{ values.repository_owner }}/${{ values.repository_name }}/actions/workflows/security-scan.yml) | ||
| {%- if values.is_public_repo %} | ||
| [](https://github.com/${{ values.repository_owner }}/${{ values.repository_name }}/actions/workflows/codeql.yml) | ||
| [](https://github.com/${{ repository_owner }}/${{ repository_name }}/actions/workflows/ci.yml) | ||
| [](https://github.com/${{ repository_owner }}/${{ repository_name }}/actions/workflows/security-scan.yml) | ||
| {%- if is_public_repo %} | ||
| [](https://github.com/${{ repository_owner }}/${{ repository_name }}/actions/workflows/codeql.yml) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again the $ signs show up in the resulting url |
||
| {%- endif %} | ||
| [](https://github.com/astral-sh/ruff) | ||
| [](https://python-poetry.org/) | ||
| [](https://github.com/${{ values.repository_owner }}/${{ values.repository_name }}/blob/main/LICENSE) | ||
| [](https://github.com/${{ repository_owner }}/${{ repository_name }}/blob/main/LICENSE) | ||
|
|
||
| ${{ values.repository_description }} | ||
| ${{ repository_description }} | ||
|
|
||
| This project follows the Reproducible Analytical Pipeline (RAP) methodology, providing a modular ETL (Extract, Transform, Load) framework for data processing workflows. | ||
|
|
||
|
|
@@ -72,7 +72,7 @@ Ensure you have the following installed: | |
| 1. Clone the repository and install the required dependencies. | ||
|
|
||
| ```bash | ||
| git clone https://github.com/${{ values.repository_owner }}/${{ values.repository_name }}.git | ||
| git clone https://github.com/${{ repository_owner }}/${{ repository_name }}.git | ||
| ``` | ||
|
|
||
| 2. Install dependencies | ||
|
|
@@ -106,7 +106,7 @@ make run | |
|
|
||
| ```bash | ||
| # Extract data | ||
| poetry run python -c "from ${{ values.module_name }}.extract import extract_from_source; print(extract_from_source('example_data.csv'))" | ||
| poetry run python -c "from ${{ module_name }}.extract import extract_from_source; print(extract_from_source('example_data.csv'))" | ||
|
|
||
| # Run full pipeline with custom parameters | ||
| poetry run python run_etl.py | ||
|
|
@@ -115,7 +115,7 @@ poetry run python run_etl.py | |
| 3. **Programmatic usage:** | ||
|
|
||
| ```python | ||
| from ${{ values.module_name }} import ETLPipeline | ||
| from ${{ module_name }} import ETLPipeline | ||
|
|
||
| pipeline = ETLPipeline() | ||
| success = pipeline.run_pipeline( | ||
|
|
@@ -194,12 +194,12 @@ make security-scan | |
| To run type checking, run: | ||
|
|
||
| ```bash | ||
| poetry run mypy ${{ values.module_name }} | ||
| poetry run mypy ${{ module_name }} | ||
| ``` | ||
|
|
||
| ### GitHub actions | ||
|
|
||
| Linting/formatting and Security Scanning GitHub actions are enabled by default on template repositories. If you go to the `Actions` tab on your [repository](https://github.com/${{ values.repository_owner }}/${{ values.repository_name }}/actions), you can view all the workflows for the repository. If an action has failed, it will show a red circle with a cross in it. | ||
| Linting/formatting and Security Scanning GitHub actions are enabled by default on template repositories. If you go to the `Actions` tab on your [repository](https://github.com/${{ repository_owner }}/${{ repository_name }}/actions), you can view all the workflows for the repository. If an action has failed, it will show a red circle with a cross in it. | ||
|
|
||
| To find out more details about why it failed: | ||
|
|
||
|
|
||
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.
is there a need for this commented line?
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.
damn I forgot about that :D