Skip to content

Commit bd82772

Browse files
committed
initial unmodified commit from PopResearch repo
0 parents  commit bd82772

File tree

14 files changed

+1567
-0
lines changed

14 files changed

+1567
-0
lines changed

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
exclude=.git,.pytest_cache,venv

.github/workflows/pythonpackage.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: python-tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
max-parallel: 4
11+
matrix:
12+
python-version: [2.7, 3.5, 3.6, 3.7]
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -r requirements.txt
24+
- name: Lint with flake8
25+
run: |
26+
pip install flake8
27+
# stop the build if there are Python syntax errors or undefined names
28+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
29+
# the GitHub editor is 127 chars wide
30+
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics
31+
- name: Test with pytest
32+
run: |
33+
pip install pytest
34+
pytest

.gitignore

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
db.sqlite3
58+
59+
# Flask stuff:
60+
instance/
61+
.webassets-cache
62+
63+
# Scrapy stuff:
64+
.scrapy
65+
66+
# Sphinx documentation
67+
docs/_build/
68+
69+
# PyBuilder
70+
target/
71+
72+
# Jupyter Notebook
73+
.ipynb_checkpoints
74+
75+
# pyenv
76+
.python-version
77+
78+
# celery beat schedule file
79+
celerybeat-schedule
80+
81+
# SageMath parsed files
82+
*.sage.py
83+
84+
# Environments
85+
.env
86+
.venv
87+
env/
88+
venv/
89+
ENV/
90+
env.bak/
91+
venv.bak/
92+
93+
# Spyder project settings
94+
.spyderproject
95+
.spyproject
96+
97+
# Rope project settings
98+
.ropeproject
99+
100+
# mkdocs documentation
101+
/site
102+
103+
# mypy
104+
.mypy_cache/

CONTRIBUTING.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
### Contributing to python-cmixapi-client
2+
3+
This is an InnerSource python project. It is the work of someone who thought it might benefit someone else in the company as well.
4+
5+
### Maintainers
6+
7+
This repository is maintained by
8+
9+
1. [Bradley Wogsland](@wogsland)
10+
11+
### Community Guidelines
12+
13+
This project follows the [Github Community Guidlines](https://help.github.com/en/github/site-policy/github-community-guidelines). Please feel free to contact the maintainers with any issues.
14+
15+
### Contributing Code
16+
17+
The best place to start is by looking at the [GitHub Issues](https://github.com/dynata/python-cmixapi-client/issues) to see what needs to be done. If you decide to take on a task make sure to comment on it so work isn't duplicated. A good PR completely resolves the associated issue, passes python linting, and includes test coverage for your new code. This Github repository is integrated with GitHub Actions, so a PR cannot be accepted that has merge conflicts, fails to pass linting or tests, or lowers the repository's test coverage. Additionally your PR should include a high level description of your work or reviewers will be peppering you with questions. Approval of the maintainer is required merge a PR into `dev`, which is where all PRs go.
18+
19+
### Linting
20+
21+
Linting software is strongly recommended to improve code quality and maintain readability in Python projects. Python's official linting package is called pycodestyle, but another useful linting package is called flake8. Flake8 runs three different linters on your code, including pycodestyle, and a package called PyFlakes that checks for things like unused imports.
22+
23+
Read more [here](http://flake8.pycqa.org/en/latest/)
24+
25+
To lint the files,
26+
27+
virtualenv venv
28+
. venv/bin/activate
29+
pip install flake8
30+
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics
31+
deactivate
32+
33+
### Testing
34+
35+
To run the tests,
36+
37+
virtualenv venv
38+
. venv/bin/activate
39+
pip install -r requirements.txt
40+
pytest tests
41+
deactivate
42+
43+
to run the tests for this project.
44+
45+
### Filing Issues
46+
47+
Please use the [GitHub Issues](https://github.com/dynata/python-cmixapi-client/issues/new) to file an issue.
48+
49+
Thats it.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Dynata
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# python-cmixapi-client
2+
3+
<a href="https://github.com/dynata/python-cmixapi-client"><img alt="GitHub Actions status" src="https://github.com/dynata/python-cmixapi-client/workflows/python-tests/badge.svg"></a>
4+
5+
A Python client library for the Dynata Cmix API.
6+
7+
## Setup
8+
9+
Something here
10+
11+
## Example Usage
12+
13+
Something here
14+
15+
## Supported API Functions
16+
17+
Something here
18+
19+
## Contributing
20+
21+
Information on [contributing](CONTRIBUTING.md).
22+
23+
## Testing
24+
25+
To run the tests,
26+
27+
virtualenv venv
28+
. venv/bin/activate
29+
pip install -r requirements.txt
30+
pytest
31+
deactivate
32+
33+
to run the tests for this project.

pycodestyle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[pycodestyle]
2+
ignore = E501,E722
3+
statistics = True

pytest.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[pytest]
2+
env=
3+
CMIX_USERNAME="test_username"
4+
CMIX_PASSWORD="test_password"

requirements.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
beautifulsoup4==4.6.1
2+
freezegun==0.3.9
3+
mock==2.0.0
4+
pytest==4.6.6
5+
pytest-runner==5.2
6+
requests==2.22.0
7+
responses==0.10.6
8+
xmlformatter==0.1.1

src/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)