summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2019-08-06 14:47:58 -0500
committerSebastian Berg <sebastian@sipsolutions.net>2019-09-15 08:30:07 -0700
commit958a6b5efd46758fb1874e2f80aba166d192fbf9 (patch)
tree3015a21c0d68d91229177dc099001c9d28eac2cc
parent31ffdecf07d18ed4dbb66b171cb0f998d4b190fa (diff)
downloadnumpy-958a6b5efd46758fb1874e2f80aba166d192fbf9.tar.gz
DOC,MAINT: Build release notes during CircleCI step
For the moment, this requires te use for the development version of towncrier.
-rw-r--r--.circleci/config.yml8
-rw-r--r--doc/release/upcoming_changes/10151.improvement.rst2
-rw-r--r--doc/release/upcoming_changes/13605.deprecation.rst (renamed from changelog/13605.deprecation.rst)0
-rw-r--r--doc/release/upcoming_changes/14100.expired.rst6
-rw-r--r--doc/release/upcoming_changes/14248.change.rst10
-rw-r--r--doc/release/upcoming_changes/14248.changes.rst10
-rw-r--r--doc/release/upcoming_changes/template.rst17
-rw-r--r--doc/source/release.rst1
-rw-r--r--doc/source/release/1.18.0-notes.rst8
-rw-r--r--pyproject.toml13
-rwxr-xr-xtools/ci/test_all_newsfragments_used.py16
11 files changed, 66 insertions, 25 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 6b4ab812f..b0449b257 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -35,6 +35,14 @@ jobs:
pip install scipy
- run:
+ name: create release notes
+ command: |
+ . venv/bin/activate
+ pip install git+https://github.com/hawkowl/towncrier.git@master
+ VERSION=$(python -c "import setup; print(setup.VERSION)")
+ towncrier --version $VERSION --yes
+ ./tools/ci/test_all_newsfragments_used.py
+ - run:
name: build devdocs
command: |
. venv/bin/activate
diff --git a/doc/release/upcoming_changes/10151.improvement.rst b/doc/release/upcoming_changes/10151.improvement.rst
index 352e03029..cedb7ca67 100644
--- a/doc/release/upcoming_changes/10151.improvement.rst
+++ b/doc/release/upcoming_changes/10151.improvement.rst
@@ -2,7 +2,7 @@ Different C numeric types of the same size have unique names
------------------------------------------------------------
On any given platform, two of ``np.intc``, ``np.int_``, and ``np.longlong``
would previously appear indistinguishable through their ``repr``, despite
-having different properties when wrapped into ``dtype``s.
+their corresponding ``dtype`` having different properties.
A similar problem existed for the unsigned counterparts to these types, and on
some plaforms for ``np.double`` and ``np.longdouble``
diff --git a/changelog/13605.deprecation.rst b/doc/release/upcoming_changes/13605.deprecation.rst
index bff12e965..bff12e965 100644
--- a/changelog/13605.deprecation.rst
+++ b/doc/release/upcoming_changes/13605.deprecation.rst
diff --git a/doc/release/upcoming_changes/14100.expired.rst b/doc/release/upcoming_changes/14100.expired.rst
index 953922c72..e9ea9eeb4 100644
--- a/doc/release/upcoming_changes/14100.expired.rst
+++ b/doc/release/upcoming_changes/14100.expired.rst
@@ -1,3 +1,3 @@
-* ``PyArray_FromDimsAndDataAndDescr`` has been removed, use
- ``PyArray_NewFromDescr`` instead
-* ``PyArray_FromDims`` has been removed, use ``PyArray_SimpleNew`` instead
+* ``PyArray_FromDimsAndDataAndDescr`` and ``PyArray_FromDims`` have been
+ removed (they will always raise an error). Use ``PyArray_NewFromDescr``
+ and ``PyArray_SimpleNew`` instead.
diff --git a/doc/release/upcoming_changes/14248.change.rst b/doc/release/upcoming_changes/14248.change.rst
new file mode 100644
index 000000000..9ae0f16bc
--- /dev/null
+++ b/doc/release/upcoming_changes/14248.change.rst
@@ -0,0 +1,10 @@
+`numpy.distutils`: append behavior changed for LDFLAGS and similar
+------------------------------------------------------------------
+`numpy.distutils` has always overridden rather than appended to ``LDFLAGS`` and
+other similar such environment variables for compiling Fortran extensions. Now
+the default behavior has changed to appending - which is the expected behavior
+in most situations. To preserve the old (overwriting) behavior, set the
+``NPY_DISTUTILS_APPEND_FLAGS`` environment variable to 0. This applies to:
+``LDFLAGS``, ``F77FLAGS``, ``F90FLAGS``, ``FREEFLAGS``, ``FOPT``, ``FDEBUG``,
+and ``FFLAGS``. NumPy 1.16 and 1.17 gave build warnings in situations where this
+change in behavior would have affected the compile flags used.
diff --git a/doc/release/upcoming_changes/14248.changes.rst b/doc/release/upcoming_changes/14248.changes.rst
deleted file mode 100644
index ff5f4acef..000000000
--- a/doc/release/upcoming_changes/14248.changes.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-numpy.distutils: append behavior changed for LDFLAGS and similar
-----------------------------------------------------------------
-`numpy.distutils` has always overridden rather than appended to `LDFLAGS` and
-other similar such environment variables for compiling Fortran extensions. Now
-the default behavior has changed to appending - which is the expected behavior
-in most situations. To preserve the old (overwriting) behavior, set the
-`NPY_DISTUTILS_APPEND_FLAGS` environment variable to 0. This applies to:
-`LDFLAGS`, `F77FLAGS`, `F90FLAGS`, `FREEFLAGS`, `FOPT`, `FDEBUG`, and `FFLAGS`.
-NumPy 1.16 and 1.17 gave build warnings in situations where this change in
-behavior would have affected the compile flags used.
diff --git a/doc/release/upcoming_changes/template.rst b/doc/release/upcoming_changes/template.rst
index 21c4d19c6..9c8a3b5fc 100644
--- a/doc/release/upcoming_changes/template.rst
+++ b/doc/release/upcoming_changes/template.rst
@@ -1,19 +1,25 @@
+{% set title = "NumPy {} Release Notes".format(versiondata.version) %}
+{{ "=" * title|length }}
+{{ title }}
+{{ "=" * title|length }}
+
{% for section, _ in sections.items() %}
-{% set underline = underlines[0] %}{% if section %}{{section}}
+{% set underline = underlines[0] %}{% if section %}{{ section }}
{{ underline * section|length }}{% set underline = underlines[1] %}
{% endif %}
-
{% if sections[section] %}
-{% for category, val in definitions.items() if category in sections[section]%}
+{% for category, val in definitions.items() if category in sections[section] %}
+
{{ definitions[category]['name'] }}
{{ underline * definitions[category]['name']|length }}
{% if definitions[category]['showcontent'] %}
{% for text, values in sections[section][category].items() %}
-{{ text }} ({{ values|join(', ') }})
-{% endfor %}
+{{ text }}
+{{ get_indent(text) }}({{values|join(', ') }})
+{% endfor %}
{% else %}
- {{ sections[section][category]['']|join(', ') }}
@@ -23,7 +29,6 @@ No significant changes.
{% else %}
{% endif %}
-
{% endfor %}
{% else %}
No significant changes.
diff --git a/doc/source/release.rst b/doc/source/release.rst
index 0b65d3e39..fb4e2b14d 100644
--- a/doc/source/release.rst
+++ b/doc/source/release.rst
@@ -5,6 +5,7 @@ Release Notes
.. toctree::
:maxdepth: 3
+ 1.18.0 <release/1.18.0-notes>
1.17.1 <release/1.17.2-notes>
1.17.1 <release/1.17.1-notes>
1.17.0 <release/1.17.0-notes>
diff --git a/doc/source/release/1.18.0-notes.rst b/doc/source/release/1.18.0-notes.rst
new file mode 100644
index 000000000..e66540410
--- /dev/null
+++ b/doc/source/release/1.18.0-notes.rst
@@ -0,0 +1,8 @@
+The NumPy 1.18 release is currently in developement. Please check
+the ``numpy/doc/release/upcoming_changes/`` folder for upcoming
+release notes.
+The ``numpy/doc/release/upcoming_changes/README.txt`` details how
+to add new release notes.
+
+For the work in progress release notes for the current development
+version, see the `devdocs <https://numpy.org/devdocs/release.html>`__.
diff --git a/pyproject.toml b/pyproject.toml
index 4439ed229..918cbb278 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -9,13 +9,15 @@ requires = [
[tool.towncrier]
# Do no set this since it is hard to import numpy inside the source directory
- # Use "--version Numpy" instead
- #project = "numpy"
- filename = "doc/release/latest-note.rst"
- directory = "doc/release/upcoming_changes"
+ # the name is hardcoded. Use "--version 1.18.0" to set the version
+ single_file = true
+ filename = "doc/source/release/{version}-notes.rst"
+ directory = "doc/release/upcoming_changes/"
issue_format = "`gh-{issue} <https://github.com/numpy/numpy/pull/{issue}>`__"
template = "doc/release/upcoming_changes/template.rst"
- underlines="~="
+ underlines = "~="
+ all_bullets = false
+
[[tool.towncrier.type]]
directory = "highlight"
@@ -66,3 +68,4 @@ requires = [
directory = "change"
name = "Changes"
showcontent = true
+
diff --git a/tools/ci/test_all_newsfragments_used.py b/tools/ci/test_all_newsfragments_used.py
new file mode 100755
index 000000000..6c4591fd8
--- /dev/null
+++ b/tools/ci/test_all_newsfragments_used.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+
+import sys
+import toml
+import os
+
+path = toml.load("pyproject.toml")["tool"]["towncrier"]["directory"]
+
+fragments = os.listdir(path)
+fragments.remove("README.rst")
+fragments.remove("template.rst")
+
+if fragments:
+ print("The following files were not found by towncrier:")
+ print(" " + " \n".join(fragments))
+ sys.exit(1)