Skip to main content

Frappucino

Freeze your API.

Frappucino allows you during development to make sure you haven't broken API. By first taking an imprint of your API at one point in time and then compare it to the current project state. The goal is to warn you when incompatible changes have been introduces, and list theses.

You could integrate it in you CI to make sure you don't inadvertently break things.

Example:

# old function
def read(name, *, options=None):
    with open(name, 'rb') as f:
        return process(data)

# new function
def read(name_or_buffer, *, options=None):
    if isinstance(name, str):
        with open(name, 'rb') as f:
            data = f.read()
    else:
        data = name_or_buffer.read()
    return process(data)

There is a subtle breakage of API in the above, as you may not remember positional parameters can be use a keyword arguments. That is to say one of your customer may use:

read(name='dump.csv')

Hence changing the name of the positional parameter from name to name_or_buffer is a change of API. There are a number of details like this one where you may end up breaking API without realizing. It's hard to keep track of this when working on dev branches, unit test may not catch all of that. Frappuccino is there to help.

Example:

$ source activate astropy==3.2
$ frappuccino astropy astropy.timeseries --save    astropy.json

$ source activate astropy=master
$ frappuccino astropy astropy.timeseries --compare astropy.json

The following signatures differ between versions:

      - astropy.time.core.TimeDelta.to(self, *args, **kwargs)
      + astropy.time.core.TimeDelta.to(self, unit, equivalencies='[]')

      - astropy.table.table.Table.add_column(self, col, index='None', name='None', rename_duplicate='False', copy='True')
      + astropy.table.table.Table.add_column(self, col, index='None', name='None', rename_duplicate='False', copy='True', default_name='None')

      - astropy.table.table.Table.replace_column(self, name, col)
      + astropy.table.table.Table.replace_column(self, name, col, copy='True')

Other example

cp frappuccino/tests/old.py frappuccino/t.py ; frappuccino frappuccino.t --save t.json; sleep 2;  cp frappuccino/tests/new.py frappuccino/t.py; frappuccino frappuccino.t --compare t.json

Release files for frappuccino 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for frappuccino 0.0.8
File Size Uploaded
frappuccino-0.0.8.tar.gz 98.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for frappuccino 0.0.8
File Interpreter ABI Platform
frappuccino-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 173.8 kB

Release files / frappuccino-0.0.8.tar.gz

Download URL frappuccino-0.0.8.tar.gz
Size 98.5 kB
Tags Source
SHA-256 checksum
How to use checksums
11ca0d18456312512f7a44a18d5cafc30f1fc9d1dc97facade1c0f7577a777ae
BLAKE2b-256 checksum
How to use checksums
599d0a50980af34b54876936afced5c99191aee2231aa2a7790660556709cbf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.24.0

Release files / frappuccino-0.0.8-py3-none-any.whl

Download URL frappuccino-0.0.8-py3-none-any.whl
Size 75.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2980b789aa9be97786ff19db0e39425edc41143f520c0c94979f5ee8aae5cef4
BLAKE2b-256 checksum
How to use checksums
2cbbc9c8f1b7bad3004f5a1fd5ce7a69a61f5e24bd6b9f696a45bb6fc0a8636d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.24.0

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page