Skip to main content

Virtual Environment

Setup a virtual environment before executing any build/test/release opearations.

$ virtualenv --python=python3.6 venv
...
Installing setuptools, pip, wheel...
done.
$ . venv/bin/activate

Test

We use tox to run tests. After setting up a virtual environment, requirements and tox must be installed.

(venv) $ pip3 install -r requirements.txt
(venv) $ pip3 install tox
(venv) $ tox
...
  py36: commands succeeded
  linters: commands succeeded
  congratulations :)

Build a development package

To build a package for development purposes, do the following.

(venv) $ python3 setup.py sdist bdist_wheel
running sdist
running egg_info
...
adding 'titus_optimize-0.0.14+hlocal.g34f75d0.dirty.dist-info/METADATA'
adding 'titus_optimize-0.0.14+hlocal.g34f75d0.dirty.dist-info/WHEEL'
adding 'titus_optimize-0.0.14+hlocal.g34f75d0.dirty.dist-info/top_level.txt'
adding 'titus_optimize-0.0.14+hlocal.g34f75d0.dirty.dist-info/RECORD'
removing build/bdist.macosx-10.9-x86_64/wheel

The packages will be in the generated dist directory

(venv) $ ls dist
titus_optimize-0.0.14+hlocal.g34f75d0.dirty-py3-none-any.whl titus_optimize-0.0.14+hlocal.g34f75d0.dirty.tar.gz

Release

  1. Checkout the master branch

$ git checkout master
$ git pull
  1. Update the VERSION variabled in setup.py

$ git diff HEAD~1 setup.py
diff --git a/setup.py b/setup.py
index f1a9f38..3078372 100755
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ from setuptools import setup
 from setuptools.command.install import install


-VERSION = "0.1.4"
+VERSION = "0.1.5"

 def readme():
     """print long description"""
  1. Commit that change

$ git add setup.py
$ git commit -m "Release 0.1.5"
  1. Tag the commit with the same version in setup.py

$ git tag 0.1.5
  1. Push the commit to master

$ git push origin master
  1. Push the tags to master

$ git push --tags

This will kick off a CI job which will publish to pypi.

Metadata

Release files for titus-optimize 0.7.7

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

Source distribution (sdist)

Source distribution for titus-optimize 0.7.7
File Size Uploaded
titus_optimize-0.7.7.tar.gz 13.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for titus-optimize 0.7.7
File Interpreter ABI Platform
titus_optimize-0.7.7-py3-none-any.whl Python 3 none any Details

Total release size: 37.5 kB

Release files / titus_optimize-0.7.7.tar.gz

Download URL titus_optimize-0.7.7.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3ad9881a671419013aed025822fad3ce071cb012d3ce89f472827fc6d6df3680
BLAKE2b-256 checksum
How to use checksums
b14e15fe8f081c992f172189235e0efa06653909d746839fd11bf316f3d2008d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9

Release files / titus_optimize-0.7.7-py3-none-any.whl

Download URL titus_optimize-0.7.7-py3-none-any.whl
Size 23.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9a45f6aba7251ce38b5edf63073e7ddbf42e3582538e30eba455b0d1827875b
BLAKE2b-256 checksum
How to use checksums
4cdd14944276afd97dee414c86e889b9f46866ecc6dfae2a9561dd81c31a84d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.7.7 This release

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.2

1 release file

0.4.0

2 release files

0.3.4

2 release files

0.3.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

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