-
Notifications
You must be signed in to change notification settings - Fork 16
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
Doc changelog #115
Doc changelog #115
Changes from 123 commits
6bff0bc
da9c84a
5d4c0c5
95ef0ac
e5e6b56
597b68e
470907d
3347254
999086b
d738e32
9a9e761
950b4d9
c91c590
805780b
d35851f
4eee1d3
bc08bf1
63548d2
a5bf05c
9f0742d
587cbbb
fdb7041
6efe393
496761b
11b3dcd
9207c71
cba504c
21833e2
25d8856
50bf57d
b40f82e
362efe6
7b3118f
4de329f
ec17d18
847ccf7
6e27090
bf4f977
f614364
c0d7185
1481c38
5a53b78
07af7da
463763b
87e7e57
45f143c
387d742
199481f
55c1677
d56ede2
3fc4624
c32c480
12ef1c1
41224de
3bcdc8b
72c1dce
77d807f
a45e818
180dad1
25865bd
aa1c567
0268cd3
990fef7
cd6df6c
57a60fe
2b5c31e
4f4b1e8
73aba3e
a933d6d
c1e6930
a70d7f0
1554678
2c172ed
08acc10
0756c72
437c9d1
820e3a3
734054e
3d9113a
1385d58
fcc810b
2c77852
f971894
2441fb1
bf4337b
e9aec16
47fc47f
ef2f642
0be44dd
6202d6c
9f200ba
c2b6e1d
94f8d59
0fe7cfc
604b8fd
db2f4ef
c1c87b2
c41318f
8a5cce2
c0d26dc
ec03fa0
d2f3993
fec2c2f
19a352c
010e08a
4de5fef
2a99f5b
bd01291
0c264b8
6a6308b
2e14a9b
f06e828
d22b150
845ba47
12dbb0e
869610d
5a77d3b
7899b87
b5d0ee3
0f8944e
7375e4a
86953e8
e7bc7c7
9c6c9d5
dd0691e
834c474
88c5d64
60608a6
7f25cd4
beaf8a6
0ee8734
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,6 @@ on: | |
release: | ||
type: [published] | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'doc/**' | ||
- 'saltproc/**' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Preamble | ||
name: Create next micro release | ||
|
||
on: | ||
# enable worflow to be run manually | ||
workflow_dispatch: | ||
|
||
jobs: | ||
next-release-micro: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get most recent release version | ||
run: | | ||
echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/tags --jq '.[0] | .name')" >> $GITHUB_ENV | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Increment micro version | ||
run: | | ||
IFS='.' read -ra arr <<< ${{ env.RELEASE_VERSION }} | ||
MICRO_VERSION=$((${arr[2]}+1)) | ||
arr[2]=$MICRO_VERSION | ||
NEW_RELEASE_VERSION="${arr[0]}.${arr[1]}.${arr[2]}" | ||
echo "NEW_RELEASE_VERSION="$NEW_RELEASE_VERSION >> $GITHUB_ENV | ||
|
||
- name: Create a new release | ||
run: | | ||
gh api repos/${{ github.repository }}/releases \ | ||
-H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-X POST \ | ||
-F name=${{ env.NEW_RELEASE_VERSION }} \ | ||
-F tag_name=${{ env.NEW_RELEASE_VERSION }} \ | ||
-F draft=true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
- name: Create a new milestone. | ||
run: | | ||
gh api repos/${{ github.repository }}/milestones \ | ||
-H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-X POST \ | ||
-F title=${{ env.NEW_RELEASE_VERSION }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create new release notes | ||
run: | | ||
cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst | ||
sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst | ||
sed -i "s/${{ env.RELEASE_VERSION }}/${{ env.NEW_RELEASE_VERSION }}\n ${{ env.RELEASE_VERSION }}/g" doc/releasenotes/index.rst | ||
git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst | ||
git add doc/releasenotes/index.rst | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git commit -am "created ${{ env.NEW_RELEASE_VERSION }} release notes" | ||
git push |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Preamble | ||
name: Create next minor release | ||
|
||
on: | ||
release: | ||
type: [published] | ||
# enable worflow to be run manually | ||
workflow_dispatch: | ||
|
||
jobs: | ||
next-release-minor: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get most recent release version | ||
run: | | ||
echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/tags --jq '.[0] | .name')" >> $GITHUB_ENV | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Increment minor version | ||
run: | | ||
IFS='.' read -ra arr <<< ${{ env.RELEASE_VERSION }} | ||
MINOR_VERSION=$((${arr[1]}+1)) | ||
arr[1]=$MINOR_VERSION | ||
NEW_RELEASE_VERSION="${arr[0]}.${arr[1]}.${arr[2]}" | ||
echo "NEW_RELEASE_VERSION="$NEW_RELEASE_VERSION >> $GITHUB_ENV | ||
|
||
- name: Create a new release | ||
run: | | ||
gh api repos/${{ github.repository }}/releases \ | ||
-H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-X POST \ | ||
-F name=${{ env.NEW_RELEASE_VERSION }} \ | ||
-F tag_name=${{ env.NEW_RELEASE_VERSION }} \ | ||
-F draft=true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
- name: Create a new milestone. | ||
run: | | ||
gh api repos/${{ github.repository }}/milestones \ | ||
-H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-X POST \ | ||
-F title=${{ env.NEW_RELEASE_VERSION }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create new release notes | ||
run: | | ||
cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst | ||
sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst | ||
sed -i "s/${{ env.RELEASE_VERSION }}/${{ env.NEW_RELEASE_VERSION }}\n ${{ env.RELEASE_VERSION }}/g" doc/releasenotes/index.rst | ||
git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst | ||
git add doc/releasenotes/index.rst | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git commit -am "created ${{ env.NEW_RELEASE_VERSION }} release notes" | ||
git push |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Preamble | ||
name: Populate SaltProc release notes | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'doc/releasenotes/v**.rst' | ||
# enable worflow to be run manually | ||
workflow_dispatch: | ||
|
||
jobs: | ||
populate-releasenotes: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Add conda to system path | ||
run: | | ||
# $CONDA is an environment variable pointing to the root of the miniconda directory | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
|
||
- name: install pandoc | ||
run: | | ||
conda install -c conda-forge pandoc | ||
pip install --upgrade pandoc | ||
|
||
- name: Get most recent draft release version | ||
run: | | ||
echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .name')" >> $GITHUB_ENV | ||
echo "RELEASE_ID=$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .id')" >> $GITHUB_ENV | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Convert .rst to .md | ||
run: pandoc -s -o RELEASENOTES.md -f rst -t gfm doc/releasenotes/${{ env.RELEASE_VERSION }}.rst --columns 1000 | ||
|
||
|
||
- name: Populate the release description with RELEASENOTES.md | ||
run: | | ||
gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ | ||
-H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-X PATCH \ | ||
-F body="$(cat RELEASENOTES.md)" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
Contributing | ||
============ | ||
|
||
Thanks for Your Help! | ||
--------------------- | ||
Comment on lines
+1
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason the information from the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. It's the web-discoverable version decoupled from github. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this is what ends up on the webpage separate from the repo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used pandoc to generate the .rst file from the .md file |
||
|
||
Contributing is so kind of you. In SaltProc, all contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome. | ||
|
||
The `GitHub "issues" tab <https://github.com/arfc/saltproc/issues>`__ contains some issues labeled "Difficulty:1-Beginner". Those are open issues that would be a good quick way to get started. Browse them to see if you want to get started on one. | ||
|
||
Bug Reports | ||
~~~~~~~~~~~ | ||
|
||
Is something in the code not working? Consider making a bug report! In particular: | ||
|
||
- Please include a short but detailed, self-contained Python snippet or explanation for reproducing the problem. | ||
|
||
- Explain what the expected behavior was, and what you saw instead. | ||
|
||
Feature Requests | ||
~~~~~~~~~~~~~~~~ | ||
|
||
If you have an idea that could add to or improve SaltProc, and know how to implement it, consider making a Feature Request! | ||
|
||
Discussion | ||
~~~~~~~~~~ | ||
|
||
If you | ||
|
||
- have feedback or a feature idea that aren't concrete/focused enough to go into a Feature Request Issue | ||
- want to show off cool work you have done with the software | ||
|
||
please use our `Discussions page <https://github.com/arfc/saltproc/discussions>`__! | ||
|
||
Instructions for setting up a development environment | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The SaltProc is compatible with Python >=3.5. Anaconda is the recommended distribution to use to work on SAltProc; we will assume that if you want to use another distribution or your own set up, you can translate the instructions. | ||
|
||
You can download Anaconda at https://www.continuum.io/Downloads for the full install. You can also download a mini Anaconda install for a bare-bones install -- this is good for a build server or if you don't have much space. The mini Anaconda installs are available at https://conda.io/miniconda.html. | ||
|
||
Once your Anaconda package is installed and available, create a Python 3.6 environment in Anaconda -- | ||
|
||
:: | ||
|
||
conda create -q -n saltproc-test-environment python=3.6 scipy numpy matplotlib pytest pytables flake8 | ||
|
||
Each of these commands will take a bit of time -- give it a few minutes to download and install the packages and their dependences. Once complete, switch to each and install additional packages needed to run and test. | ||
|
||
Activate the 3.6 environment and install pyne, networkx and pydotplus | ||
|
||
:: | ||
|
||
source activate saltproc-test-environment | ||
conda install -c conda-forge pyne networkx pydotplus | ||
|
||
Setup Serpent Monte Carlo code environment | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The SaltProc assumes that Serpent directory is added in ``$PATH`` as follows: | ||
|
||
:: | ||
|
||
export PATH="/path/to/serpent/executable:$PATH" | ||
|
||
Run the tests | ||
^^^^^^^^^^^^^ | ||
|
||
Tests are automatically detected and run with pytest. Start in the root directory where you have cloned the saltproc repository and run in development environment | ||
|
||
:: | ||
|
||
source active saltproc-test-environment | ||
py.test saltproc | ||
|
||
Run style tests with flake8 | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Adherance to style checks in flake8 is encouraged though not strictly enforced. While you should not feel compelled to fix existing failures, please do not add additional flake8 issues. | ||
|
||
:: | ||
|
||
run flake8 from the root of the pyrk working directory to get all flake8 issues | ||
run flake8 and provide a filename to just run checks on that file | ||
|
||
Pull Requests | ||
^^^^^^^^^^^^^ | ||
|
||
Please use the provided pull request template. In particular: | ||
|
||
- **Make sure the test suite passes** on your computer. To do so, run ``py.test saltproc`` in the repository directory. At a minumum, you must run the tests requring serpent locally as they are not tested by our CI | ||
- Describe your feature/change/fix in the release notes (located in ``doc/releasenotes``) for the currently in-development release version. Use the descriptive comments and examples as reference. | ||
- Please reference relevant Github issues in your commit message using ``GH1234`` or ``#1234``. | ||
- Changes should be PEP8 compatible `PEP8 <http://www.python.org/dev/peps/pep-0008/>`__. | ||
- Keep style fixes to a separate commit to make your PR more readable. | ||
- Docstrings ideally follow the `sphinx autodoc <https://pythonhosted.org/an_example_pypi_project/sphinx.html#function-definitions>`__ | ||
- Write tests. | ||
- When writing tests, please make sure they are in a ``tests`` directory. | ||
- When you start working on a PR, start by creating a new branch pointing at the latest commit on github master. | ||
- The SaltProc copyright policy is detailed in the `LICENSE <https://github.com/arfc/saltproc/blob/master/LICENSE>`__. | ||
|
||
More developer docs | ||
~~~~~~~~~~~~~~~~~~~ | ||
|
||
- We are working on it. | ||
|
||
Meta | ||
~~~~ | ||
|
||
Note, this contributing file was adapted from the one at the `pandas <https://github.com/pydata/pandas>`__ repo. Thanks pandas! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. _devguide: | ||
|
||
================= | ||
Developer's Guide | ||
================= | ||
.. _git workflow: https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control | ||
|
||
Welcome to the SaltProc developer's guide. Here you'll find | ||
all the information you need to be an efficient and effective contributor | ||
to SaltProc. | ||
|
||
.. note:: The SaltProc developer's guide is a work in progress. | ||
Information contained within may change, so make sure to check the | ||
release notes for updates! | ||
|
||
If you're new to software development, please familiarize yourself with the | ||
`git workflow`_ before getting started. We'll be using terminoigy | ||
in this developer's guide that relies on understanding it. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
contributing |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.. _releasenotes: | ||
|
||
============= | ||
Release Notes | ||
============= | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
v0.4.0 | ||
v0.3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this remove pushing the updates to the master branch? Or does this do something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's exactly what it does!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason you are removing this? Does pushing to the master branch trigger this workflow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm removing this because we only need to trigger the workflow when there are changes to the source code (which is what the API documentation is based on) or when there are new doc pages (in the
doc
folder). We don't need to trigger this workflow when we add/edit workflows or configuration files.