Skip to main content

...

Project description

cvxcooker

PyPI version Apache 2.0 License Downloads Coverage Status

What is cvxcooker?

This is code to automate the often tedious process of writing boilerplate files such as

  • README.md
  • CONTRIBUTING.md
  • CODE_OF_CONDUCT.md
  • book/sphinx/conf.py
  • book/_config.yml

All those files are created from Jinja2 templates, e.g. the file 'book/_config.yml' is created from the template

# Book settings
# Learn more at https://jupyterbook.org/customize/config.html

title: {{ name }}
author: {{ authors[0] }}
only_build_toc_files: true

execute:
  execute_notebooks: force
  timeout: 240

parse:
  myst_enable_extensions:
    - substitution
    - linkify
    - dollarmath
  myst_substitutions:
    book_url: {{ homepage }}

# needed for plotly
sphinx:
  config:
    html_js_files:
    - https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js

# Information about where the book exists on the web
repository:
  url: {{ repository }}
  path_to_book: book
  branch: main

# Add GitHub buttons to your book
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
html:
  use_issues_button: true
  use_repository_button: true
  extra_navbar: Powered by <a href="https://jupyterbook.org">Jupyter Book</a>
  # Will be displayed underneath the left navbar.

The data in double curly braces is replaced by the data injected into the template. We get the data from parsing the projects 'pyproject.toml' in the root of the repository.

Of course, we do not want to entertain the idea of having copies of all those templates in all the repositories. Instead, we have this central repository and every repository that wants to use this functionality adds in its Makefile the job

.PHONY: boil
boil: ## Update the boilerplate code
 @poetry run pip install cvxcooker
 @poetry run cook pyproject.toml

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cvxcooker-0.0.4.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

cvxcooker-0.0.4-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file cvxcooker-0.0.4.tar.gz.

File metadata

  • Download URL: cvxcooker-0.0.4.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for cvxcooker-0.0.4.tar.gz
Algorithm Hash digest
SHA256 b5c1ec919305f8330fa876126fc3d1e9e1fb9c9e85ae19615eb74226f61f1402
MD5 da9c3cc050b8021d7044f7aaccded323
BLAKE2b-256 dea708e23edf349a2b7f3e95a09d99bdb1a07918c1e8f80edf1b49e397c2ca5a

See more details on using hashes here.

File details

Details for the file cvxcooker-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: cvxcooker-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for cvxcooker-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 42110ef836cfcf79892d68bbbed4b38cf16b4112d2cf73d68239ea1a86a1a4ef
MD5 d36065c647de2f1990e7a308b9d5a2fc
BLAKE2b-256 4ecd52b8413ee88bdcb320cd1e4eac9c157233a80615f87f466f610fb2ad4fcf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page