Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
JackMorganNZ committed May 22, 2021
2 parents d7630cd + 761bc59 commit 79f4135
Show file tree
Hide file tree
Showing 117 changed files with 876 additions and 857 deletions.
30 changes: 0 additions & 30 deletions .codeclimate.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
46 changes: 46 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ develop, master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-20.04
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
25 changes: 25 additions & 0 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Documentation

on: [push]

jobs:
build-documentation:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python 3
uses: actions/setup-python@v2.2.2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Build documentation
run: sphinx-build -a -W -E -b html docs/source/ docs/build/
40 changes: 40 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish to PyPI

on: push

jobs:
build-and-publish:
name: Build and publish to PyPI
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python 3
uses: actions/setup-python@v2.2.2
with:
python-version: '3.x'

- name: Install build dependencies
run: |
pip install -U setuptools wheel build
- name: Build distribution files
run: |
python -m build .
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true

- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test suite

on: [push]

jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.2.2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Lint with flake8
run: |
flake8 . --show-source --statistics
- name: Test suite
run: |
coverage run --rcfile=.coveragerc -m verto.tests.start_tests
coverage xml -i
coverage report -m --skip-covered
- name: Code Coverage
uses: codecov/codecov-action@v1.5.0
3 changes: 0 additions & 3 deletions .pyup.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ output to stdout:
from verto import Verto
text = open('example.md', 'r')
text = open('example.md', 'r').read()
converter = Verto()
result = converter.convert(text)
Expand Down
35 changes: 35 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,41 @@
Changelog
#######################################

1.0.0
=======================================

This is the first official release of Verto, after over four years of use in production systems.
There are several changes in this release that may break existing pipelines and require changes.

- Add new :doc:`processors/external-link` processor that modifies hyperlinks to open in a new tab.
- Modify :doc:`processors/scratch` and :doc:`processors/scratch-inline` processors to set Scratch code to be rendered by a JavaScript library.

- This replaces the previous method of creating images.
- The ``split`` option has been removed as it is no longer relevant to the new method.
- The ``random`` option has been removed to improve consistency in rendered material.

- Randomising the blocks can be achieved after rendering the code.

- Use GitHub Actions for automated builds and publishing to PyPI.
- Use new declarative setup.cfg file for packaging configuration.
- Removed CodeClimate configuration file.
- Use GitHub Actions for automated testing (instead of Travis CI) and code analysis.
- Switch dependency tracking from PyUp to Dependabot.
- Move changelog outside of documentation to homepage for inclusion on PyPI homepage.
- Correct argument ``custom_settings`` to ``settings``.
- Update images for Scratch examples to use Scratch 3.
- Update regular expression strings in Python code to use raw strings.
- Updated authors to state UCCSER as primary owner.
- Dependency updates:

- Update ``setuptools`` from 41.0.1 to 56.2.0.
- Update ``sphinx`` from 1.8.1 to 4.0.2.
- Update ``sphinx_rtd_theme`` from 0.4.3 to 0.5.2.
- Update ``coverage`` from 4.5.3 to 5.5.
- Update ``flake8`` from 3.5.0 to 3.9.2.
- Update ``Jinja2`` from 2.10.1 to 3.0.1.
- Update ``python-slugify`` from 3.0.2 to 5.0.2.

0.11.0
=======================================

Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from verto import __version__


# -- General configuration ------------------------------------------------
# -- General configuration ------------------------------------------------``

# If your documentation needs a minimal Sphinx version, state it here.
#
Expand All @@ -49,7 +49,7 @@
# General information about the project.
project = 'Verto'
copyright = '2017 University of Canterbury Computer Science Education Research Group'
author = 'Hayley vas Waas, Jack Morgan, Hayden Jackson, Jordan Griffiths'
author = 'UCCSER: Hayley vas Waas, Jack Morgan, Hayden Jackson, Jordan Griffiths'

# 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 @@ -131,7 +131,7 @@
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'Verto.tex', 'Verto Documentation',
'Hayley vas Waas, Jack Morgan', 'manual'),
'UCCSER', 'manual'),
]


Expand Down
51 changes: 2 additions & 49 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -380,53 +380,8 @@ For example:
Creating a release
=======================================

This is our current process for creating and publishing a Verto release. This
can only be performed by repository administrators.

1. `Create a release branch`_. Checkout to this branch.

.. code-block:: bash
$ git checkout develop
$ git pull
$ git checkout -b release/0.7.0
2. Update the version number [1]_ within ``verto/__init__.py``.
3. Check test suite for errors, and fix any issues that arise, or `log an issue`_.
4. Detail the changes in ``docs/source/changelog.rst``.
5. `Complete the release branch`_. Be sure to tag the release with the version number for creating the release on GitHub.

.. code-block:: bash
$ git checkout master
$ git pull
$ git merge --no-ff release/0.7.0
$ git tag -a 0.7.0
$ git push
$ git push --tags
6. `Upload the release to PyPI`_

.. code-block:: bash
$ rm -r dist/
$ python3 -m pip install --user --upgrade setuptools wheel
$ python3 setup.py sdist bdist_wheel
$ python3 -m pip install --user --upgrade twine
$ twine upload dist/*
7. Merge the release into develop

.. code-block:: bash
$ git checkout develop
$ git pull
$ git merge --no-ff release/0.7.0
8. Create the release on `GitHub`_ on the tagged commit.
9. Delete the release branch.

Releases are built and published automatically to PyPI by a GitHub actions workflow.
See ``.github/workflows/publish-to-pypi.yml``.

Other notes
=======================================
Expand All @@ -442,8 +397,6 @@ Why are all dependency versions pinned?
Yes, this is not considered the best practice by the Python Software Foundation in their `packaging guide <https://packaging.python.org/discussions/install-requires-vs-requirements/#install-requires>`_.
However pinning dependencies ensure we control over each Verto release, following the logic of `Vincent Driessen <https://nvie.com/posts/pin-your-packages/>`_.

.. [1] We follow `Semantic Versioning <http://semver.org/>`_ for our numbering system. The number is used by ``setup.py`` to tell PyPI which version is being uploaded or ``pip`` which version is installed, and also used during the documentation build to number the version of Verto it was built from.
.. _CS Unplugged: https://github.com/uccser/cs-unplugged/
.. _CS Field Guide: https://github.com/uccser/cs-field-guide/
.. _here: https://github.com/uccser/verto
Expand Down
Binary file modified docs/source/images/scratch_blocks_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/scratch_inline_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/processors/blockquote.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Optional Tag Parameters

- ``footer`` - Boolean flag to indicate whether the blockquote contains a footer.

- If given as ``true``, then the last line should start with ``- `` to show it's the footer.
- If given as ``true``, then the last line should start with a dash (``-``) followed by a space to show it's the footer.

- ``source`` - Sets the ``cite`` parameter of the ``blockquote`` element.

Expand Down
Loading

0 comments on commit 79f4135

Please sign in to comment.