Skip to content

[ci/qa] Maintenance, reformatted code, minor CI improvements #148

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

Merged
merged 7 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .coveragerc

This file was deleted.

6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ updates:
interval: "monthly"
commit-message:
prefix: "[deps] "
- package-ecosystem: "github-actions" # Check for GitHub Actions updates
directory: "/" # The root directory where the Ansible role is located
schedule:
interval: "monthly" # Check for updates weekly
commit-message:
prefix: "[ci] "
31 changes: 15 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Install Dependencies
id: deps
run: |
pip install -U "pip==20.2.4" setuptools wheel
pip install -U pip setuptools wheel
sudo npm install -g jslint
pip install -U -r requirements-test.txt
pip install -U -e .
Expand All @@ -50,26 +50,25 @@ jobs:
- name: Tests
if: ${{ !cancelled() && steps.deps.conclusion == 'success' }}
run: |
coverage run --source=django_x509 runtests.py
SAMPLE_APP=1 ./runtests.py --parallel --keepdb
coverage run runtests.py --parallel
SAMPLE_APP=1 coverage run ./runtests.py --parallel
coverage combine
coverage xml

- name: Upload Coverage
if: ${{ success() }}
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: python-${{ matrix.python-version }}-${{ matrix.django-version }}
COVERALLS_PARALLEL: true
uses: coverallsapp/github-action@v2
with:
parallel: true
format: cobertura
flag-name: python-${{ matrix.env.env }}
github-token: ${{ secrets.GITHUB_TOKEN }}

coveralls:
name: Finish Coveralls
needs: build
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage*
.cache
nosetests.xml
coverage.xml
Expand Down Expand Up @@ -68,4 +68,3 @@ Pipfile

# IDE specific files
.idea

155 changes: 81 additions & 74 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ Version 1.0.0 [2022-02-25]
Bugfixes
~~~~~~~~

- Fixed `bug in admin <https://github.com/openwisp/django-x509/issues/119>`_
for creating CA with blank ``key_length`` and ``digest`` fields
- Fixed `bug in admin
<https://github.com/openwisp/django-x509/issues/119>`_ for creating CA
with blank ``key_length`` and ``digest`` fields

Changes
~~~~~~~
Expand All @@ -51,23 +52,23 @@ Version 0.9.3 [2021-03-16]
--------------------------

- [deps] Updated pyopenssl range to allow 20.0.x
- [deps] Removed django-model-utils in favour of openwisp-utils
which centralizes several dependencies used by all the OpenWISP modules
- [deps] Removed django-model-utils in favour of openwisp-utils which
centralizes several dependencies used by all the OpenWISP modules
(including ``django-model-utils``)

Version 0.9.2 [2020-12-09]
--------------------------

- [deps] Pinned django-model-utils>=4.0.0,<4.1.0
- [deps] Pin cryptography to ~=3.2 because version 3.3
contains backward incompatible changes
- [deps] Pin cryptography to ~=3.2 because version 3.3 contains backward
incompatible changes

Version 0.9.1 [2020-11-13]
--------------------------

- [deps] Updated cryptography minimum version to 3.2 for security reasons
The version range has also been relaxed to avoid having to update it too often,
future versions up to but excluding 4.0 will be accepted
The version range has also been relaxed to avoid having to update it too
often, future versions up to but excluding 4.0 will be accepted
- [fix] Removed ``static()`` call from admin media
- [tests] Updated openwisp-utils[qa] to 0.7

Expand All @@ -88,15 +89,20 @@ Features
~~~~~~~~

- Added swappable models, improved extensibility
- Improved documentation on `how to extend django-x509 <https://github.com/openwisp/django-x509#extending-django-x509>`_
- Improved documentation on `how to extend django-x509
<https://github.com/openwisp/django-x509#extending-django-x509>`_

Changes
~~~~~~~

- **Breaking change**: systems using django-x509 as a library must set ``DJANGO_X509_CA_MODEL``
& ``DJANGO_X509_CERT_MODEL`` values in their settings.py when upgrading or an exception like the following one will be raised:
- **Breaking change**: systems using django-x509 as a library must set
``DJANGO_X509_CA_MODEL`` & ``DJANGO_X509_CERT_MODEL`` values in their
settings.py when upgrading or an exception like the following one will
be raised:

