Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from cta-observatory/implement_towncrier
Implement towncrier
- Loading branch information
Showing
11 changed files
with
136 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Add interpolation function for RAD_MAX tables. | ||
There is now a ``interpolate_rad_max`` function in ``pyirf.interpolation`` that is a simple wrapper around ``scipy.interpolate.griddata``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Units are now correctly handled in ``pyirf.spectral.PowerLaw``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Updates ``gammapy`` dependency to version 1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add and enable ``towncrier`` in CI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# How to use `towncrier` | ||
|
||
A tutorial can be found [here](https://towncrier.readthedocs.io/en/stable/tutorial.html). | ||
|
||
1. Create a new file for your changes `<PULL REQUEST>.<TYPE>.rst` in the corresponding folder. The following types are available: | ||
- feature: `New feature` | ||
- bugfix: `Bugfix` | ||
- api: `API Changes` | ||
- optimization: `Refactoring and Optimization` | ||
- maintenance: `Maintenance` | ||
|
||
2. Write a suitable message for the change: | ||
``` | ||
Fixed ``crazy_function`` to be consistent with ``not_so_crazy_function`` | ||
``` | ||
|
||
3. (For maintainers) How to generate a change log: | ||
- Execute the following command in the base directory of the project | ||
``` | ||
towncrier build --version=<VERSION NUMBER> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{% if render_title %} | ||
{% if versiondata.name %} | ||
{{ versiondata.name }} {{ versiondata.version }} ({{ versiondata.date }}) | ||
{{ top_underline * ((versiondata.name + versiondata.version + versiondata.date)|length + 4)}} | ||
{% else %} | ||
{{ versiondata.version }} ({{ versiondata.date }}) | ||
{{ top_underline * ((versiondata.version + versiondata.date)|length + 3)}} | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% for category, val in definitions.items() %} | ||
|
||
{% set underline = underlines[0] %} | ||
{{ definitions[category]['name'] }} | ||
{{ underline * definitions[category]['name']|length }} | ||
{% set underline = underlines[1] %} | ||
|
||
{% for section, _ in sections.items() %} | ||
{% if section and category in sections[section] %} | ||
{{section}} | ||
{{ underline * section|length }} | ||
|
||
{% endif %} | ||
{% if sections[section] and category in sections[section] %} | ||
{% if definitions[category]['showcontent'] %} | ||
{% for text, values in sections[section][category].items() %} | ||
- {{ text }} [{{ values|join(', ') }}] | ||
|
||
{% endfor %} | ||
{% else %} | ||
- {{ sections[section][category]['']|join(', ') }} | ||
|
||
{% endif %} | ||
{% if sections[section][category]|length == 0 %} | ||
No significant changes. | ||
|
||
{% else %} | ||
{% endif %} | ||
{% else %} | ||
{# No significant changes. #} | ||
{% endif %} | ||
{% endfor %} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ dependencies: | |
- pytest | ||
- pytest-cov | ||
# docs | ||
- towncrier | ||
- numpydoc | ||
- pytables | ||
- nbsphinx | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,35 @@ | ||
[build-system] | ||
requires = ["setuptools >= 40.6.0", "setuptools_scm[toml]>=3.4"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.towncrier] | ||
package = "pyirf" | ||
directory = "docs/changes" | ||
filename = "CHANGES.rst" | ||
template = "docs/changes/template.rst" | ||
# let towncrier create proper links to the merged PR | ||
issue_format = "`#{issue} <https://github.com/cta-observatory/pyirf/pull/{issue}>`__" | ||
|
||
[tool.towncrier.fragment.feature] | ||
name = "New Features" | ||
showcontent = true | ||
|
||
[tool.towncrier.fragment.bugfix] | ||
name = "Bug Fixes" | ||
showcontent = true | ||
|
||
[tool.towncrier.fragment.api] | ||
name = "API Changes" | ||
showcontent = true | ||
|
||
[tool.towncrier.fragment.optimization] | ||
name = "Refactoring and Optimization" | ||
showcontent = true | ||
|
||
[tool.towncrier.fragment.maintenance] | ||
name = "Maintenance" | ||
showcontent = true | ||
|
||
[[tool.towncrier.section]] | ||
name = "" | ||
path = "" |