Skip to content

Commit

Permalink
Merge pull request #77 from sunpy/ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis authored Oct 10, 2020
2 parents 5b5e1b9 + 883cc96 commit 7b2a19a
Show file tree
Hide file tree
Showing 33 changed files with 573 additions and 559 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/timothycrosley/isort
rev: 5.5.1
rev: 5.6.1
hooks:
- id: isort
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

7 changes: 0 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
ABlog for Sphinx
================

.. image:: https://travis-ci.org/sunpy/ablog.svg?branch=master
:target: https://travis-ci.org/sunpy/ablog
.. image:: https://circleci.com/gh/sunpy/ablog.svg?style=svg
:target: https://circleci.com/gh/sunpy/ablog
.. image:: https://ci.appveyor.com/api/projects/status/cmmiadqoy5lx7l78?svg=true
:target: https://ci.appveyor.com/project/sunpy/ablog

Note
----

Expand Down
9 changes: 6 additions & 3 deletions ablog/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,12 @@ def run(self):


class CheckFrontMatter(SphinxTransform):
"""Check the doctree for frontmatter meant for a blog post.
"""
Check the doctree for frontmatter meant for a blog post.
This is mutually-exclusive with the PostDirective. Only one much be used."""
This is mutually-exclusive with the PostDirective. Only one much be
used.
"""

# Priority before 880 so that it runs before the `doctree-read` event
default_priority = 800
Expand Down Expand Up @@ -538,7 +541,7 @@ def process_postlist(app, doctree, docname):

def missing_reference(app, env, node, contnode):
target = node["reftarget"]
logging.warning(f"error, missing reference: {target}, {contnode}")
logging.debug(f"missing reference: {target}, {contnode}")
return _missing_reference(app, target, node.get("refdoc"), contnode, node.get("refexplicit"))


Expand Down
4 changes: 2 additions & 2 deletions ablog/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,10 @@ def w(t, ls=80):
World, hello again! This very first paragraph of the post will be used
as excerpt in archives and feeds. Find out how to control how much is shown
in `Post Excerpts and Images
<https://ablog.readthedocs.org/manual/post-excerpts-and-images/>`_. Remember
<https://ablog.readthedocs.org/manual/post-excerpts-and-images/>`__. Remember
that you can refer to posts by file name, e.g. ``:ref:`first-post``` results
in :ref:`first-post`. Find out more at `Cross-Referencing Blog Pages
<https://ablog.readthedocs.org/manual/cross-referencing-blog-pages/>`_.
<https://ablog.readthedocs.org/manual/cross-referencing-blog-pages/>`__.
"""


Expand Down
41 changes: 0 additions & 41 deletions appveyor.yml

This file was deleted.

84 changes: 52 additions & 32 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,56 @@
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)

trigger:
- master

pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python27:
python.version: '2.7'
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- master
always: true

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
resources:
repositories:
- repository: OpenAstronomy
type: github
endpoint: sunpy
name: OpenAstronomy/azure-pipelines-templates
ref: master

- script: |
python -m pip install --upgrade pip
pip install -r requirements.txt
displayName: 'Install dependencies'
trigger:
branches:
include:
- '*'
exclude:
- '*backport*'
tags:
include:
- 'v*'
exclude:
- '*dev*'
- '*pre*'
- '*post*'

- script: |
pip install pytest pytest-azurepipelines
pytest
displayName: 'pytest'
jobs:
- template: run-tox-env.yml@OpenAstronomy
parameters:
submodules: false
coverage: codecov
libraries:
brew:
- pandoc
choco:
- pandoc
apt:
- pandoc
envs:
- macos: py36-sphinx2
- windows: py36-sphinx3
- linux: codestyle
name: python_codestyle
pytest: false
- linux: py37-sphinx2
- linux: py37-sphinx3
- linux: py38-sphinx2
- linux: py38-sphinx3
- linux: py38-devdeps
- linux: py38-conda
34 changes: 9 additions & 25 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

ablog_builder = "dirhtml"
ablog_website = "_website"

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
Expand All @@ -17,15 +16,13 @@
"sphinx_automodapi.automodapi",
"alabaster",
"nbsphinx",
"myst_parser",
"ablog",
]

# language = 'de'
# language = 'tr'
# PROJECT

versionmod = get_distribution("ablog")

myst_update_mathjax = False
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
Expand All @@ -35,16 +32,16 @@
release = versionmod.version.split("+")[0]
# Is this version a development release
is_development = ".dev" in release

project = "ABlog"
copyright = "2014-2019, ABlog Team"
copyright = "2014-2021, ABlog Team"
master_doc = "index"
source_suffix = ".rst"
source_suffix = {
".rst": "restructuredtext",
".md": "markdown",
}
exclude_patterns = ["_build"]


# HTML OUTPUT

html_title = "ABlog"
html_static_path = ["_static"]
html_use_index = True
Expand All @@ -53,7 +50,6 @@
html_favicon = "_static/ablog.ico"

# ABLOG

blog_title = "ABlog"
blog_baseurl = "https://ablog.readthedocs.org"
blog_locations = {
Expand All @@ -74,14 +70,8 @@
disqus_shortname = "ablogforsphinx"
disqus_pages = True
fontawesome_css_file = "css/font-awesome.css"
blog_post_pattern = "release/ablog-v0.1-released*"

# blog_feed_titles = False
# blog_archive_titles = False
# post_auto_excerpt = 1

# THEME

html_style = "alabaster.css"
html_theme = "alabaster"
html_sidebars = {
Expand All @@ -97,28 +87,24 @@
}
html_theme_path = [alabaster.get_path()]
html_theme_options = {
"travis_button": True,
"travis_button": False,
"github_user": "sunpy",
"github_repo": "ablog",
"description": "ABlog for blogging with Sphinx",
"logo": "ablog.png",
}

# SPHINX

intersphinx_mapping = {
"python": ("https://docs.python.org/", None),
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
}

extlinks = {
"wiki": ("https://en.wikipedia.org/wiki/%s", ""),
"issue": ("https://github.com/sunpy/ablog/issues/%s", "issue "),
"pull": ("https://github.com/sunpy/ablog/pull/%s", "pull request "),
}

exclude_patterns = ["docs/manual/.ipynb_checkpoints/*"]

rst_epilog = """
.. _Sphinx: http://sphinx-doc.org/
.. _Python: https://python.org
Expand All @@ -130,10 +116,8 @@
"""


event_sig_re = re.compile(r"([a-zA-Z-]+)\s*\((.*)\)")


def parse_event(env, sig, signode):
event_sig_re = re.compile(r"([a-zA-Z-]+)\s*\((.*)\)")
m = event_sig_re.match(sig)
if not m:
signode += addnodes.desc_name(sig, sig)
Expand Down
Loading

0 comments on commit 7b2a19a

Please sign in to comment.