``django.core.exceptions.ImproperlyConfigured: Could not find
django_x509.Ca!``

``django.core.exceptions.ImproperlyConfigured: Could not find django_x509.Ca!``
- Added support for django 3.1
- Added support for cryptography 3.0.0

Expand Down Expand Up @@ -132,135 +138,136 @@ Version 0.6.0 [2020-01-15]
Version 0.5.1 [2019-12-23]
--------------------------

- [fix] Use ``self.pk`` instead of ``self.id`` to allow more
flexible override of primary key
- [fix] Use ``self.pk`` instead of ``self.id`` to allow more flexible
override of primary key
- Fixed jQuery init issue on django 2.2

Version 0.5.0 [2019-11-20]
--------------------------

* `#36 <https://github.com/openwisp/django-x509/issues/36>`_:
- `#36 <https://github.com/openwisp/django-x509/issues/36>`_:
[requirements] Added support for django 2.1
* `#44 <https://github.com/openwisp/django-x509/issues/44>`_:
[models] Improved error message format #44
* `#61 <https://github.com/openwisp/django-x509/pull/61>`_:
Bumped supported Django version to 2.2 and Python version to 3.7
* `#63 <https://github.com/openwisp/django-x509/pull/63>`_:
[bug] Load model after registration in apps
* Bumped cryptography version to 2.8.0, pyopenssl to 19.0.0
- `#44 <https://github.com/openwisp/django-x509/issues/44>`_: [models]
Improved error message format #44
- `#61 <https://github.com/openwisp/django-x509/pull/61>`_: Bumped
supported Django version to 2.2 and Python version to 3.7
- `#63 <https://github.com/openwisp/django-x509/pull/63>`_: [bug] Load
model after registration in apps
- Bumped cryptography version to 2.8.0, pyopenssl to 19.0.0

Version 0.4.1 [2018-09-05]
--------------------------

* [admin] Fixed UI bug that prevented changing Cert and CA
* [requirements] cryptography>=2.3.0,<2.4.0
* [requirements] pyopenssl>=17.5.0,<18.1.0
* `#41 <https://github.com/openwisp/django-x509/pull/41>`_:
[requirements] Added support for django 2.1
* [admin] Fixed involuntary permanent modification of field list
- [admin] Fixed UI bug that prevented changing Cert and CA
- [requirements] cryptography>=2.3.0,<2.4.0
- [requirements] pyopenssl>=17.5.0,<18.1.0
- `#41 <https://github.com/openwisp/django-x509/pull/41>`_: [requirements]
Added support for django 2.1
- [admin] Fixed involuntary permanent modification of field list

Version 0.4.0 [2018-02-19]
--------------------------

* `#24 <https://github.com/openwisp/django-x509/issues/24>`_:
[qa] Added django 2.0 & dropped django 1.10
* `#25 <https://github.com/openwisp/django-x509/issues/25>`_:
[admin] Automatically select ``certificate`` and ``private_key`` on click
* `#33 <https://github.com/openwisp/django-x509/issues/33>`_:
[models] Added ``organizational_unit_name`` in ``Cert`` and ``Ca``
- `#24 <https://github.com/openwisp/django-x509/issues/24>`_: [qa] Added
django 2.0 & dropped django 1.10
- `#25 <https://github.com/openwisp/django-x509/issues/25>`_: [admin]
Automatically select ``certificate`` and ``private_key`` on click
- `#33 <https://github.com/openwisp/django-x509/issues/33>`_: [models]
Added ``organizational_unit_name`` in ``Cert`` and ``Ca``

Version 0.3.4 [2017-12-20]
--------------------------

* [admin] Removed ``serial_number`` from certificate list
- [admin] Removed ``serial_number`` from certificate list

Version 0.3.3 [2017-12-20]
--------------------------

* [models] Reimplemented serial numbers as UUID integers
* [UX] Import vs New javascript switcher
- [models] Reimplemented serial numbers as UUID integers
- [UX] Import vs New javascript switcher

Version 0.3.2 [2017-12-06]
--------------------------

* [requirements] upgraded pyopenssl to 17.5.0 and cryptography to 2.2.0
* [models] Fixed uncaught exception when imported
PEM ``certificate`` or ``private_key`` is invalid
- [requirements] upgraded pyopenssl to 17.5.0 and cryptography to 2.2.0
- [models] Fixed uncaught exception when imported PEM ``certificate`` or
``private_key`` is invalid

