@@ -16,12 +16,30 @@ this project. If you use this package within your own software as is but don't p
1616 location on your system, which helps keep you out of dependency hell. You can exit the
1717 environment using ` $ deactivate ` .
1818
19- * [ tox] ( https://testrun.org/tox/ ) : a testing automation tool that can load many Python versions.
20- This tool allows the project to test against all the compatible versions of Python by leveraging
21- virtualenv and describing the tasks in a metadata file.
19+ * [ act] ( https://github.com/nektos/act ) : a tool for running Github Actions locally. This tool allows
20+ developers to easily replicate the same Continuous Integration pipelines we use for code validation.
2221
2322## Tasks
2423
24+ ## Setup
25+
26+ We currently recommend setting up a development environment using ` virtualenv ` and installing dependencies
27+ with ` pip ` . While the Python Packaging Authority recommends ` Pipenv ` to manage dependencies, ` Pipenv ` does
28+ not install the OpenTok library correctly from source at this time.
29+
30+ We recommend setting up a Python 3.5 or higher ` virtualenv ` environment. This allows you to isolate dependencies
31+ for work on the OpenTok library without interfering with any other projects or installations on your system.
32+
33+ $ virtualenv env
34+ $ source env/bin/activate
35+ $ pip install -r requirements.txt -r test_requirements.txt
36+
37+ Some IDEs, like Visual Studio Code, will automatically detect the ` virtualenv ` and use it.
38+
39+ When you are done, you can leave the ` virtualenv ` by deactivating it:
40+
41+ $ deactivate
42+
2543### Building
2644
2745Building isn't necessarily required for a python package, but it is possible. By running the command
@@ -32,10 +50,19 @@ other script in your environment, and continue to update and you make changes.
3250
3351### Testing
3452
35- This project's tests are kicked off by tox. The ` tox.ini ` file describes the automation. In
36- a nutshell, it selects a Python version, installs test dependencies stored in
37- ` test_requirements.txt ` , and then runs ` nosetests ` . [ Nose] ( https://nose.readthedocs.org ) is the
38- actual test runner. All of this can be ran using the following command: ` $ tox `
53+ This project's tests are built using the ` unittest ` [ `Nose'] ( https://nose.readthedocs.org ) modules.
54+ To run the unit tests, install the core as well as development dependencies inside your ` virtualenv ` :
55+
56+ $ pip install -r requirements.txt -r test_requirements.txt
57+
58+ You can manually run the test suite for your version of python with:
59+
60+ $ nosetests
61+
62+ If you would like to run the test suite against a variety of Python versions, we recommend installing
63+ ` act ` and running out Github Action "test" workflow:
64+
65+ $ act --quiet
3966
4067### Generating Documentation
4168
@@ -45,19 +72,28 @@ actual test runner. All of this can be ran using the following command: `$ tox`
4572
4673In order to create a release, the following should be completed in order.
4774
48- 1 . Ensure all tests are passing (` tox ` ) and that there is enough test coverage.
75+ #### Prep the release
76+
77+ 1 . Ensure all tests are passing (` act ` ) and that there is enough test coverage.
49781 . Make sure you are on the ` master ` branch of the repository, with all changes merged/committed already.
50- 1 . Update the version number in the source code (` opentok/version.py ` ) and the README. See [ Versioning] ( #versioning ) for
79+ 1 . Create a new branch named ` release-x.y.z ` , with the release version number
80+ 1 . Update the version number with ` bumpversion ` . See [ Versioning] ( #versioning ) for
5181 information about selecting an appropriate version number.
52821 . Commit the version number change with the message ("Update to version v.x.x.x"), substituting the new version number.
83+ 1 . Create a new pull request with this branch
84+
85+ #### Once PR is merged into ` master `
86+ 1 . Make sure you are on the ` master ` branch of the repository
87+ 1 . Run ` git pull --rebase origin master ` to make sure your local code is up-to-date
53881 . Create a git tag: ` git tag -a vx.y.z -m "Release vx.y.z" `
89+ 1 . Run ` git push origin vx.y.z ` to push the tag to Github
54901 . Ensure you have permission to update the ` opentok ` package on PyPI: < https://pypi.python.org/pypi/opentok > .
55- 1 . Run ` python setup.py sdist upload ` , which will build and upload the package to PyPI.
56- 1 . Change the version number for future development by adding "a1", then make another commit with the message
57- "Beginning development on next version".
58- 1 . Push the changes to the main repository ( ` git push origin master ` ).
59- 1 . Upload the ` dist/ opentok-x.y.z.tar.gz ` file to the
60- [ Github Releases ] ( https://github.com/opentok/opentok-python-sdk/releases ) page with a description and release notes.
91+ 1 . Run the deploy scripts:
92+ 1 . ` make clean `
93+ 1 . ` make dist `
94+ 1 . ` make release `
95+ 1 . Create a new release on the [ Github Releases ] ( https://github.com/ opentok/opentok-python-sdk/releases ) page,
96+ and attach the files in ` dist/ ` to the release
6197
6298## Workflow
6399
@@ -73,10 +109,6 @@ from 1.
73109### Branches
74110
75111* ` master ` - the main development branch.
76- * ` feat.foo ` - feature branches. these are used for longer running tasks that cannot be accomplished in one commit.
77- once merged into master, these branches should be deleted.
78- * ` vx.x.x ` - if development for a future version/milestone has begun while master is working towards a sooner
79- release, this is the naming scheme for that branch. once merged into master, these branches should be deleted.
80112
81113### Tags
82114
0 commit comments