Skip to content

Commit

Permalink
contributing docs (#91)
Browse files Browse the repository at this point in the history
* contributing docs

* publishing instructions

* remove a note about Visual Studio

* remove a note about Visual Studio
  • Loading branch information
SergeyKanzhelev committed Jun 4, 2018
1 parent 4a651a2 commit b6f8928
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 229 deletions.
16 changes: 15 additions & 1 deletion .vscode/settings.json
@@ -1,3 +1,17 @@
{
"python.pythonPath": "/usr/bin/python2.7"
"python.pythonPath": "/usr/bin/python2.7",
"python.unitTest.unittestEnabled": true,
"python.unitTest.unittestArgs": [
"-v",
"-s",
"test",
"-p",
"*test*.py"
],

// pythonVSCode extension
"python.linting.pylintEnabled": true,
"python.linting.flake8Enabled": false,
"python.linting.pep8Enabled": true,
"python.formatting.provider": "yapf"
}
17 changes: 17 additions & 0 deletions .vscode/tasks.json
@@ -0,0 +1,17 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "python setup.py sdist"
},
{
"label": "test",
"type": "shell",
"command": "python setup.py -v test"
}
]
}
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -2,10 +2,11 @@

## 0.11.5


## 0.11.4

- Schemas for all data types and context objects updated to the latest version.
- Add common properties argument to WSGIApplication initialization. Those common properties will be associated with telemetry produced by WSGIApplication.

## 0.11.3

- Changelog started from this version.
56 changes: 56 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,56 @@
# How to Contribute

If you're interested in contributing, take a look at the general [contributor's guide](https://github.com/Microsoft/ApplicationInsights-Home/blob/master/CONTRIBUTING.md) first.

## Build

Run `python setup.py sdist`

## Test

- Unit tests: `python setup.py test`
- Django tests: `django_tests/all_tests.sh`

Use `pip install -e <path>` to install it into test application for the testing purposes.

## Releasing new version

This is for repository maintainers only:

This package is published to https://pypi.python.org/pypi/applicationinsights. These are the steps to publish the package.

1. Merge `develop` to `master` via [pull request](https://github.com/Microsoft/ApplicationInsights-Python/compare/master...develop).
2. Tag `master`. Use [CHANGELOG.md](CHANGELOG.md) to get release description.
3. Travis should release a new version. For manual steps:
1. Clean up repo: `git clean -xfd`.
2. Make sure `wheel` is installed: `sudo pip install wheel`.
3. Make sure `twine` is installed: `sudo pip install twine`.
4. Create distributions `python setup.py bdist_wheel`.
5. Create `~/.pypirc` file with the following content
``` ini
[distutils]
index-servers=
pypi

[pypi]
username:AppInsightsSDK
password=<pwd here>
```
6. Test distributive. You can upload it to https://test.pypi.org/ using `twine upload --repository-url https://test.pypi.org/legacy/ dist/*`
7. Upload the package `twine upload dist/*`.
4. Update versions in `TelemetryChannel.py`, `CHANGELOG.md`, `conf.py` and `setup.py`.

## Contributing

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 repositories using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
2 changes: 0 additions & 2 deletions DESCRIPTION.rst
Expand Up @@ -8,8 +8,6 @@ Requirements

Python 2.7 and Python 3.4 are currently supported by this module.

For opening the project in Microsoft Visual Studio you will need `Python Tools for Visual Studio <http://pytools.codeplex.com/>`_.

Installation
------------

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 Microsoft
Copyright (c) 2018 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
@@ -1,8 +1,8 @@
include DESCRIPTION.rst
include README.md
include LICENSE.txt
include Microsoft.ApplicationInsights.pyproj
include Microsoft.ApplicationInsights.sln
include CHANGELOG.md
include CONTRIBUTING.md
# Include the test suite
recursive-include tests *
global-exclude *.pyc
165 changes: 0 additions & 165 deletions Microsoft.ApplicationInsights.pyproj

This file was deleted.

20 changes: 0 additions & 20 deletions Microsoft.ApplicationInsights.sln

This file was deleted.

38 changes: 1 addition & 37 deletions README.md
Expand Up @@ -10,8 +10,6 @@ This project extends the Application Insights API surface to support Python. [Ap

Python >=2.7 and Python >=3.4 are currently supported by this module.

For opening the project in Microsoft Visual Studio you will need [Python Tools for Visual Studio](http://pytools.codeplex.com/).

## Installation ##

To install the latest release you can use [pip](http://www.pip-installer.org/).
Expand Down Expand Up @@ -326,38 +324,4 @@ def hello_world():
# run the application
if __name__ == '__main__':
app.run()
```


## Publishing new version to pypi.python.org

This package is published to https://pypi.python.org/pypi/applicationinsights. These are the steps to publish the package.

1. Update the version in the following places:
* /applicationinsights/channel/TelemetryChannel.py
* conf.py
* setup.py

2. Create ~/.pypirc file with the following content
```
[distutils]
index-servers=
pypi
[pypi]
username:AppInsightsSDK
password=<pwd here>
```
3. Create distribution package:
```
python setup.py sdist
```

4. Install twine
```
sudo pip install twine
```

5. twine upload dist/*


```

0 comments on commit b6f8928

Please sign in to comment.