Giter Site home page Giter Site logo

dksmiffs / import-ready Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 50 KB

Demonstrate publishing a basic importable Python package to TestPyPI and PyPI.

License: MIT License

Python 100.00%
testpypi python3 pytest codecov pytest-cov codacy travis-ci pypi pip-tools

import-ready's Introduction

import-ready

image image image image image image

This repository demonstrates steps needed to publish an importable Python package first to TestPyPI, and second to PyPI. If this demonstration deviates from best practice in any way, please submit an issue on GitHub.

Inside import-ready is a package called huntsville_havoc that divulges a couple of bona fide secrets that most diehard SPHL Huntsville Havoc fans don't know.

Prepare the Package

  1. Prepare your environment before installing Python packages.
  2. Update version in setup.py per semantic versioning guidance.

Test in Development Environment

Run as follows from the top level directory in a clean venv with pip-tools installed:

python -m piptools compile --upgrade --generate-hashes dev-requirements.in
python -m piptools sync dev-requirements.txt
python -m pytest -s tests

Publish to TestPyPI

  1. Git commit, tag, & push all desired edits for release.
  2. Create a new release in GitHub to mirror your new version.
  3. Generate distribution archives for your package.
  4. Upload your package to TestPyPI.

Test the TestPyPI-Published Package

Run as follows from the tests directory in another clean venv with pip-tools installed:

TEST_PYPI_FLAG='--extra-index-url https://test.pypi.org/simple/'
python -m piptools compile --upgrade --generate-hashes $TEST_PYPI_FLAG \
      --output-file testpypi-requirements.txt pub-requirements.in
python -m piptools sync $TEST_PYPI_FLAG testpypi-requirements.txt
python -m pytest -s

Publish to PyPI

After passing the above tests, upload your package to PyPI.

Test the PyPI-Published Package

Run as follows from the tests directory in yet another clean venv with pip-tools installed:

python -m piptools compile --upgrade --generate-hashes \
      --output-file pypi-requirements.txt pub-requirements.in
python -m piptools sync pypi-requirements.txt
python -m pytest -s

License

MIT

import-ready's People

Contributors

dksmiffs avatar

Watchers

 avatar

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.