Skip to content

Commit

Permalink
Merge pull request #24 from infogrid-io/update
Browse files Browse the repository at this point in the history
Fix deprecation warnings, small clean-ups
  • Loading branch information
jorgenader authored Jan 26, 2023
2 parents 5818ef5 + 2367be1 commit f6f85cd
Show file tree
Hide file tree
Showing 14 changed files with 248 additions and 302 deletions.
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ source =

omit =
*/migrations/*
setup.py
example

[html]
Expand Down
24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,27 +80,27 @@ Ready to contribute? Here's how to set up `tg-react` for local development.
poetry install
```

4. Create a branch for local development::
5. Create a branch for local development::
```shell
git checkout -b name-of-your-bugfix-or-feature
```
Now you can make your changes locally.

5. When you're done making changes, check that your changes pass linters and the tests, including testing other Python versions with tox:
6. When you're done making changes, check that your changes pass linters and the tests, including testing other Python versions with tox:
```shell
poetry run lint
poetry run test
poetry run test-all
poetry run make lint
poetry run make test
poetry run make test-all
```
6. Commit your changes and push your branch to GitHub::
7. Commit your changes and push your branch to GitHub::
```shell
git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature
```
7. Submit a pull request through the GitHub website.
8. Submit a pull request through the GitHub website.
## Pull Request Guidelines
Expand All @@ -109,7 +109,7 @@ Before you submit a pull request, check that it meets these guidelines:
1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst. You should also update the documentation
feature to the list in README.md. You should also update the documentation
source files via::
```shell
poetry run make docs
Expand All @@ -120,9 +120,9 @@ Before you submit a pull request, check that it meets these guidelines:
poetry run make update-messages
```

4. The pull request should work for Python 3.6, 3.7, 3.8 and 3.9. Check
https://travis-ci.org/thorgate/tg-react/pull_requests
and make sure that the tests pass for all supported Python versions.
4. The pull request should work for Python 3.7, 3.8, 3.9 and 3.10. Check
https://github.com/thorgate/tg-react/actions and make sure that the tests
pass for all supported Python versions.

Tips
----
Expand All @@ -136,7 +136,7 @@ poetry run make test-all
To run a subset of tests:

```shell
poetry run py.test tests.test_tg_react
poetry run pytest tests.test_tg_react
```

Update documentation source files and generate it:
Expand Down
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help clean clean-build clean-pyc lint test test-all test-full coverage docs release sdist update-messages add-locale
.PHONY: help clean clean-build clean-pyc lint black test test-all test-full coverage docs update-messages add-locale

help:
@echo "clean-build - remove build artifacts"
Expand All @@ -9,8 +9,6 @@ help:
@echo "test-full - shorthand for test lint coverage"
@echo "coverage - check code coverage quickly with the default Python"
@echo "docs - generate Sphinx HTML documentation, including API docs"
@echo "release - package and upload a release"
@echo "sdist - package"
@echo "update-messages - Update translation files"
@echo "add-locale - Add a new translation locale"

Expand All @@ -33,15 +31,15 @@ black:
black demo dummy_settings.py tg_react

test:
py.test
pytest

test-all:
tox

test-full: test lint coverage

coverage:
py.test --cov-config .coveragerc --cov=tg_react --cov-report html --cov-report term-missing
pytest --cov-config .coveragerc --cov=tg_react --cov-report html --cov-report term-missing

docs:
mkdir -p docs/_static
Expand Down
1 change: 0 additions & 1 deletion demo/example/manage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
from __future__ import unicode_literals

import os
import sys
Expand Down
2 changes: 0 additions & 2 deletions demo/example/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

from django.http.response import HttpResponse
from django.urls import re_path, include

Expand Down
18 changes: 8 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
Expand Down Expand Up @@ -46,8 +44,8 @@
master_doc = 'index'

# General information about the project.
project = u'tg-react'
copyright = u'2015-present, Thorgate'
project = 'tg-react'
copyright = '2015-present, Thorgate'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -192,8 +190,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'tg-react.tex', u'tg-react Documentation',
u'Thorgate', 'manual'),
('index', 'tg-react.tex', 'tg-react Documentation',
'Thorgate', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -222,8 +220,8 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'tg-react', u'tg-react Documentation',
[u'Thorgate'], 1)
('index', 'tg-react', 'tg-react Documentation',
['Thorgate'], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -236,8 +234,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'tg-react', u'tg-react Documentation',
u'Thorgate', 'tg-react', 'One line description of project.',
('index', 'tg-react', 'tg-react Documentation',
'Thorgate', 'tg-react', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
Loading

0 comments on commit f6f85cd

Please sign in to comment.