Skip to content

Commit 947b5a8

Browse files
authored
Merge branch 'v3' into master
2 parents 634a3c0 + f33223d commit 947b5a8

File tree

111 files changed

+4514
-1481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+4514
-1481
lines changed

.github/stale.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 120
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 30
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
- 🐛bug
10+
- 📖 documentation
11+
- help wanted
12+
- ✨enhancement
13+
# Label to use when marking an issue as stale
14+
staleLabel: wontfix
15+
# Comment to post when marking an issue as stale. Set to `false` to disable
16+
markComment: >
17+
This issue has been automatically marked as stale because it has not had
18+
recent activity. It will be closed if no further activity occurs. Thank you
19+
for your contributions.
20+
# Comment to post when closing a stale issue. Set to `false` to disable
21+
closeComment: false

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,5 @@ Session.vim
7878
*~
7979
# auto-generated tag files
8080
tags
81+
.tox/
82+
.pytest_cache/

.travis.yml

Lines changed: 62 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,68 @@
11
language: python
2-
sudo: false
3-
python:
4-
- 2.7
5-
- 3.4
6-
- 3.5
7-
- 3.6
2+
cache: pip
3+
dist: xenial
4+
85
install:
9-
- |
10-
if [ "$TEST_TYPE" = build ]; then
11-
pip install -e .[test]
12-
pip install psycopg2 # Required for Django postgres fields testing
13-
pip install django==$DJANGO_VERSION
14-
python setup.py develop
15-
elif [ "$TEST_TYPE" = lint ]; then
16-
pip install flake8
17-
fi
6+
- pip install tox tox-travis
7+
188
script:
19-
- |
20-
if [ "$TEST_TYPE" = lint ]; then
21-
echo "Checking Python code lint."
22-
flake8 graphene_django
23-
exit
24-
elif [ "$TEST_TYPE" = build ]; then
25-
py.test --cov=graphene_django graphene_django examples
26-
fi
9+
- tox
10+
2711
after_success:
28-
- |
29-
if [ "$TEST_TYPE" = build ]; then
30-
coveralls
31-
fi
32-
env:
33-
matrix:
34-
- TEST_TYPE=build DJANGO_VERSION=1.11
35-
matrix:
12+
- pip install coveralls
13+
- coveralls
14+
15+
stages:
16+
- test
17+
- name: deploy
18+
if: tag IS present
19+
20+
jobs:
3621
fast_finish: true
22+
23+
allow_failures:
24+
- env: DJANGO=master
25+
3726
include:
38-
- python: '3.4'
39-
env: TEST_TYPE=build DJANGO_VERSION=2.0
40-
- python: '3.5'
41-
env: TEST_TYPE=build DJANGO_VERSION=2.0
42-
- python: '3.6'
43-
env: TEST_TYPE=build DJANGO_VERSION=2.0
44-
- python: '3.5'
45-
env: TEST_TYPE=build DJANGO_VERSION=2.1
46-
- python: '3.6'
47-
env: TEST_TYPE=build DJANGO_VERSION=2.1
48-
- python: '2.7'
49-
env: TEST_TYPE=lint
50-
- python: '3.6'
51-
env: TEST_TYPE=lint
52-
deploy:
53-
provider: pypi
54-
user: syrusakbary
55-
on:
56-
tags: true
57-
password:
58-
secure: kymIFCEPUbkgRqe2NAXkWfxMmGRfWvWBOP6LIXdVdkOOkm91fU7bndPGrAjos+/7gN0Org609ZmHSlVXNMJUWcsL2or/x5LcADJ4cZDe+79qynuoRb9xs1Ri4O4SBAuVMZxuVJvs8oUzT2R11ql5vASSMtXgbX+ZDGpmPRVZStkCuXgOc4LBhbPKyl3OFy7UQFPgAEmy3Yjh4ZSKzlXheK+S6mmr60+DCIjpaA0BWPxYK9FUE0qm7JJbHLUbwsUP/QMp5MmGjwFisXCNsIe686B7QKRaiOw62eJc2R7He8AuEC8T9OM4kRwDlecSn8mMpkoSB7QWtlJ+6XdLrJFPNvtrOfgfzS9/96Qrw9WlOslk68hMlhJeRb0s2YUD8tiV3UUkvbL1mfFoS4SI9U+rojS55KhUEJWHg1w7DjoOPoZmaIL2ChRupmvrFYNAGae1cxwG3Urh+t3wYlN3gpKsRDe5GOT7Wm2tr0ad3McCpDGUwSChX59BAJXe/MoLxkKScTrMyR8yMxHOF0b4zpVn5l7xB/o2Ik4zavx5q/0rGBMK2D+5d+gpQogKShoquTPsZUwO7sB5hYeH2hqGqpeGzZtb76E2zZYd18pJ0FsBudm5+KWjYdZ+vbtGrLxdTXJ1EEtzVXm0lscykTpqUucbXSa51dhStJvW2xEEz6p3rHo=
59-
distributions: "sdist bdist_wheel"
27+
- python: 3.6
28+
env: DJANGO=1.11
29+
- python: 3.6
30+
env: DJANGO=2.2
31+
- python: 3.6
32+
env: DJANGO=3.0
33+
- python: 3.6
34+
env: DJANGO=master
35+
36+
- python: 3.7
37+
env: DJANGO=1.11
38+
- python: 3.7
39+
env: DJANGO=2.2
40+
- python: 3.7
41+
env: DJANGO=3.0
42+
- python: 3.7
43+
env: DJANGO=master
44+
45+
- python: 3.8
46+
env: DJANGO=1.11
47+
- python: 3.8
48+
env: DJANGO=2.2
49+
- python: 3.8
50+
env: DJANGO=3.0
51+
- python: 3.8
52+
env: DJANGO=master
53+
54+
- python: 3.8
55+
env: TOXENV=black,flake8
56+
57+
- stage: deploy
58+
script: skip
59+
python: 3.8
60+
after_success: true
61+
deploy:
62+
provider: pypi
63+
user: syrusakbary
64+
on:
65+
tags: true
66+
password:
67+
secure: kymIFCEPUbkgRqe2NAXkWfxMmGRfWvWBOP6LIXdVdkOOkm91fU7bndPGrAjos+/7gN0Org609ZmHSlVXNMJUWcsL2or/x5LcADJ4cZDe+79qynuoRb9xs1Ri4O4SBAuVMZxuVJvs8oUzT2R11ql5vASSMtXgbX+ZDGpmPRVZStkCuXgOc4LBhbPKyl3OFy7UQFPgAEmy3Yjh4ZSKzlXheK+S6mmr60+DCIjpaA0BWPxYK9FUE0qm7JJbHLUbwsUP/QMp5MmGjwFisXCNsIe686B7QKRaiOw62eJc2R7He8AuEC8T9OM4kRwDlecSn8mMpkoSB7QWtlJ+6XdLrJFPNvtrOfgfzS9/96Qrw9WlOslk68hMlhJeRb0s2YUD8tiV3UUkvbL1mfFoS4SI9U+rojS55KhUEJWHg1w7DjoOPoZmaIL2ChRupmvrFYNAGae1cxwG3Urh+t3wYlN3gpKsRDe5GOT7Wm2tr0ad3McCpDGUwSChX59BAJXe/MoLxkKScTrMyR8yMxHOF0b4zpVn5l7xB/o2Ik4zavx5q/0rGBMK2D+5d+gpQogKShoquTPsZUwO7sB5hYeH2hqGqpeGzZtb76E2zZYd18pJ0FsBudm5+KWjYdZ+vbtGrLxdTXJ1EEtzVXm0lscykTpqUucbXSa51dhStJvW2xEEz6p3rHo=
68+
distributions: "sdist bdist_wheel"

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at me@syrusakbary.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Contributing
2+
3+
Thanks for helping to make graphene-django great!
4+
5+
We welcome all kinds of contributions:
6+
7+
- Bug fixes
8+
- Documentation improvements
9+
- New features
10+
- Refactoring & tidying
11+
12+
13+
## Getting started
14+
15+
If you have a specific contribution in mind, be sure to check the [issues](https://github.com/graphql-python/graphene-django/issues) and [projects](https://github.com/graphql-python/graphene-django/projects) in progress - someone could already be working on something similar and you can help out.
16+
17+
18+
## Project setup
19+
20+
After cloning this repo, ensure dependencies are installed by running:
21+
22+
```sh
23+
make dev-setup
24+
```
25+
26+
## Running tests
27+
28+
After developing, the full test suite can be evaluated by running:
29+
30+
```sh
31+
make tests
32+
```
33+
34+
## Opening Pull Requests
35+
36+
Please fork the project and open a pull request against the master branch.
37+
38+
This will trigger a series of test and lint checks.
39+
40+
We advise that you format and run lint locally before doing this to save time:
41+
42+
```sh
43+
make format
44+
make lint
45+
```
46+
47+
## Documentation
48+
49+
The [documentation](http://docs.graphene-python.org/projects/django/en/latest/) is generated using the excellent [Sphinx](http://www.sphinx-doc.org/) and a custom theme.
50+
51+
The documentation dependencies are installed by running:
52+
53+
```sh
54+
cd docs
55+
pip install -r requirements.txt
56+
```
57+
58+
Then to produce a HTML version of the documentation:
59+
60+
```sh
61+
make html
62+
```

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include README.md LICENSE
22
recursive-include graphene_django/templates *
3+
recursive-include graphene_django/static *

Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.PHONY: dev-setup ## Install development dependencies
2+
dev-setup:
3+
pip install -e ".[dev]"
4+
5+
.PHONY: install-dev
6+
install-dev: dev-setup # Alias install-dev -> dev-setup
7+
8+
.PHONY: tests
9+
tests:
10+
py.test graphene_django --cov=graphene_django -vv
11+
12+
.PHONY: test
13+
test: tests # Alias test -> tests
14+
15+
.PHONY: format
16+
format:
17+
black --exclude "/migrations/" graphene_django examples setup.py
18+
19+
.PHONY: lint
20+
lint:
21+
flake8 graphene_django examples
22+
23+
.PHONY: docs ## Generate docs
24+
docs: dev-setup
25+
cd docs && make install && make html
26+
27+
.PHONY: docs-live ## Generate docs with live reloading
28+
docs-live: dev-setup
29+
cd docs && make install && make livehtml

0 commit comments

Comments
 (0)