Skip to content
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

Shecdule test #232

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
947a8d5
release notes draft 2.22.0 for my.nesi
natnesi Apr 30, 2024
35936c3
Share-deployment (#222)
CallumWalley Apr 30, 2024
7f8f0e7
Merge branch 'main' into CID-2383
CallumWalley Apr 30, 2024
16b3303
Updated Module List
CallumWalley Apr 30, 2024
9668dbf
arbrirary change
CallumWalley May 1, 2024
1c6a6c6
try again
CallumWalley May 1, 2024
d1747db
tz fix
CallumWalley May 1, 2024
7413a69
actually correct timezone
CallumWalley May 1, 2024
17d2ede
also trigger on issue edit
CallumWalley May 1, 2024
5a84410
Update my-nesi-org-nz_release_notes_v2-22-0.md - edited some of the b…
janamakar May 1, 2024
170d255
Updated Module List
CallumWalley May 1, 2024
130eff5
comment out nz time zone
CallumWalley May 1, 2024
467e74c
Update my-nesi-org-nz_release_notes_v2-22-0.md-edit-to-fixes-section-…
janamakar May 1, 2024
d58fa89
Pending changes exported from your codespace
CallumWalley May 2, 2024
47637dd
release notes draft 2.22.0 for my.nesi (#221)
natnesi May 2, 2024
36b96d4
Merge remote-tracking branch 'origin/2024-04-30-assets-update'
CallumWalley May 2, 2024
401a531
Merge remote-tracking branch 'origin/2024-05-01-assets-update'
CallumWalley May 2, 2024
edab0c8
Merge branch 'newpage-add'
CallumWalley May 2, 2024
ddba626
Newpage-extended (#235)
CallumWalley May 2, 2024
413e714
bung link
CallumWalley May 2, 2024
ab4c397
Update mkdocs.yml
CallumWalley May 6, 2024
2495067
Update README.md (#241)
ndjones May 7, 2024
d3f4e63
don't merge me (#240)
CallumWalley May 7, 2024
72fb9e5
merge
CallumWalley May 7, 2024
da4c670
remove dev deployment
CallumWalley May 7, 2024
5375b01
fix deliverate break
CallumWalley May 7, 2024
7d92d18
Merge branch 'main' into shecdule-test
CallumWalley May 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/demo_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy PR branches
on:
pull_request:
env:
MODULE_LIST_PATH: docs/assets/module-list.json
PYTHON_VERSION: 3.x
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARGET_REPO: "support-docs-dev"
TARGET_OWNER: "CallumWalley"
WORKFLOW_ID: "deploy.yml"
DEPLOY_URL: "https://callumwalley.github.io/support-docs-dev"
permissions: write-all
jobs:
documentation:
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
fetch-depth: 0
- name: Get list of dev deployments
id: dev-deps
run: |
echo "branches=$(for pr in $(gh pr list --json headRefName | jq -r '.[].headRefName'); do gh pr checks $pr > /dev/null && printf "${pr} "; done)" >> $GITHUB_OUTPUT
- name: make private key
run: echo "${{ secrets.SSH_PRIVATE_KEY }}" > id_ed25519
- name: Trigger Workflow in Another Repository
run: |
curl -L \
--key id_ed25519 \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.PAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${TARGET_OWNER}/${TARGET_REPO}/dispatches \
-d '{"event_type":"deploy","client_payload":{"pr-branches":"${{ steps.dev-deps.outputs.branches }}"}}'

# gh api \
# --method POST \
# -H "Accept: application/vnd.github+json" \
# -H "X-GitHub-Api-Version: 2022-11-28" \
# /repos/${TARGET_OWNER}/${TARGET_REPO}/dispatches \
# -f "event_type=deploy" -F "client_payload[pr-branches]=${{ steps.dev-deps.outputs.branches }}"

# gh workflow run ${WORKFLOW_ID} --repo ${TARGET_OWNER}/${TARGET_REPO} --field pr-branches="${{ steps.dev-deps.outputs.branches }}"
- name: Post messages to PRs
run: |
for pr in ${{ steps.dev-deps.outputs.branches }}; do
msg="Test deployment available at <a href=\"${DEPLOY_URL}/${pr}\">${DEPLOY_URL}/${pr}</a>"
(gh pr comment ${pr} --edit-last --body "${msg}") || (gh pr comment ${pr} --body "${msg}")
done
16 changes: 15 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ on:
push:
branches: [main]
workflow_dispatch:
inputs:
pr-deploy:
description: Deploy open merge requests in sub-directories.
type: boolean
default: true
env:
MODULE_LIST_PATH: docs/assets/module-list.json
PYTHON_VERSION: 3.x
GH_TOKEN: ${{ github.token }}
permissions:
contents: write
pull-requests: write
id-token: write
pages: write
jobs:
Expand Down Expand Up @@ -39,7 +46,7 @@ jobs:
run: pip install -r requirements.txt
- name: Build documentation
run: |
mkdocs build --clean --quiet
mkdocs build --clean --quiet
- name: Adjust permissions
run: |
chmod -c -R +rX public/ | while read line; do
Expand All @@ -56,3 +63,10 @@ jobs:
with:
key: mkdocs-${{ hashfiles('.cache/**') }}
path: .cache
- name: Post messages to PRs
run: |
for pr in ${{ steps.dev-deps.outputs.branches }}; do
msg="Test deployment available at <a href=\"https://docs.nesi.org.nz/${pr}\">https://docs.nesi.org.nz/${pr}</a>"
(gh pr comment ${pr} --edit-last --body "${msg}") || (gh pr comment ${pr} --body "${msg}")
done

5 changes: 4 additions & 1 deletion .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Merge Schedule
on:
issue_comment:
types: [created, edited]
pull_request:
types:
- opened
Expand All @@ -15,7 +17,8 @@ jobs:
with:
merge_method: squash
# Time zone to use. Default is UTC.
time_zone: 'New_Zealand/Auckland'
# time_zone: 'Pacific/Auckland'
require_statuses_success: 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

34 changes: 31 additions & 3 deletions .vscode/includes.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"#SBATCH --time ${3:01:00:00}",
"#SBATCH --mem ${4:2G}",
"",
"${0}"
"${0}",
"```"
]
},
Expand All @@ -79,8 +79,9 @@
"Insert Front Matter": {
"scope": "markdown",
"prefix": ["---"],
"description" : "Insert Meta",
"body": [
"---"
"---",
"created_at: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE",
// "title: ${1:${TM_FILENAME/_/ /g}}}",
"description: ${1}",
Expand All @@ -89,5 +90,32 @@
"",
"${0}"
]
}
},
// For more elaborate page templates see: https://marketplace.visualstudio.com/items?itemName=rioj7.vscode-file-templates
"Template New Page": {
"isFileTemplate": true,
"body": [
"---",
"created_at: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE",
"description: ${1:Will be used to generate page preview. Should not contain keywords not in the body of article.}",
"tags: [${2:tag1},${3:tag2}]",
"---",
"",
"${4:Short preface to article.}",
"",
"##${5:L2 Header}",
"",
"##${6:L3 Header}",
"",
"=== \"First Tab\"",
" Some Content",
" Multiline content",
"=== \"Second Tab\"",
" More content",
" Even more content",
"",
"!!! note \"Custom Admonation Title\"",
" Admonation content."
]
},
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NesI support documentation
# NeSI support documentation

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/nesi/support-docs?quickstart=1)

