From a97226ca8ce362f2c8ac79eab17ed0d95bd8f24d Mon Sep 17 00:00:00 2001 From: NLeSC Python template Date: Fri, 17 Nov 2023 09:47:20 +0000 Subject: [PATCH] Cleanup automated next steps issue generator --- .../next_steps/01_sonarcloud_integration.md | 16 ----- .github/next_steps/02_citation.md | 43 ------------- .github/next_steps/03_readthedocs.md | 20 ------ .github/next_steps/04_zenodo_integration.md | 22 ------- .github/next_steps/05_linting.md | 17 ----- .github/workflows/next_steps.yml | 62 ------------------- 6 files changed, 180 deletions(-) delete mode 100644 .github/next_steps/01_sonarcloud_integration.md delete mode 100644 .github/next_steps/02_citation.md delete mode 100644 .github/next_steps/03_readthedocs.md delete mode 100644 .github/next_steps/04_zenodo_integration.md delete mode 100644 .github/next_steps/05_linting.md delete mode 100644 .github/workflows/next_steps.yml diff --git a/.github/next_steps/01_sonarcloud_integration.md b/.github/next_steps/01_sonarcloud_integration.md deleted file mode 100644 index 80c6b37..0000000 --- a/.github/next_steps/01_sonarcloud_integration.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: 'Next step: Sonarcloud integration' ---- - -Continuous code quality can be handled by [Sonarcloud](https://sonarcloud.io/). This repository is configured to use Sonarcloud to perform quality analysis and code coverage report on each push. - -In order to configure Sonarcloud analysis [GitHub Action workflow](https://github.com/hechth/fs-irods/blob/main/.github/workflows/sonarcloud.yml) you must follow the steps below: - -1. go to [Sonarcloud](https://sonarcloud.io/projects/create) to create a new Sonarcloud project -1. login with your GitHub account -1. add Sonarcloud organization or reuse existing one -1. set up a repository -1. go to [new code definition administration page](https://sonarcloud.io/project/new_code?id=hechth_fs-irods) and select `Number of days` option -1. To be able to run the analysis: - 1. a token must be created at [Sonarcloud account](https://sonarcloud.io/account/security/) - 1. the created token must be added as `SONAR_TOKEN` to [secrets on GitHub](https://github.com/hechth/fs-irods/settings/secrets/actions) diff --git a/.github/next_steps/02_citation.md b/.github/next_steps/02_citation.md deleted file mode 100644 index dfc66df..0000000 --- a/.github/next_steps/02_citation.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: 'Next step: Citation data' ---- - -It is likely that your `CITATION.cff` currently doesn't pass validation. The error messages you get from the [`cffconvert`](https://github.com/hechth/fs-irods/actions/workflows/cffconvert.yml) GitHub Action are unfortunately a bit cryptic, but doing the following helps: - -- [ ] Check if the `given-name` and `family-name` keys need updating. If your family name has a name particle like `von` or `van` or `de`, use the `name-particle` key; if your name has a suffix like `Sr` or `IV`, use `name-suffix`. For details, refer to the schema description: https://github.com/citation-file-format/citation-file-format -- [ ] Update the value of the `orcid` key. If you do not have an orcid yet, you can get one here [https://orcid.org/](https://orcid.org/). -- [ ] Add more authors if needed -- [ ] Update `date-released` using the YYYY-MM-DD format. -- [ ] Update the `doi` key with the conceptDOI for your repository (see [https://help.zenodo.org](https://help.zenodo.org/) for more information on what a conceptDOI is). If your project doesn't have a DOI yet, you can use the string `10.0000/FIXME` to pass validation. -- [ ] Verify that the `keywords` array accurately describes your project. - -Once you do all the steps above, the `cffconvert` workflow will tell you what content it expected to see in `.zenodo.json`. Copy-paste from the GitHub Action log into a new file `.zenodo.json`. Afterwards, the `cffconvert` GitHub Action should be green. - - -To help you keep the citation metadata up to date and synchronized, the [`cffconvert`](https://github.com/hechth/fs-irods/actions/workflows/cffconvert.yml) GitHub Action checks the following 6 aspects: - -1. Whether your repository includes a `CITATION.cff` file. - - _By including this file, authors of the software can receive credit for the work they put in._ - -1. Whether your `CITATION.cff` is valid YAML. - - _Visit http://www.yamllint.com/ to see if the contents of your CITATION.cff are valid YAML._ - -1. Whether your `CITATION.cff` adheres to the schema (as listed in the `CITATION.cff` file itself under key `cff-version`). - - _The Citation File Format schema can be found [here](https://github.com/citation-file-format/citation-file-format), along with an explanation of all the keys. You're advised to use the latest available schema version._ - -1. Whether your repository includes a `.zenodo.json` file. - - _With this file, you can control what metadata should be associated with any future releases of your software on Zenodo: things like the author names, along with their affiliations and their ORCIDs, the license under which the software has been released, as well as the name of your software and a short description. If your repository doesn't have a .zenodo.json file, Zenodo will take a somewhat crude guess to assign these metadata._ - - _The `cffconvert` GitHub action will tell you what it expects to find in `.zenodo.json`, just copy and paste it to a new file named `.zenodo.json`. The suggested text ignores CITATION.cff's `version`, `commit`, and `date-released`. `cffconvert` considers these keys `suspect` in the sense that they are often out of date, and there is little purpose to telling Zenodo about these properties: Zenodo already knows._ - -1. Whether `.zenodo.json` is valid JSON. - - _Currently unimplemented, but you can check for yourself on [https://jsonlint.com/](https://jsonlint.com/)._ - -1. Whether `CITATION.cff` and `.zenodo.json` contain equivalent data. - - _This final check verifies that the two files are in sync. The check ignores CITATION.cff's `version`, `commit`, and `date-released`._ diff --git a/.github/next_steps/03_readthedocs.md b/.github/next_steps/03_readthedocs.md deleted file mode 100644 index c29da0e..0000000 --- a/.github/next_steps/03_readthedocs.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: 'Next step: Read the Docs' ---- - -Your Python package should have publicly available documentation, including API documentation for your users. -[Read the Docs](https://readthedocs.org) can host your user documentation for you. - -To host the documentation of this repository please perform the following instructions: - -1. go to [Read the Docs](https://readthedocs.org/dashboard/import/?) -1. log in with your GitHub account -1. find `hechth/fs-irods` in list and press `+` button. - * If repository is not listed, - 1. go to [Read the Docs GitHub app](https://github.com/settings/connections/applications/fae83c942bc1d89609e2) - 2. make sure hechth has been granted access. - 3. reload repository list on Read the Docs import page -1. wait for the first build to be completed at -1. check that the link of the documentation badge in the [README.md](https://github.com/hechth/fs-irods) works - -See [README.dev.md#](https://github.com/hechth/fs-irods/blob/main/README.dev.md#generating-the-api-docs) how to build documentation site locally. diff --git a/.github/next_steps/04_zenodo_integration.md b/.github/next_steps/04_zenodo_integration.md deleted file mode 100644 index dcb3c00..0000000 --- a/.github/next_steps/04_zenodo_integration.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: 'Next step: Enable Zenodo integration' ---- - -By enabling Zenodo integration, your package will automatically get a DOI which can be used to cite your package. After enabling Zenodo integration for your GitHub repository, Zenodo will create a snapshot and archive each release you make on GitHub. Moreover, Zenodo will create a new DOI for each GitHub release of your code. - -To enable Zenodo integration: - -1. Go to http://zenodo.org and login with your GitHub account. When you are redirected to GitHub, *Authorize application* to give permission to Zenodo to access your account. -1. Go to and enable Zenodo integration of your repository by clicking on `On` toggle button. -2. Your package will get a DOI only after you make a release. Create a new release as described in [README.dev.md](https://github.com/hechth/fs-irods/blob/main/README.dev.md#33-github) -3. At this point you should have a DOI. To find out the DOI generated by Zenodo: - 1. Visit https://zenodo.org/deposit and click on your repository link - 2. You will find the latest DOI in the right column in Versions box in **Cite all versions?** section - 3. Copy the text of the link. For example `10.5281/zenodo.1310751` -4. Update the badge in your repository - 1. Edit README.md and replace the badge placeholder with the badge link you copied in previous step. - The badge placeholder is shown below. - - `[![DOI](https://zenodo.org/badge/DOI/.svg)](https://doi.org/)` - -For FAQ about Zenodo please visit . diff --git a/.github/next_steps/05_linting.md b/.github/next_steps/05_linting.md deleted file mode 100644 index bf50142..0000000 --- a/.github/next_steps/05_linting.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: 'Next step: Linting' ---- - -Your repository has a [workflow](https://github.com/hechth/fs-irods/blob/main/.github/workflows/build.yml) which [lints](https://en.wikipedia.org/wiki/Lint_(software)) your code after every push and when creating a pull request. - -Linter workflow may fail if `description` or `keywords` field in [setup.cfg](https://github.com/hechth/fs-irods/blob/main/setup.cfg) is empty. Please update these fields. To validate your changes run: - -```shell -ruff . -``` - -Enabling [githook](https://git-scm.com/docs/githooks) will automatically lint your code in every commit. You can enable it by running the command below. - -```shell -git config --local core.hooksPath .githooks -``` diff --git a/.github/workflows/next_steps.yml b/.github/workflows/next_steps.yml deleted file mode 100644 index 23319f7..0000000 --- a/.github/workflows/next_steps.yml +++ /dev/null @@ -1,62 +0,0 @@ -on: [push] -permissions: - contents: write - issues: write -name: Create issues for next steps -jobs: - next_steps: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Create Sonarcloud integration issue - uses: JasonEtco/create-an-issue@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - filename: .github/next_steps/01_sonarcloud_integration.md - id: sonarcloud - - - name: Create citation data issue - uses: JasonEtco/create-an-issue@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - filename: .github/next_steps/02_citation.md - id: citation - - name: Create readthedocs issue - uses: JasonEtco/create-an-issue@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - filename: .github/next_steps/03_readthedocs.md - id: readthedocs - - name: Create Zenodo integration issue - uses: JasonEtco/create-an-issue@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - filename: .github/next_steps/04_zenodo_integration.md - id: zenodo - - name: Create linting issue - uses: JasonEtco/create-an-issue@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - filename: .github/next_steps/05_linting.md - id: linting - - name: List created issues - run: | - echo 'Created issues that must be completed to have fully working Python package: - * Sonarcloud integration ${{ steps.sonarcloud.outputs.url }} - * Zenodo integration ${{ steps.zenodo.outputs.url }} - * Read the Docs instructions ${{ steps.readthedocs.outputs.url }} - * Citation data ${{ steps.citation.outputs.url }} - * Linting fixes ${{ steps.linting.outputs.url }}' - - name: Cleanup files needed to create next steps issues - run: | - git config --global user.name 'NLeSC Python template' - git config --global user.email 'nlesc-python-template@users.noreply.github.com' - git rm .github/workflows/next_steps.yml - git rm -r .github/next_steps - git commit -am "Cleanup automated next steps issue generator" - git push