Skip to content
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

Impove Community documentation #380

Merged
merged 25 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
516bef1
Create CODE_OF_CONDUCT.md
MicahGale Feb 23, 2024
6a26abd
Made shell of community documents.
MicahGale Feb 23, 2024
2911c16
Made draft contribution guide.
MicahGale Feb 24, 2024
681863c
Merge branch '375-improve-community-documentation-1' into 375-improve…
MicahGale Feb 24, 2024
3024075
Started bare changelog.
MicahGale Feb 24, 2024
c6f26c8
Made changelog test.
MicahGale Feb 24, 2024
7aae4a5
Added changelog from previous releases
MicahGale Feb 24, 2024
e908bd4
Fixed RST syntax.
MicahGale Feb 24, 2024
5880813
Merge branch 'develop' into 375-improve-community-documentation
MicahGale Mar 5, 2024
75018c8
Merge branch 'develop' into 375-improve-community-documentation
MicahGale Mar 5, 2024
3f92bb2
Made stub page for scope.
MicahGale Mar 8, 2024
ddb1b89
Made montepy scope and moved design philosophy.
MicahGale Mar 9, 2024
afa4c13
Made a better landing page, and made the table of contents more nested.
MicahGale Mar 9, 2024
174191a
Fixed section heading error.
MicahGale Mar 9, 2024
4221b46
Made clear stance on output files.
MicahGale Mar 9, 2024
70a20df
Messed with API TOC to make it actually legible.
MicahGale Mar 9, 2024
a8404e3
Updated doc test to avoid more undocumented files.
MicahGale Mar 9, 2024
ce52566
Update github actions to update changelog automatically. (#389)
MicahGale Mar 9, 2024
03d6155
Merge branch 'develop' into 375-improve-community-documentation
MicahGale Mar 16, 2024
65687bf
Implemented GHA for changing changelog version numbers
MicahGale Mar 17, 2024
7191c3b
tie to minor release because major release not working.
MicahGale Mar 17, 2024
867798a
Go to next gha release.
MicahGale Mar 17, 2024
c22de78
Merge branch 'develop' into 375-improve-community-documentation
MicahGale Apr 15, 2024
8d5035d
Fixed syntax error with pip in doc-test
MicahGale Apr 15, 2024
4be2781
Delete CODE_OF_CONDUCT.md
MicahGale May 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: set up python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
- run: pip install . montepy[develop]
- run: python -m pytest

build-pages:
needs: [last-minute-test, build-packages]
environment:
name: github-pages
runs-on: ubuntu-latest
Expand All @@ -27,7 +28,9 @@ jobs:
TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
ref: main
- uses: actions/setup-python@v5
with:
python-version: 3.8
- run: pip install --user . montepy[doc]
Expand All @@ -53,13 +56,28 @@ jobs:
fetch-depth: 0
fetch-tags: true
- name: set up python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
- run: pip install . montepy[build]
- uses: mathieudutour/github-tag-action@v6.2
name: Get next version number (dry)
id: version_num
with:
dry_run: True
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Update changelog version
run: |
sed -i "s/#Next Version#/${{steps.version_num.outputs.new_version}}/w changes" doc/source/changelog.rst
[[ -s changes ]] || exit 1
- name: Commit new changelog
uses: actions4git/add-commit-push@v1.0.0
with:
add-pathspec: doc/source
commit-message: Update Changelog version to ${{steps.version_num.outputs.new_version}}
- name: GitHub Actions Create Tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# ensure tags are up to date
Expand All @@ -85,7 +103,7 @@ jobs:
gh release upload
'${{ steps.tag_version.outputs.new_tag }}' dist/**
--repo '${{ github.repository }}'
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v4.3.1
with:
name: build
path: |
Expand Down
53 changes: 42 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install --upgrade pip build
Expand All @@ -35,7 +35,8 @@ jobs:
- run: pip install --user . montepy[develop]
- run: pip freeze
- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.1
if: ${{ matrix.python-version == '3.9' }}
with:
name: build
path: dist/*
Expand All @@ -50,7 +51,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install --user . montepy[test]
Expand Down Expand Up @@ -81,7 +82,7 @@ jobs:
reporter: java-junit
- name: Coveralls GitHub Action
if: ${{ matrix.python-version == '3.9' && (success() || failure() )}}
uses: coverallsapp/github-action@v2.2.3
uses: coverallsapp/github-action@v2
with:
file: coverage.xml

Expand All @@ -91,17 +92,30 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: set up python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
- run: pip install . montepy[doc,build]
- uses: mathieudutour/github-tag-action@v6.2
name: Get next version number
id: version_num
with:
dry_run: True
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Update changelog version
run: |
sed -i "s/#Next Version#/${{steps.version_num.outputs.new_version}}/w changes" doc/source/changelog.rst
[[ -s changes ]] || exit 1
- run: sphinx-build doc/source/ doc/build/ -W --keep-going -E
- run: sphinx-build -b html doc/source/ doc/build/html
- uses: actions/upload-artifact@v3
name: Build site strictly
- uses: actions/upload-artifact@v4
with:
name: website
path: doc/build/html
path: doc/build
- name: Test for missing API documentation
run: |
cd doc/source
Expand All @@ -113,10 +127,27 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: set up python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
- run: pip install . montepy[format]
- run: black --check montepy/ tests/




changelog-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Check for changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
change:
- 'doc/source/changelog.rst'
- if: steps.changes.outputs.change == 'false'
run: |
echo "Changelog not updated"
exit 1

1 change: 1 addition & 0 deletions CHANGELOG.rst
41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributing to MontePy

Welcome, and thank you for considering contributing to MontePy! We look forward
to welcoming new members to the community and will do our best to help you get
up to speed.

## Code of Conduct

Participants in the MontePy project are expected to follow and uphold the [Code
of Conduct](CODE_OF_CONDUCT.md). Please report any unacceptable behavior to
micah.gale@inl.gov.

## Resources

- [GitHub Repository](https://github.com/idaholab/montepy)
- [Documentation](https://idaholab.github.io/MontePy/)
- [Developer's Guide](https://idaholab.github.io/MontePy/developing.html)

## How to Report Bugs

MontePy is hosted on GitHub and all bugs are reported and tracked through the
[Issues](https://github.com/idaholab/MontePy/issues) listed on GitHub.

## How to Suggest Enhancements

If you have suggestions for new features, feel free to suggest one as a new issue.
Keep in mind that MontePy has a small development team,
and in some cases MontePy might not be the right home for the feature.
Please review the package philosophy to see if the feature would be a good fit.

## How to Submit Changes

All changes to OpenMC happen through pull requests. For a full overview of the
process, see the developer's guide section on [Contributing to
OpenMC](https://docs.openmc.org/en/latest/devguide/contributing.html).

## Code Style

Before you run off to make changes to the code, please review the [design
philosophy](https://idaholab.github.io/MontePy/developing.html#design-philosophy),
and make sure to also use [black](https://black.readthedocs.io/en/stable/index.html).
4 changes: 3 additions & 1 deletion doc/source/_test_for_missing_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
import warnings

ignored = {"__pycache__", "_version.py", "__main__.py", "_cell_data_control.py"}
ignored = {"__pycache__", "_scripts", "_version.py", "__main__.py", "_cell_data_control.py"}

base = os.path.join("..", "..")

Expand All @@ -14,6 +14,8 @@ def crawl_path(rel_path):
f_name = os.path.join(rel_path, f)
if f in ignored:
continue
if f_name == "montepy/__init__.py":
continue
if os.path.isdir(os.path.join(base, f_name)):
crawl_path(f_name)
elif os.path.isfile(os.path.join(base, f_name)) and ".py" in f:
Expand Down
36 changes: 32 additions & 4 deletions doc/source/api/modules.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
Python API
============
MontePy API
===========

Submodules
----------

.. toctree::
:maxdepth: 4
:maxdepth: 1

montepy.cell
montepy.cells
montepy.constants
montepy.errors
montepy.geometry_operators
montepy.materials
montepy.mcnp_object
montepy.mcnp_problem
montepy.numbered_mcnp_object
montepy.numbered_object_collection
montepy.particle
montepy.surface_collection
montepy.transforms
montepy.universe
montepy.universes
montepy.utilities

Subpackages
-----------

.. toctree::
:maxdepth: 2

montepy.data_inputs
montepy.input_parser
montepy.surfaces

montepy
2 changes: 1 addition & 1 deletion doc/source/api/montepy.cell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ montepy.cell module
===================


.. automodule:: montepy.cell
.. autoclass:: montepy.cell.Cell
:members:
:undoc-members:
:show-inheritance:
2 changes: 0 additions & 2 deletions doc/source/api/montepy.data_inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ montepy.data\_inputs package
:undoc-members:
:show-inheritance:

Submodules
----------

.. toctree::
:maxdepth: 4
Expand Down
5 changes: 1 addition & 4 deletions doc/source/api/montepy.input_parser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ montepy.input\_parser package
:undoc-members:
:show-inheritance:

Submodules
----------

.. toctree::
:maxdepth: 4
:maxdepth: 2

montepy.input_parser.block_type
montepy.input_parser.cell_parser
Expand Down
41 changes: 0 additions & 41 deletions doc/source/api/montepy.rst

This file was deleted.

4 changes: 1 addition & 3 deletions doc/source/api/montepy.surfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ montepy.surfaces package
:undoc-members:
:show-inheritance:

Submodules
----------

.. toctree::
:maxdepth: 4
:maxdepth: 2

montepy.surfaces.axis_plane
montepy.surfaces.cylinder_on_axis
Expand Down
Loading
Loading