Skip to content

Commit

Permalink
Merge pull request #19 from abachma2/updates
Browse files Browse the repository at this point in the history
Update to use OpenMC v0.14.0, update documentation
  • Loading branch information
yardasol authored Jun 13, 2024
2 parents df40e52 + 34ab439 commit 1ad3ae1
Show file tree
Hide file tree
Showing 16 changed files with 35,643 additions and 1,279 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test-openmcyclus.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: test-openmcyclus
on: [push, pull_request]
on: [pull_request]

jobs:
build-and-test:
Expand Down Expand Up @@ -47,6 +47,6 @@ jobs:
# run: |
# pip install pytest

- name: Run Tests
run: |
pytest tests/integration_tests/test_depletereactor.py
# - name: Run Tests
# run: |
# pytest tests/integration_tests/test_depletereactor.py
42 changes: 42 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: unit-tests
on: [pull_request, push]

jobs:
build-and-unit-test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}

steps:
- uses: actions/checkout@v3
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: openmcyclus-env
environment-file: environment.yml
use-mamba: true

- name: Conda config
run: |
conda config --env --set pip_interop_enabled True
- name: Install OpenMC from Mamba
run:
mamba install openmc scipy=1.11

- name: Install OpenMC cross section library
run: |
$GITHUB_WORKSPACE/openmc-xs.bash
echo "OPENMC_CROSS_SECTIONS=cross_sections.xml" >> $GITHUB_ENV
- name: Install OpenMCyclus
run:
pip install .

- name: Run Tests
run:
pytest tests/unit_tests/test_depletion.py

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__pycache__/
*.ipynb_checkpoints/
*.sqlite
*.h5
*.pdf

31 changes: 31 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
======================
OpenMCyclus Change Log
======================

Since last release:
===================

**Added:**

* Added `CHANGELOG.rst`, `.gitignore`, `CONTRIBUTING.rst`,
and unit tests for `openmcyclus.Depletion` class. Also
added files for better reproduction of comparison benchmar (#18)
* Add input parameters to `DepleteReactor` for the thermal
power (instead of just using `power_cap`) and flux
(required input for running OpenMC with new version) (#18)

**Changed:**

* Change OpenMC dependency to v0.14.0, which includes adding
parameters for using `DepleteReactor` (#18)

**Removed:**

* Remove `check_existing_recipes` method in `DepleteReactor` (#18)

**Fixed:**


v 0.1.0
=========
Initial release
67 changes: 67 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
***************************
Contributing to OpenMCyclus
***************************

Welcome, and thank you for your interest in developing OpenMCyclus. This document
serves as a guide for making contributions to this archetype library.

General Notes
=============
OpenMCyclus relies on Cyclus and OpenMC, so familiarity with using both is
recommended. Please refer to the `Cyclus website <http://fuelcycle.org>`_ and
`OpenMC documenatation <https://docs.openmc.org/en/v0.14.0/index.html>`_ for
information about each code.

Contributions to this software are made via GitHub, so familiarity with
git is recommended. Resources for installing
and using git and GitHub include:

* The `git website <https://git-scm.com/>`_

* The `GitHub docs <https://docs.github.com/en>`_

* This `tutorial <https://help.github.com/articles/using-pull-requests/>`_ on creating
pull requests

The general steps for contributing to OpenMCyclus are:

1. Create a fork of the OpenMCyclus repository
2. Create a new branch on your fork, keeping the `main` branch clean and
up-to-date with the ARFC version of the repository `main` branch
3. Make your desired changes on your new branch
4. Make sure all of the tests pass. You can run the tests locally, or they will
run in the CI (via GitHub Actions) when you push changes
5. When you're finished with your changes and the tests pass, update the
`CHANGELOG <CHANGELOG.rst>`_ with the changes you've made.
6. Issue a pull request into the ARFC repository `main` branch.

Reviewing pull requests
=======================
Reviewing pull requests is an important part of development work. When
reviewing pull requests please:

* Make sure the code is consistent with the `PEP 8 style guide <https://peps.python.org/pep-0008/>`_
* Make sure all tests in CI are passing
* Ensure that new tests are added as needed to address new features
* Make positive, constructive comments on the code

Once all conversations are resolved and all tests pass, you are welcome to
merge the pull request.

Running tests:
==============
pytest is used for all tests. Tests should be run from the top-level
directory of this repository using:

.. code-block:: bash
$ pytest tests/
Releases:
=========
When a new release is ready:

#. Update all documentation as needed and issue a PR for this
#. git tag -a <version>
#. git push upstream main
#. git push upstream <version>
128 changes: 0 additions & 128 deletions README.md

This file was deleted.

Loading

0 comments on commit 1ad3ae1

Please sign in to comment.