Giter VIP home page Giter VIP logo

calcipy_template's Introduction

Copier Calcipy

Project scaffold for Python packages built on calcipy (kyleking/calcipy). Built with copier so projects can be kept up-to-date

Quick Start

# Install copier globally with pipx or use your preferred method
pipx install copier

# For end users, get the template with the below snippet. Replace dest_folder_name (can use ".")
copier copy --UNSAFE gh:KyleKing/calcipy_template dest_folder_name

# Updates can be retrieved with:
copier update . --UNSAFE
# I personally have aliases for:
alias copier-update='copier update --UNSAFE --conflict=rej'
alias copier-auto-update='copier-update --defaults'

Alternatives

This project scaffold is primarily for my personal use, so you may find that there are other templates that better support your use case. I would recommend any of these:

Local Development

# Local changes need to be committed to take effect (at a later point squash all "tmp" commits)
git add . && git commit -m "tmp" && copier . ../test_template  --UNSAFE --conflict=rej --vcs-ref=HEAD

# For testing update from within the target directory
#   Note: make sure to commit changes in test directory before running copier
#   If not, after answering all of the questions, you may see this error and need to restart:
#     "Destination repository is dirty; cannot continue. Please commit or stash your local changes and retry."
cd test_template
copier copy --UNSAFE ../calcipy_template .
copier update . --UNSAFE --conflict=rej --defaults

Releases

Any push to the repository main branch will trigger a version bump based on commitizen rules (fix, feat, etc.)

Support

Below are a couple of useful snippets related to maintaining a package that utilizes this template

Bulk Removing a Specific GitHub Action's History

After renaming or removing a workflow, run this script to tidy up the list of Actions and avoid folding under "See More." This script will delete all runs for a specific workflow and could be extended as needed.

#!/bin/zsh -e

# GitHub API docs: https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28
#   GH CLI Docs: https://cli.github.com/manual/gh_api
# Inspiration: https://qmacro.org/blog/posts/2021/03/26/mass-deletion-of-github-actions-workflow-runs/

OWNER=kyleking
REPO=tail-jsonl
WORKFLOW_ID=upgrade-dependencies.yml

run_ids=$( \
        gh api \
        --header "Accept: application/vnd.github+json" \
        --header "X-GitHub-Api-Version: 2022-11-28" \
        "/repos/$OWNER/$REPO/actions/workflows/$WORKFLOW_ID/runs" \
        --method=GET \
        --raw-field='per_page=100' \
        --jq '.workflow_runs[].id' \
    )
echo $run_ids | xargs -I_ echo _
echo $run_ids | xargs -I_ gh api -X DELETE "/repos/$OWNER/$REPO/actions/runs/_"

calcipy_template's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar kyleking avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

jozinlu91

calcipy_template's Issues

Fixes

  • Check_Imports file was missing for cache_assert
  • cz_legacy needs to be updated

Support Windows

A few things like rm and $PWD are *nix-only. Test on Windows and see if there are another other relevant changes

Fix Markdown Linking

Relative markdown links are not working on GH (i.e. https://github.com/kyleking/pytest_cache_assert/tests, https://github.com/kyleking/pytest_cache_assert/docs, etc.)

They need to include the blame for Github, but be relative for MKDocs

Could be just a problem with trying to make the URL exact: https://github.blog/2013-01-31-relative-links-in-markup-files/

For more examples, see [Scripts]({{ repository_provider }}/{{ repository_namespace }}/{{ package_name_py }}/scripts) or [Tests]({{ repository_provider }}/{{ repository_namespace }}/{{ package_name_py }}/tests)

https://raw.githubusercontent.com/KyleKing/pytest_cache_assert/aa116b54fe7cfab4837144ab0deeef6c3d72801e/docs/README.md

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.