Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Init] Initial works to split the json schema widget into a package. #1

Merged
merged 27 commits into from
Mar 3, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e741c91
package files
auvipy Apr 16, 2018
48f360f
app skeletons with widget scrapeed andd static files from netjsonconfig
auvipy Apr 16, 2018
4d6a921
test files
auvipy Apr 16, 2018
609b704
updated tox for django 2.1 alpha1
auvipy May 23, 2018
1da4b72
added basic travis config
auvipy May 23, 2018
354a1f8
updated django version
auvipy Aug 27, 2018
56f8c08
small updates
auvipy Aug 27, 2018
6f2a9bf
reviews addressed
auvipy Aug 28, 2018
47b2f38
reviews addressed
auvipy Aug 28, 2018
5948f95
reviews addressed
auvipy Aug 28, 2018
50f7188
addressed review comments
auvipy Sep 15, 2018
9984962
django 2.1 related changes in widget rendering
auvipy Nov 1, 2018
9371476
[django-jsonschema-widget] renamed package name as per convention of …
auvipy Nov 21, 2018
7b0b3b0
added isort config on setup.cfg
auvipy Nov 21, 2018
d4ce4fc
renamed requirements files
auvipy Nov 21, 2018
486a6b8
moved manage.py inside tests dir
auvipy Nov 21, 2018
5bd1f03
cleanups
auvipy Nov 21, 2018
2ce816e
modified travis and tox configs
auvipy Nov 21, 2018
c71844f
added jslinrc config
auvipy Nov 22, 2018
2cd6ceb
removed un needed models
auvipy Dec 11, 2018
322ef46
modified travis and test requirments
auvipy Dec 11, 2018
18cfe01
modified travis
auvipy Dec 11, 2018
c644b65
django-json_schema app to settings and remove model import in test
auvipy Dec 11, 2018
d3e737d
shell syntax
auvipy Dec 11, 2018
9d131a7
shell syntax
auvipy Dec 11, 2018
beb92b1
fix typo in readme
auvipy Mar 3, 2019
b7893b6
fix typo in installation doc
auvipy Mar 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
=======
Credits
=======

Development Lead
----------------

* Federico Capoano <f.capoano@cineca.it>
auvipy marked this conversation as resolved.
Show resolved Hide resolved

Contributors
------------

None yet. Why not be the first?
112 changes: 112 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
============
Contributing
============

Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions
----------------------

Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/openwisp/django-jsonschema-widget/issues.

If you are reporting a bug, please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

Fix Bugs
~~~~~~~~

Look through the GitHub issues for bugs. Anything tagged with "bug"
is open to whoever wants to implement it.

Implement Features
~~~~~~~~~~~~~~~~~~

Look through the GitHub issues for features. Anything tagged with "feature"
is open to whoever wants to implement it.

Write Documentation
~~~~~~~~~~~~~~~~~~~

django-jsonschema-widget could always use more documentation, whether as part of the
official django-jsonschema-widget docs, in docstrings, or even on the web in blog posts,
articles, and such.

Submit Feedback
~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://github.com/openwisp/django-jsonschema-widget/issues.

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)

Get Started!
------------

Ready to contribute? Here's how to set up `django-jsonschema-widget` for local development.

1. Fork the `django-jsonschema-widget` repo on GitHub.
2. Clone your fork locally::

$ git clone git@github.com:your_name_here/django-jsonschema-widget.git

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::

$ mkvirtualenv django-jsonschema-widget
$ cd django-jsonschema-widget/
$ python setup.py develop

4. Create a branch for local development::

$ 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 flake8 and the
tests, including testing other Python versions with tox::

$ flake8 jsonschema_widget tests
$ python setup.py test
$ tox

To get flake8 and tox, just pip install them into your virtualenv.

6. Commit your changes and push your branch to GitHub::

$ 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.

Pull Request Guidelines
-----------------------

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.
3. The pull request should work for Python 2.6, 2.7, and 3.3, and for PyPy. Check
auvipy marked this conversation as resolved.
Show resolved Hide resolved
https://travis-ci.org/openwisp/django-jsonschema-widget/pull_requests
and make sure that the tests pass for all supported Python versions.

Tips
----

To run a subset of tests::

$ python -m unittest tests.test_jsonschema_widget
9 changes: 9 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:

History
-------

0.1.0 (2018-04-16)
++++++++++++++++++

* First release on PyPI.
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include AUTHORS.rst
include CONTRIBUTING.rst
include HISTORY.rst
include LICENSE
include README.rst
recursive-include jsonschema_widget *.html *.png *.gif *js *.css *jpg *jpeg *svg *py
59 changes: 59 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.PHONY: clean-pyc clean-build docs help
.DEFAULT_GOAL := help
define BROWSER_PYSCRIPT
import os, webbrowser, sys
try:
from urllib import pathname2url
except:
from urllib.request import pathname2url

webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
endef
export BROWSER_PYSCRIPT
BROWSER := python -c "$$BROWSER_PYSCRIPT"

help:
@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | sort | awk -F ':.*?## ' 'NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'

clean: clean-build clean-pyc

clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr *.egg-info

clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +

lint: ## check style with flake8
flake8 jsonschema_widget tests

test: ## run tests quickly with the default Python
python runtests.py tests

test-all: ## run tests on every Python version with tox
tox

coverage: ## check code coverage quickly with the default Python
coverage run --source jsonschema_widget runtests.py tests
coverage report -m
coverage html
open htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/django-jsonschema-widget.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ jsonschema_widget
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(BROWSER) docs/_build/html/index.html

release: clean ## package and upload a release
python setup.py sdist upload
python setup.py bdist_wheel upload

sdist: clean ## package
python setup.py sdist
ls -l dist
76 changes: 76 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
=============================
django-jsonschema-widget
=============================

.. image:: https://badge.fury.io/py/django-jsonschema-widget.svg
:target: https://badge.fury.io/py/django-jsonschema-widget

.. image:: https://travis-ci.org/openwisp/django-jsonschema-widget.svg?branch=master
:target: https://travis-ci.org/openwisp/django-jsonschema-widget

.. image:: https://codecov.io/gh/openwisp/django-jsonschema-widget/branch/master/graph/badge.svg
:target: https://codecov.io/gh/openwisp/django-jsonschema-widget

Configuration widget for embedded device.

Documentation
-------------

The full documentation is at https://django-jsonschema-widget.readthedocs.io.

Quickstart
----------

Install django-jsonschema-widget::

pip install django-jsonschema-widget

Add it to your `INSTALLED_APPS`:

.. code-block:: python

INSTALLED_APPS = (
...
'jsonschema_widget.apps.JsonschemaWidgetConfig',
...
)

Add django-jsonschema-widget's URL patterns:

.. code-block:: python

from jsonschema_widget import urls as jsonschema_widget_urls


urlpatterns = [
...
url(r'^', include(jsonschema_widget_urls)),
...
]

Features
--------

* TODO

Running Tests
-------------

Does the code actually work?

::

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Credits
-------

Tools used in rendering this package:

* Cookiecutter_
* `cookiecutter-djangopackage`_

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage