Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Language Model Challenge (LM Challenge)
[![Build Status](https://travis-ci.com/Microsoft/LMChallenge.svg?token=PsuQKRDL8Qs6yfLsqpTp&branch=master)](https://travis-ci.com/Microsoft/LMChallenge)

_A library & tools to evaluate predictive language models._ This is a guide for users of LM Challenge; you may also want to see:

Expand Down
72 changes: 61 additions & 11 deletions doc/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,69 @@ For quicker tests, while developing, try `./scripts/run test`.

## Publishing

### Configure gpg for signing the release

- Install [gpg](https://gnupg.org) (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:
```bash
gpg --allow-secret-key-import --import private.key
```
- Ensure the key has been imported:
```bash
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`

### Configure PyPi access

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

```bash
python3 -m pip install --user twine
```

### Publish a new release

1. (optionally) update requirements `./scripts/run -i base build --no-cache && ./scripts/run -i base refreeze`
2. run the pre-publish checks `./scripts/run check`
3. check that you're happy with `version.txt`
4. `python3 setup.py sdist upload -r pypi` (you must first set up pypi in `~/.pypirc`, as below & provide GPG credentials with `gpg --import`)
4. `rm -rf dist || true` to cleanup previously created artefacts
5. `python3 setup.py sdist` to package a new release
6. `twine upload --sign --identity "swiftkey-deep@" -r testpypi dist/*` to upload the release to TEST PyPi server
7. Check the new release on test.pypi.org
8. You can download release files and verify the signature via
```
[distutils]
index-servers =
pypi

[pypi]
repository: https://upload.pypi.org/legacy/
username: USERNAME
password: PASSWORD
gpg --verify lmchallenge-$(cat version.txt).tar.gz.asc lmchallenge-$(cat version.txt).tar.gz
```
5. `git push origin HEAD:refs/tags/$(cat version.txt)`
6. update, commit & push `version.txt`
9. `twine upload --sign --identity "swiftkey-deep@" -r pypi dist/*` to upload the release to MAIN PyPi server at https://pypi.org
9. `git push origin HEAD:refs/tags/$(cat version.txt)` to push the new release tag to Github
10. Go to Github and create a release for the tag you've just pushed
11. update, commit & push `version.txt` to start a new version
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ exclude=build,
[metadata]
description-file=README.md

[upload]
sign=true
identity=swiftkey-deep@service.microsoft.com
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
description='LM Challenge'
' - A library & tools to evaluate predictive language models.',
long_description=readme,
long_description_content_type="text/markdown",

url='https://github.com/Microsoft/LMChallenge',
author='Microsoft Corporation',
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1
5.2