Skip to content

Commit

Permalink
First working version
Browse files Browse the repository at this point in the history
  • Loading branch information
lyashevska committed Jul 4, 2024
1 parent 8b39f40 commit 6537ade
Show file tree
Hide file tree
Showing 52 changed files with 69 additions and 1,119 deletions.
File renamed without changes.
Binary file added .copier.yml.swp
Binary file not shown.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ cff-version: "1.2.0"
date-released: 2018-07-17
doi: 10.5281/zenodo.1310751
keywords:
- cookiecutter
- copier
- template
- Python
license: Apache-2.0
Expand Down
23 changes: 9 additions & 14 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ github_organization:
default: "<my-github-organization>"
license:
type: str
choices: [
- "Apache Software License 2.0",
- "MIT license",
- "BSD license",
- "ISC license",
- "GNU General Public License v3 or later",
- "GNU Lesser General Public License v3 or later",
- "Not open source"]
choices:
- "Apache Software License 2.0"
- "MIT license"
- "BSD license"
- "ISC license"
- "GNU General Public License v3 or later"
- "GNU Lesser General Public License v3 or later"
- "Not open source"
default: "MIT license"
full_name:
type: str
Expand All @@ -45,11 +45,6 @@ code_of_conduct_email:
type: str
default: "{{ email }}"

_exclude:
- copier.yaml
- __pycache__
- .git
- CHANGELOG.md
- README.md
_subdirectory: template

# Optional questions
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ 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]({{cookiecutter.repository_url}}/blob/main/.github/workflows/sonarcloud.yml) you must follow the steps below:
In order to configure Sonarcloud analysis [GitHub Action workflow]({{repository_url}}/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={{cookiecutter.github_organization}}_{{cookiecutter.directory_name}}) and select `Number of days` option
1. go to [new code definition administration page](https://sonarcloud.io/project/new_code?id={{github_organization}}_{{directory_name}}) 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/{{cookiecutter.github_organization}}/{{cookiecutter.directory_name}}/settings/secrets/actions)
1. the created token must be added as `SONAR_TOKEN` to [secrets on GitHub](https://github.com/{{github_organization}}/{{directory_name}}/settings/secrets/actions)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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`]({{cookiecutter.repository_url}}/actions/workflows/cffconvert.yml) GitHub Action are unfortunately a bit cryptic, but doing the following helps:
It is likely that your `CITATION.cff` currently doesn't pass validation. The error messages you get from the [`cffconvert`]({{repository_url}}/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/).
Expand All @@ -13,7 +13,7 @@ It is likely that your `CITATION.cff` currently doesn't pass validation. The err

Afterwards, the `cffconvert` GitHub Action should be green.

To make sure services like [Zenodo](https://zenodo.org) and the [Research Software Directory](https://research-software-directory.org/) can keep your citation data up to date, the [`cffconvert`]({{cookiecutter.repository_url}}/actions/workflows/cffconvert.yml) GitHub Action checks the following:
To make sure services like [Zenodo](https://zenodo.org) and the [Research Software Directory](https://research-software-directory.org/) can keep your citation data up to date, the [`cffconvert`]({{repository_url}}/actions/workflows/cffconvert.yml) GitHub Action checks the following:

1. Whether your repository includes a `CITATION.cff` file.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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 <https://zenodo.org/account/settings/github/> 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]({{cookiecutter.repository_url}}/blob/main/README.dev.md#33-github)
2. Your package will get a DOI only after you make a release. Create a new release as described in [README.dev.md]({{repository_url}}/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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions {{directory_name}}/.gitignore → template/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ env
env3
venv
venv3

.swp
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# YAML 1.2
---
cff-version: "1.2.0"
title: "{{ cookiecutter.package_name }}"
title: "{{ package_name }}"
authors:
-
family-names: {{ full_name.split(' ')[-1] }}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# -- Project information -----------------------------------------------------

project = u"{{ package_name }}"
copyright = u"{% now "local", "%Y" %}, {{ copyright_holder }}"
copyright = u"{{ '%Y-%m-%d %H:%M:%S' | strftime }}, {{ copyright_holder }}"
author = u"{{ full_name.replace('\"', '\\\"') }}"

# The version info for the project you're documenting, acts as replacement for
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added template/tests/__init__.py
Empty file.
File renamed without changes.
30 changes: 30 additions & 0 deletions template/{% if license == 'BSD license' %}LICENSE{% endif %}.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
BSD License

Copyright (c) {{ '%Y' | strftime }}, {{ copyright_holder }}
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

* Neither the name of {{ package_name }} nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ISC License

Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.copyright_holder }}
Copyright (c) {{ '%Y' | strftime }}, {{ copyright_holder }}

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted,
provided that the above copyright notice and this permission notice appear in all copies.
Expand All @@ -9,4 +9,4 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
THIS SOFTWARE.
16 changes: 16 additions & 0 deletions template/{% if license == 'MIT licence' %}LICENSE{% endif %}.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
MIT License

Copyright (c) {{ '%Y' | strftime }}, {{ copyright_holder }}

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Changes here will be overwritten by Copier
{{ _copier_conf.answers_file }}.jinja

{{ _copier_answers|to_nice_yaml -}}
Loading

0 comments on commit 6537ade

Please sign in to comment.