Skip to content

Commit 4de4043

Browse files
authored
Add PyCharm Copyright profile (#31)
Signed-off-by: Federico Busetti <[email protected]>
1 parent 4e5ec53 commit 4de4043

File tree

10 files changed

+199
-6
lines changed

10 files changed

+199
-6
lines changed

.idea/copyright/MIT.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/profiles_settings.xml

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ It is configured with all the following features:
2424
* testing against multiple python versions
2525
* releases on [PyPI](https://pypi.org)
2626
* GitHub pages documentation using [mkdocs](https://www.mkdocs.org)
27+
* PyCharm profile basic configuration
2728

2829
## How to use this repository template to create a new package
2930

@@ -39,6 +40,7 @@ It is configured with all the following features:
3940
containing the codeclimate reporter id (you can find it at `https://codeclimate.com/repos/YOUR_REPO_ID/settings/test_reporter`).
4041
If you don't want to use CodeClimate just delete `workflows/python-quality.yml`.
4142
* Update the badges in `README.md`! (check [shields.io](https://shields.io/) for extra badges)
43+
* Update the PyCharm Copyright profile in the IDE settings: Editor | Copyright | Copyright Profiles (if you want to use it)
4244
* Setup local development:
4345
* Clone the repository
4446
* Install poetry `pip install poetry`

bootstrap_python_package/__init__.py

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
# ==============================================================================
2+
# Copyright (c) 2024 Federico Busetti =
3+
4+
# =
5+
# Permission is hereby granted, free of charge, to any person obtaining a =
6+
# copy of this software and associated documentation files (the "Software"), =
7+
# to deal in the Software without restriction, including without limitation =
8+
# the rights to use, copy, modify, merge, publish, distribute, sublicense, =
9+
# and/or sell copies of the Software, and to permit persons to whom the =
10+
# Software is furnished to do so, subject to the following conditions: =
11+
# =
12+
# The above copyright notice and this permission notice shall be included in =
13+
# all copies or substantial portions of the Software. =
14+
# =
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR =
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, =
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL =
18+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER =
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING =
20+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER =
21+
# DEALINGS IN THE SOFTWARE. =
22+
# ==============================================================================
23+
24+
__version__ = "0.0.0"
25+
__version_tuple__ = (0, 0, 0)
26+
27+
128
def some_function() -> str:
229
"""
330
Some function docstring
@@ -6,7 +33,3 @@ def some_function() -> str:
633
:rtype: str
734
"""
835
return "some_variable_to_test"
9-
10-
11-
__version__ = "0.0.0"
12-
__version_tuple__ = (0, 0, 0)

docs/index.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
# bootstrap-python-package
2+
![Static Badge](https://img.shields.io/badge/Python-3.8_%7C_3.9_%7C_3.10_%7C_3.11_%7C_3.12-blue?logo=python&logoColor=white)
3+
[![Stable Version](https://img.shields.io/pypi/v/bootstrap-python-package?color=blue)](https://pypi.org/project/bootstrap-python-package/)
4+
[![stability-beta](https://img.shields.io/badge/stability-beta-33bbff.svg)](https://github.com/mkenney/software-guides/blob/master/STABILITY-BADGES.md#beta)
5+
6+
[![Python tests](https://github.com/febus982/bootstrap-python-package/actions/workflows/python-tests.yml/badge.svg?branch=main)](https://github.com/febus982/bootstrap-python-package/actions/workflows/python-tests.yml)
7+
[![Maintainability](https://api.codeclimate.com/v1/badges/593e78ec96ed5ebb0dd3/maintainability)](https://codeclimate.com/github/febus982/bootstrap-python-package/maintainability)
8+
[![Test Coverage](https://api.codeclimate.com/v1/badges/593e78ec96ed5ebb0dd3/test_coverage)](https://codeclimate.com/github/febus982/bootstrap-python-package/test_coverage)
9+
10+
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
11+
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
12+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
13+
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
214

315
This template repository provides the boilerplate to create a python package.
416
It is configured with all the following features:
517

6-
* Test suite using [pytest](https://docs.pytest.org/en/7.4.x/)
18+
* Test suite using [tox](https://tox.wiki/en/latest/index.html) and [pytest](https://docs.pytest.org/en/7.4.x/)
719
* Typing using [mypy](https://mypy.readthedocs.io/en/stable/)
820
* Linting, security and code format using [ruff](https://github.com/astral-sh/ruff) (using [black](https://pypi.org/project/black/)
921
code style and [bandit](https://github.com/PyCQA/bandit) security rules)
@@ -12,21 +24,23 @@ It is configured with all the following features:
1224
* testing against multiple python versions
1325
* releases on [PyPI](https://pypi.org)
1426
* GitHub pages documentation using [mkdocs](https://www.mkdocs.org)
27+
* PyCharm profile basic configuration
1528

1629
## How to use this repository template to create a new package
1730

1831
* Create your github repository using this template. (The big green `Use this template` button)
1932
* Rename the `bootstrap_python_package` directory
2033
* Search and replace all the occurrences of `bootstrap-python-package` and `bootstrap_python_package`
2134
* Configure a pending trusted publisher on [pypi](https://pypi.org/manage/account/publishing) using the following values:
22-
* PyPI Project Name: what you renamed the directory `bootstrap_python_package` to (Double check `_` and `-`)
35+
* PyPI Project Name: The github repository name (in this case `bootstrap-python-package`)
2336
* Owner: The github repository owner (in this case `febus982`)
2437
* Repository name: The github repository name (in this case `bootstrap-python-package`)
2538
* Workflow name: `release.yml`
2639
* Create a GitHub Actions secret named `CODECLIMATE_REPORTER_ID` (at URL `https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/secrets/actions`)
2740
containing the codeclimate reporter id (you can find it at `https://codeclimate.com/repos/YOUR_REPO_ID/settings/test_reporter`).
2841
If you don't want to use CodeClimate just delete `workflows/python-quality.yml`.
2942
* Update the badges in `README.md`! (check [shields.io](https://shields.io/) for extra badges)
43+
* Update the PyCharm Copyright profile in the IDE settings: Editor | Copyright | Copyright Profiles (if you want to use it)
3044
* Setup local development:
3145
* Clone the repository
3246
* Install poetry `pip install poetry`

mkdocs-overrides/main.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
<!--=========================================================================-->
2+
<!-- Copyright (c) 2024 Federico Busetti -->
3+
4+
<!-- -->
5+
<!-- Permission is hereby granted, free of charge, to any person obtaining a -->
6+
<!-- copy of this software and associated documentation files (the "Software"), -->
7+
<!-- to deal in the Software without restriction, including without limitation -->
8+
<!-- the rights to use, copy, modify, merge, publish, distribute, sublicense, -->
9+
<!-- and/or sell copies of the Software, and to permit persons to whom the -->
10+
<!-- Software is furnished to do so, subject to the following conditions: -->
11+
<!-- -->
12+
<!-- The above copyright notice and this permission notice shall be included in -->
13+
<!-- all copies or substantial portions of the Software. -->
14+
<!-- -->
15+
<!-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -->
16+
<!-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -->
17+
<!-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -->
18+
<!-- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -->
19+
<!-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -->
20+
<!-- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -->
21+
<!-- DEALINGS IN THE SOFTWARE. -->
22+
<!--=========================================================================-->
23+
124
{% extends "base.html" %}
225

326
{% block outdated %}

scripts/docs-version.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
#!/usr/bin/env bash
22

3+
4+
#===============================================================================
5+
# Copyright (c) 2024 Federico Busetti =
6+
7+
# =
8+
# Permission is hereby granted, free of charge, to any person obtaining a =
9+
# copy of this software and associated documentation files (the "Software"), =
10+
# to deal in the Software without restriction, including without limitation =
11+
# the rights to use, copy, modify, merge, publish, distribute, sublicense, =
12+
# and/or sell copies of the Software, and to permit persons to whom the =
13+
# Software is furnished to do so, subject to the following conditions: =
14+
# =
15+
# The above copyright notice and this permission notice shall be included in =
16+
# all copies or substantial portions of the Software. =
17+
# =
18+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR =
19+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, =
20+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL =
21+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER =
22+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING =
23+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER =
24+
# DEALINGS IN THE SOFTWARE. =
25+
#===============================================================================
26+
327
VERSION=$(poetry version -s)
428
SEMVER=( ${VERSION//./ } )
529
echo "${SEMVER[0]}.${SEMVER[1]}"

scripts/gen_pages.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
# ==============================================================================
2+
# Copyright (c) 2024 Federico Busetti =
3+
4+
# =
5+
# Permission is hereby granted, free of charge, to any person obtaining a =
6+
# copy of this software and associated documentation files (the "Software"), =
7+
# to deal in the Software without restriction, including without limitation =
8+
# the rights to use, copy, modify, merge, publish, distribute, sublicense, =
9+
# and/or sell copies of the Software, and to permit persons to whom the =
10+
# Software is furnished to do so, subject to the following conditions: =
11+
# =
12+
# The above copyright notice and this permission notice shall be included in =
13+
# all copies or substantial portions of the Software. =
14+
# =
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR =
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, =
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL =
18+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER =
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING =
20+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER =
21+
# DEALINGS IN THE SOFTWARE. =
22+
# ==============================================================================
23+
24+
#
25+
# Permission is hereby granted, free of charge, to any person obtaining a
26+
# copy of this software and associated documentation files (the "Software"),
27+
# to deal in the Software without restriction, including without limitation
28+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
29+
# and/or sell copies of the Software, and to permit persons to whom the
30+
# Software is furnished to do so, subject to the following conditions:
31+
#
32+
#
133
# -----------------------------------------------------#
234
# Library imports #
335
# -----------------------------------------------------#

tests/__init__.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ==============================================================================
2+
# Copyright (c) 2024 Federico Busetti =
3+
4+
# =
5+
# Permission is hereby granted, free of charge, to any person obtaining a =
6+
# copy of this software and associated documentation files (the "Software"), =
7+
# to deal in the Software without restriction, including without limitation =
8+
# the rights to use, copy, modify, merge, publish, distribute, sublicense, =
9+
# and/or sell copies of the Software, and to permit persons to whom the =
10+
# Software is furnished to do so, subject to the following conditions: =
11+
# =
12+
# The above copyright notice and this permission notice shall be included in =
13+
# all copies or substantial portions of the Software. =
14+
# =
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR =
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, =
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL =
18+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER =
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING =
20+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER =
21+
# DEALINGS IN THE SOFTWARE. =
22+
# ==============================================================================
23+

tests/test_bootstrap.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# ==============================================================================
2+
# Copyright (c) 2024 Federico Busetti =
3+
4+
# =
5+
# Permission is hereby granted, free of charge, to any person obtaining a =
6+
# copy of this software and associated documentation files (the "Software"), =
7+
# to deal in the Software without restriction, including without limitation =
8+
# the rights to use, copy, modify, merge, publish, distribute, sublicense, =
9+
# and/or sell copies of the Software, and to permit persons to whom the =
10+
# Software is furnished to do so, subject to the following conditions: =
11+
# =
12+
# The above copyright notice and this permission notice shall be included in =
13+
# all copies or substantial portions of the Software. =
14+
# =
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR =
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, =
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL =
18+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER =
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING =
20+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER =
21+
# DEALINGS IN THE SOFTWARE. =
22+
# ==============================================================================
23+
124
from bootstrap_python_package import some_function
225

326

0 commit comments

Comments
 (0)