Expand Down
2 changes: 1 addition & 1 deletion checks/run_meta_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# Warning level for missing parameters.
EXPECTED_PARAMETERS = {
"title": "",
"template": ["main.html", "supported_apps.html"],
"template": ["main.html", "supported_apps.html", "get_support.html"],
"description": "",
"icon": "",
"status": ["new", "deprecated"],
Expand Down
50 changes: 49 additions & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check warning on line 1 in docs/CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Check page meta

meta_missing_description

Missing 'description' from front matter.

Check warning on line 1 in docs/CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Check page meta

minimum_tags

'tags' property in meta is missing or malformed.
title: Contributing
---

Expand All @@ -12,7 +12,7 @@

## Minor edits through GitHub

- Open the GitHub page of the repository, i.e. https://github.com/nesi/support-docs, and find the support page you want to edit.
- Open the GitHub page of the repository, i.e. [https://github.com/nesi/support-docs](https://github.com/nesi/support-docs), and find the support page you want to edit.
- Then click on the edit icon or press <kbd>e</kbd> to open the integrated editor.
- In the integrated editor, use the `preview` tab to check the rendered version.
**Note:** Be aware that, unfortunately, the GitHub preview won't render properly some elements, in particular admonitions.
Expand All @@ -23,14 +23,30 @@

## Major edits through GitHub

### Codespace Environment

This repository has been configured to be useable with [GitHub Codespaces](https://github.com/features/codespaces).
It allows acessing a full featured pre-configured development environment remotely, without installing anything on your local machine.

Clicking on the following link will open a VS Code instance ready to be used with the latest version of the documentation files.

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/nesi/support-docs?quickstart=1)

### Sharing Codespace Deployment

Check warning on line 35 in docs/CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Check page meta

walk_toc

Header 'Sharing Codespace Deployment' is too long. Try to keep it under 32 characters to avoid word wrapping in the toc.

Branch deployments can be shared

1. Open 'PORTS' Tab.

2. Right click on the port and select in the menu, 'Port Visiblity' -> 'Public'.

3. Copy forwarded address (<kbd>ctrl</kbd> + <kbd>c</kbd>)

![share codespace](assets/images/shareCodespaceDeployment.png)

Sharing this address will allow other people to view your deployment, so long as your codespace is running.

## Local Development Environment

Check warning on line 49 in docs/CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Check page meta

walk_toc

Header 'Local Development Environment' is too long. Try to keep it under 32 characters to avoid word wrapping in the toc.

A local development environment is not required to make doc edits, but if you are making lots of changes, the real time rendering can be quite helpful.

Expand Down Expand Up @@ -81,6 +97,13 @@

Custom snippets can be added in <a href="https://github.com/nesi/support-docs/blob/main/.vscode/includes.code-snippets.json">`../.vscode/includes.code-snippets`</a>

#### Command Palette

Pressing <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>p</kbd>, will open up the VSCode _command pallet_.
This allows you access to all functionality within VS Code, with only a few key presses.

![alt text](assets/images/code_command_pallete.png)

#### Tasks

Some of the same checks run during the GitHub CI, can also be run in VS Code.
Expand All @@ -89,6 +112,13 @@

Tasks allow continuous checks to be run in the background, these can be defined in <a href="https://github.com/nesi/support-docs/blob/main/.vscode/tasks.json">`../.vscode/tasks.json`</a>, also include in <a href="https://github.com/nesi/support-docs/blob/main/.vscode/settings.json">`../.vscode/settings.json`</a> in order to trigger on save.

## Checks

Whenever a change is commited, or a merge request opened, a series of automatic checks will be started.
From a pull request, the status of these checks can be seen in the 'Checks' tab, or inline under the 'Files Changed' Tab.

Will give three levels of ourput, **Errors** (serious issues that will prevent merging into main), **Warnings** (non-critical suggestions for improvement) and **Info** (pedantry).

## Making a Merge Request

The `main` branch is protected, changes can be made via a pull request.
Expand Down Expand Up @@ -122,10 +152,28 @@

Clicking on the 'Files Changed' tab, will give a convenient diff of the changes, as well as inline errors identified by the CI checks.

If some of the CI checks failed (make sure they are not important ones), you will have to click the `Merge without waiting for requirements to be met (bypass branch protections)` button before proceeding with the merge.

Check warning on line 155 in docs/CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Check Prose

strunk_white.composition

'Try 'trifling' instead of 'not important'.'

Feel free to raise an issue, make a proposal or [add words to the dictionary](#adding-words-to-dictionary) if you feel you are being unfairly targeted by the CI checks.

## Schedule A Merge Request

Any request can be scheduled to automatically merge at a certain time by adding the following to your merge request message.

```md
/schedule <datetime>
```

Where <datetime> is [any string that can be parsed by `Date()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse)

e.g.

```md
/schedule Wednesday
/schedule 01-05-2024
/schedule 20240501T160000
```

## Update Remote Assets

Certain files need to be fetched from other repos for up to date info. This will be automated, but for not the proccess is manual.
Expand All @@ -143,7 +191,7 @@

## Raise an issue

*Not documented at the moment (TODO)*

Check warning on line 194 in docs/CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Check Prose

annotations.misc

'Annotation left in text.'

## The 'Supported Apps' Page

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- project
- request_membership
- mynesi
title: Applying to join an existing NeSI project

Check notice on line 8 in docs/Getting_Started/Accounts-Projects_and_Allocations/Applying_to_join_an_existing_NeSI_project.md

View workflow job for this annotation

GitHub Actions / Check page meta

title_redundant

Title set in meta is redundant as it is already set in filename.
vote_count: 0
vote_sum: 0
zendesk_article_id: 360000693896
Expand All @@ -18,17 +18,14 @@

## How to join an existing project on NeSI

1. Make sure you have been given the project code by the project owner.
2. Log in to [my.nesi.org.nz](https://my.nesi.org.nz/).
3. Under the [Projects](https://my.nesi.org.nz/projects/join) page use
the "**Join Project**" link to request to be added to the project as
a member.
You need to contact the owner of the project you would like to join, and provide your NeSI account Username.

Once submitted you will receive a ticket confirmation via email.
If you do not know your NeSI account username:
1. Log in to [my.nesi.org.nz](https://my.nesi.org.nz/) via your browser.
2. In the left side panel, under Account, click My HPC Account. Your Username will appear at the top of the page.
![authentication\_factor\_setup.png](../../assets/images/Setting_Up_and_Resetting_Your_Password.png)

!!! prerequisite "What Next?"
- The project owner will be notified, and asked to approve your
request.
- Once your request has been approved by the project owner and
processed by us, you will be able to [set your NeSI account
- The project owner will add your username to the project.
- Once it is done, you will be able to [set your NeSI account
password](../../Getting_Started/Accessing_the_HPCs/Setting_Up_and_Resetting_Your_Password.md).
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---

Check warning on line 1 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check page meta

meta.siblings

Parent category 'Release_Notes_my-nesi-org-nz' has too many children (24). Try to keep number of items in a category under '8', maybe add some new categories?

Check warning on line 1 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check page meta

meta_missing_description

Missing 'description' from front matter.
created_at: '2024-04-30T19:53:24Z'
tags:

Check warning on line 3 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check page meta

minimum_tags

Try to include at least 2 'tags'(helps with search optimisation).
- releasenote
title: my.nesi.org.nz release notes v2.22.0

Check warning on line 5 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check page meta

title_length

Title 'my.nesi.org.nz release notes v2.22.0' is too long. Try to keep it under 24 characters to avoid word wrapping in the nav.

Check warning on line 5 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check Spelling

spelling

Word 'nesi' is misspelled.

Check warning on line 5 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check Spelling

spelling

Word 'nz' is misspelled.
---

## New and Improved

- Project Request page updates:
- We added additional questions that ask for more background information about your project.
- We made the grant selection field easier to use with a drop down list. The list is now searchable.

Check warning on line 12 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check Prose

after_the_deadline.redundancy

'Redundancy. Use 'drop' instead of 'drop down'.'
- We added the capability to have more supervisors if needed by adding new members and selecting the supervisor tick box.
- We improved the saving feature to avoid losing any values from any draft requests.
- We added new fields that ask for more information about the type of storage needed.
- We now require the email addresses for grant PI as well as the main supervisor.
- We added default values for the project start date, the Mahuika compute units, and the storage fields.

- Allocation renewal updates:
- We now ask in the renewal form if this allocation is linked to a grant or not.
- We now check that the end date of a grant is after the start date of the allocation request. Only valid grants from previous allocations will be carried forward.

- All support links, including link to release notes, now point to NeSI's new documentation site, docs.nesi.org.nz.

Check warning on line 23 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check Spelling

spelling

Word 'nesi' is misspelled.

Check warning on line 23 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check Spelling

spelling

Word 'nz' is misspelled.
All inquiries or feedback should be sent via email to either [email protected] or [email protected].

Check warning on line 24 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check Spelling

spelling

Word 'nesi' is misspelled.

Check warning on line 24 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check Spelling

spelling

Word 'nz' is misspelled.

Check warning on line 24 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check Spelling

spelling

Word 'nesi' is misspelled.

Check warning on line 24 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check Spelling

spelling

Word 'nz' is misspelled.

- For added security, project owners will be asked to review their members every year. A notification banner will be displayed annually as a reminder.

## Fixes

- Users with Mahuika allocations can now see the total compute values used to date in their current allocation, displayed in the project details section of their MyNeSI dashboard (green box at top of page).

Check warning on line 30 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check Spelling

spelling

Word 'MyNeSI' is misspelled.

If you have any questions about any of the updates or fixes, please
{% include "partials/support_request.html" %}.

Check warning on line 33 in docs/Getting_Started/my-nesi-org-nz/Release_Notes_my-nesi-org-nz/my-nesi-org-nz_release_notes_v2-22-0.md

View workflow job for this annotation

GitHub Actions / Check Spelling

spelling

Word 'html' is misspelled.
Loading