Skip to main content

Sample public project setup

Project description

Sample public project setup.

Usage

Add the package to your dependencies. If you’re working on a project managed by poetry, use the following:

$ poetry add public-test

If you’re working on a project managed by pipenv, use the following:

$ pipenv install public-test

After that, you should be able to import the library in your Python code:

from public_test import answer
print(answer)

Development

This library itself is managed by poetry. Read the docs for basic usage. You can run tests like this:

$ poetry run pytest

To release a new version of the library, follow these steps:

  1. Be sure to be on the master Git branch.

  2. Decide whether your changes are breaking, improvement, or a bug fix. Use the poetry’s version command to raise the version number.

  3. Read the new number from the poetry’s output and commit the change with git commit -am "release vX.Y.Z".

  4. Tag the commit with git tag vX.Y.Z

  5. Release a new version by pushing it all to GitHub: git push origin master --tags

The CI automatically builds the package and publishes it to the PyPI. New releases get listed at tags. If you like your colleagues, for each release click on Edit tag and write a title and description (changelog).

Automatic Releases

For the CI to be able to publish new releases to PyPI, a PYPI_TOKEN environment variable first needs to be set in the CircleCI project settings:

  1. Read the docs about PyPI tokens and CircleCI project environment variables.

  2. Generate a token at your PyPI account settings. Copy the token and treat it as a secret.

  3. Go to CircleCI project settings, section Environment Variables, and add a new one called PYPI_TOKEN. Paste the token as a value.

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

public-test-0.1.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

public_test-0.1.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

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