Skip to main content

Publish data sets, models, and other python objects, making it easy to share them across projects and with your colleagues.

Project description

pins-python

Binder

The pins package publishes data, models, and other python objects, making it easy to share them across projects and with your colleagues. You can pin objects to a variety of pin boards, including folders (to share on a networked drive or with services like DropBox), RStudio Connect, and Amazon S3. Pins can be automatically versioned, making it straightforward to track changes, re-run analyses on historical data, and undo mistakes.

Installation

python -m pip install pins

Usage

See the documentation for getting started.

Development

Install pins with dev dependencies

python -m pip install -e .[dev]

Install pre-commit hooks

This project uses pre-commit to check and format each commit.

You can set it up by running the following code in this repo:

python -m pip install pre-commit
pre-commit install

Setting version number

This project uses setuptools_scm to automatically track and change version numbers within the pins package. It works by checking the last tagged commit.

In order to set the version number, create a tag like the following.

git tag v0.0.1

In order to see the version number being used for the current commit, run:

python -m setuptools_scm

Test

Tests can be run using pytest:

pytest pins

# run all tests except those for Rstudio Connect
pytest pins -m 'not fs_rsc'

# run only local filesystem backend tests
pytest pins -m 'fs_file'

There are two important details to note for testing:

  • Backends. pins can write to backends like s3, azure, and RStudio Connect, so you will need to set credentials to test against them.
  • Pytest Marks. You can disable tests over a specific backend through pytest's -m flag. For example...
    • Skip S3: pytest pins -m 'not fs_s3'
    • Test only s3: pytest pins -m 'fs_s3'
    • List all marks: pytest pins --markers

Configuring backends

  • Copy .env.dev to be .env
  • Modify .env to file in environment variables (e.g. AWS_ACCESS_KEY_ID)
  • Be careful not to put any sensitive information in .env.dev!

Setting up RStudio Connect tests

# Be sure to set RSC_LICENSE in .env
make dev

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

pins-0.2.0.tar.gz (100.3 kB view details)

Uploaded Source

Built Distribution

pins-0.2.0-py2.py3-none-any.whl (103.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pins-0.2.0.tar.gz.

File metadata

  • Download URL: pins-0.2.0.tar.gz
  • Upload date:
  • Size: 100.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pins-0.2.0.tar.gz
Algorithm Hash digest
SHA256 11df15d966cb4edc8b673a86847652c3b27a1f92b136ba636fce38004c947b2d
MD5 b9c048f94cf26fb2cf0ef7bab1486674
BLAKE2b-256 bcf6121251aa698a24b337d4981d1bc05592a381412230fcd6ed88b3ea3bdfc5

See more details on using hashes here.

File details

Details for the file pins-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pins-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 103.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for pins-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 087f5f2217d3bd6e10335a6d2265e35618c50c04757f8b442fada6b3718d97a6
MD5 f3f727a9cf7e7a183673bf0a73ed20a2
BLAKE2b-256 5017ab601855ec46c37fe44c8efe33c56cbc9b0fbe85531995dd27538e613f9e

See more details on using hashes here.

Supported by

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