This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
We recommend developing using Docker, although virtual env is also very good (these tools are useful to make sure that you're using a stable, reproducible, environment). The Python script ./scripts/run
is our main development tool which automates build & checking tasks.
Tests and general checks are currently are run with:
./scripts/run build
./scripts/run check
For quicker tests, while developing, try ./scripts/run test
.
Documentation may be built in the /site
folder using:
./scripts/run doc
-
Install gpg (e.g.
brew install gpg
on macOS) -
Obtain the private key for the release and its password (ask around)
-
Import the key into your keyring:
gpg --allow-secret-key-import --import private.key
-
Ensure the key has been imported:
gpg --list-keys
Expected output:
pub rsa2048 2017-10-06 [SC] EA7AC0CCA097C391C7AA61F109F7AFCBCB48AC15 uid [ unknown] SwiftKey DL&NLP <swiftkey-deep@service.microsoft.com> sub rsa2048 2017-10-06 [E]
The key fingerprint is
EA7A C0CC A097 C391 C7AA 61F1 09F7 AFCB CB48 AC15
In your ~/.pypirc
specify:
[distutils]
index-servers =
pypi
testpypi
[pypi]
repository: https://upload.pypi.org/legacy/
username: USERNAME
password: PASSWORD
[testpypi]
repository: https://test.pypi.org/legacy/
username: USERNAME
password: PASSWORD
Install twine
for the current user
python3 -m pip install --user twine
- (optionally) update requirements
./scripts/run -i base build --no-cache && ./scripts/run -i base refreeze
- run the pre-publish checks
./scripts/run check
- check that you're happy with
version.txt
rm -rf dist || true
to cleanup previously created artefactspython3 setup.py sdist
to package a new releasetwine upload --sign --identity "swiftkey-deep@" -r testpypi dist/*
to upload the release to TEST PyPi server- Check the new release on test.pypi.org
- You can download release files and verify the signature via
gpg --verify lmchallenge-$(cat version.txt).tar.gz.asc lmchallenge-$(cat version.txt).tar.gz
twine upload --sign --identity "swiftkey-deep@" -r pypi dist/*
to upload the release to MAIN PyPi server at https://pypi.orggit push origin HEAD:refs/tags/$(cat version.txt)
to push the new release tag to Github- Go to Github and create a release for the tag you've just pushed
- update, commit & push
version.txt
to start a new version