Skip to content

Commit

Permalink
feat(pkge): Add pyup to package #165 (#172)
Browse files Browse the repository at this point in the history
Pyup keeps package dependencies up to date.

closes #165
  • Loading branch information
imAsparky committed Nov 14, 2021
1 parent a3e2ff6 commit e4dc8b4
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cookiecutter.json
Expand Up @@ -9,8 +9,8 @@
"pypi_username": "{{ cookiecutter.github_username }}",
"version": "0.1.0",
"use_repo_status_badge": ["no", "concept", "wip", "active"],
"add_pyup_badge": "n",
"use_readthedocs": ["y", "n"],
"use_pyup_io": "n",
"use_readthedocs": "y",
"use_pre_commit": "y",
"command_line_interface": ["Click", "Argparse", "No command-line interface"],
"create_author_file": "y",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/reference/reference-project-inputs.rst
Expand Up @@ -76,7 +76,7 @@ project.

Options: ['no', 'concept', 'wip', 'active']

**add_pyup_badge**
**use_pyup_io**
*default = n*

Keep your open source package Python dependencies secure, up-to-date &
Expand Down
3 changes: 3 additions & 0 deletions hooks/post_gen_project.py
Expand Up @@ -169,3 +169,6 @@ def remove_file(filepath):

if "{{ cookiecutter.use_release_to_test_pypi_with_tags }}" != "y":
remove_file(".github/workflows/semantic_release_test_pypi.yaml")

if "{{ cookiecutter.use_pyup_io }}" != "y":
remove_file(".pyup.yml")
41 changes: 41 additions & 0 deletions {{cookiecutter.git_project_name}}/.pyup.yml
@@ -0,0 +1,41 @@
# configure updates globally
# default: all
# allowed: all, insecure, False
update: all

# configure dependency pinning globally
# default: True
# allowed: True, False
pin: True

# set the default branch
# default: empty, the default branch on GitHub
branch: main

# update schedule
# default: empty
# allowed: "every day", "every week", ..
schedule: "every day"

# assign users to pull requests, default is not set
# requires private repo permissions, even on public repos
# default: empty
assignees:
- "{{ cookiecutter.github_username }}"

# add a label to pull requests, default is not set
# requires private repo permissions, even on public repos
# default: empty
label_prs: "fix(pyup): "

# set a global prefix for PRs
# default: empty
pr_prefix: "fix(pyup): "

# allow to close stale PRs
# default: True
close_prs: False

requirements:
- "requirements.txt"
- "docs/requirements.txt"
2 changes: 1 addition & 1 deletion {{cookiecutter.git_project_name}}/README.rst
Expand Up @@ -9,7 +9,7 @@
:alt: Project Status: {{cookiecutter.use_repo_status_badge}}
{%- endif %}

{%- if cookiecutter.add_pyup_badge == "y" %}
{%- if cookiecutter.use_pyup_io == "y" %}
.. image:: https://pyup.io/repos/github/{{cookiecutter.github_username}}/{{cookiecutter.git_project_name}}/shield.svg
:target: https://pyup.io/repos/github/{{cookiecutter.github_username}}/{{cookiecutter.git_project_name}}/
:alt: Updates
Expand Down
5 changes: 5 additions & 0 deletions {{cookiecutter.git_project_name}}/docs/requirements.txt
@@ -0,0 +1,5 @@
furo==2021.10.9
myst-parser==0.15.2
Sphinx==4.3.0
sphinx-copybutton==0.4.0
sphinx_inline_tabs==2021.4.11b9

0 comments on commit e4dc8b4

Please sign in to comment.