Version 0.3.1 [2017-12-01]
--------------------------

* temporarily downgraded cryptography and pyopenssl versions
to avoid segmentation faults
- temporarily downgraded cryptography and pyopenssl versions to avoid
segmentation faults

Version 0.3.0 [2017-11-03]
--------------------------

* [models] Avoided possible double insertion in ``Base.save``
* [requirements] pyopenssl>=17.1.0,<17.4.0
* [admin] Fixed preformatted look of certificate and private-key fields
* [models] Allow importing certs with invalid country codes
* [models] Allow importing certificate with empty common name
* [tests] Updated data for import test to fix pyOpenSSL issue
* [models] Renamed ``organization`` field to ``organization_name``
- [models] Avoided possible double insertion in ``Base.save``
- [requirements] pyopenssl>=17.1.0,<17.4.0
- [admin] Fixed preformatted look of certificate and private-key fields
- [models] Allow importing certs with invalid country codes
- [models] Allow importing certificate with empty common name
- [tests] Updated data for import test to fix pyOpenSSL issue
- [models] Renamed ``organization`` field to ``organization_name``

Version 0.2.4 [2017-07-04]
--------------------------

* [models] added ``digest`` argument to ``CRL.export``
* [requirements] pyopenssl>=17.1.0,<17.2.0
- [models] added ``digest`` argument to ``CRL.export``
- [requirements] pyopenssl>=17.1.0,<17.2.0

Version 0.2.3 [2017-05-15]
--------------------------

* [migrations] Updated ``validity_start`` on ``Cert`` model
- [migrations] Updated ``validity_start`` on ``Cert`` model

Version 0.2.2 [2017-05-11]
--------------------------

* [models] Set ``validity_start`` to 1 day before the current date (at 00:00)
- [models] Set ``validity_start`` to 1 day before the current date (at
00:00)

Version 0.2.1 [2017-05-02]
--------------------------

* [django] added support for django 1.11
- [django] added support for django 1.11

Version 0.2.0 [2017-01-11]
--------------------------

* [models] improved reusability by providing abstract models
* [admin] improved reusability by providing abstract admin classes
* [views] provided a base view that can be reused by third party apps
* [docs] documented how to extend models and admin
* [docs] documented hard dependencies
- [models] improved reusability by providing abstract models
- [admin] improved reusability by providing abstract admin classes
- [views] provided a base view that can be reused by third party apps
- [docs] documented how to extend models and admin
- [docs] documented hard dependencies

Version 0.1.3 [2016-09-22]
--------------------------

* [model] avoid import error if any imported field is ``NULL``
* [admin] added ``serial_number`` to ``list_display`` in ``Cert`` admin
* [model] avoid exception if x509 subject attributes are empty
- [model] avoid import error if any imported field is ``NULL``
- [admin] added ``serial_number`` to ``list_display`` in ``Cert`` admin
- [model] avoid exception if x509 subject attributes are empty

Version 0.1.2 [2016-09-08]
--------------------------

* improved general ``verbose_name`` of the app
* added official compatibility with django 1.10
* [admin] show link to CA in cert admin
* [admin] added ``key_length`` and ``digest`` to available filters
- improved general ``verbose_name`` of the app
- added official compatibility with django 1.10
- [admin] show link to CA in cert admin
- [admin] added ``key_length`` and ``digest`` to available filters

Version 0.1.1 [2016-08-03]
--------------------------

* fixed x509 certificate version
* renamed ``public_key`` field to more appropiate ``certificate``
* show x509 text dump in admin when editing objects
- fixed x509 certificate version
- renamed ``public_key`` field to more appropiate ``certificate``
- show x509 text dump in admin when editing objects

Version 0.1 [2016-07-18]
------------------------

* CA and end entity certificate generation
* import existing certificates
* x509 extensions
* revocation
* CRL
- CA and end entity certificate generation
- import existing certificates
- x509 extensions
- revocation
- CRL
3 changes: 2 additions & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Please refer to the `OpenWISP Contribution Guidelines <http://openwisp.io/docs/developer/contributing.html>`_.
Please refer to the `OpenWISP Contribution Guidelines
<http://openwisp.io/docs/developer/contributing.html>`_.
Loading
Loading