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

updating main with latest dev for 1.2 release preparation #237

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0d16df0
added pypi version badge (#176)
shimwell May 17, 2024
abd6dab
Removing unused functions (#178)
shimwell May 17, 2024
07f018f
more concise install with conda-forge (#180)
shimwell May 20, 2024
ac30ab8
Avoid doubled underscore in method names (#181)
shimwell May 20, 2024
5d209e0
Moving decompose solids into CadToCsg class (#183)
shimwell May 21, 2024
46b6025
moving load_cad and export_solids from start to own method (#186)
shimwell May 21, 2024
7207755
Moving get universe out of start method (#188)
shimwell May 22, 2024
cafe1a7
Remove need for os import (#185)
shimwell May 22, 2024
793d4f3
corrected badge urls (#190)
shimwell May 22, 2024
d7806c0
Adding docs for json api usage (#192)
shimwell May 23, 2024
0e52196
Adding UCARD to missing parts of documentation and example JSON file …
shimwell May 23, 2024
721ed45
Adding version support to docs (#198)
shimwell May 27, 2024
2f76c1e
added missing " (#200)
shimwell May 27, 2024
ef80ed2
Adding more details to the developer documentation (#202)
shimwell May 28, 2024
1762a3a
Changing cellRange to discrete numbers to allow more flexability when…
shimwell Jun 4, 2024
58c245e
Adding y to install (#207)
shimwell Jun 4, 2024
599fe67
Fix for #203, errors in simplify full (#206)
KBGrammer Jun 4, 2024
a3fd78f
Simplify error (#211)
KBGrammer Jun 7, 2024
e093b78
fixed versions url (#217)
shimwell Jun 13, 2024
072fde4
removed config ini code (#218)
shimwell Jun 13, 2024
47d7463
added part from alex comment (#219)
shimwell Jun 13, 2024
ec9a61b
Specify in the developer guide that openmc and pytest are needed to r…
alberto743 Jun 13, 2024
08fc43b
Update reverse to JSON and rename to CsgToCad (#229)
shimwell Jun 15, 2024
b2ab4fe
Removing old config ini file based scripts (#226)
shimwell Jun 15, 2024
3353fd3
Merge branch 'main' into dev
psauvan Jun 15, 2024
f444000
closes #213; additional guidance for install (#235)
alexvalentine94 Jun 16, 2024
7791250
Update docs badge with new action name (#238)
shimwell Jun 18, 2024
1da7672
Added version 1.2 to docs versions (#236)
shimwell Jun 18, 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
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,24 @@ jobs:
geouned_cadtocsg --help
python -c 'import geouned'
python -c 'from geouned import CadToCsg'
python -c 'from geouned.GEOReverse import reverse'
python -c 'from geouned import CsgToCad'
python -m pip install .[tests]

- name: testing package version
run: |
python -m pytest -v tests/test_version.py

- name: testing GEOUNED functionality
- name: testing GEOUNED CadToCsg functionality
run: |
python -m pytest -v tests/test_convert.py
geouned_cadtocsg -i tests/config_complete_defaults.json
geouned_cadtocsg -i tests/config_non_defaults.json
python -m pytest -v tests/test_cadtocsg.py
geouned_cadtocsg -i tests/config_cadtocsg_complete_defaults.json
geouned_cadtocsg -i tests/config_cadtocsg_non_defaults.json

- name: testing GEOUNED CsgToCad functionality
run: |
python -m pytest -v tests/test_csgtocad.py
geouned_csgtocad -i tests/config_csgtocad_complete.json
geouned_csgtocad -i tests/config_csgtocad_minimal.json

- name: install openmc
if: ${{ matrix.os == 'ubuntu-latest'}}
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/documentation_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: documentation release

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
testing:
name: Documentation
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
python-version: ["3.11"]
steps:
- name: checkout actions
uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge

- name: install dependencies
run: conda install -c conda-forge freecad -y

- name: install package
run: |
pip install --upgrade pip
pip install .[docs]
- name: Sphinx build
run: |
sphinx-build docs _build/${{ github.ref_name }}
- name: Deploy to GitHub Pages
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
# with next rlease of actions-gh-pages
# issue to allow force_orphan will be fixed
# https://github.com/peaceiris/actions-gh-pages/issues/455
# force_orphan: true
keep_files: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: documentation
name: documentation update dev

on:
pull_request:
Expand Down Expand Up @@ -41,12 +41,16 @@ jobs:
pip install .[docs]
- name: Sphinx build
run: |
sphinx-build docs _build
sphinx-build docs _build/dev
- name: Deploy to GitHub Pages
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
publish_dir: _build
# with next rlease of actions-gh-pages
# issue to allow force_orphan will be fixed
# https://github.com/peaceiris/actions-gh-pages/issues/455
# force_orphan: true
keep_files: true
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
[![CI testing](https://github.com/GEOUNED-org/GEOUNED/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/GEOUNED-org/GEOUNED/actions/workflows/ci.yml)
[![Upload Python Package](https://github.com/GEOUNED-org/GEOUNED/actions/workflows/python-publish.yml/badge.svg)](https://github.com/GEOUNED-org/GEOUNED/actions/workflows/python-publish.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
[![documentation](https://github.com/GEOUNED-org/GEOUNED/actions/workflows/documentation.yml/badge.svg)](https://github.com/GEOUNED-org/GEOUNED/actions/workflows/documentation.yml)
[![documentation release](https://github.com/GEOUNED-org/GEOUNED/actions/workflows/documentation_release.yml/badge.svg)](https://github.com/GEOUNED-org/GEOUNED/actions/workflows/documentation_release.yml)
[![PyPI](https://img.shields.io/pypi/v/geouned?&label=PyPI)](https://pypi.org/project/geouned/)

[![Anaconda-Server Badge](https://anaconda.org/conda-forge/geouned/badges/version.svg)](https://anaconda.org/conda-forge/geouned)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/geouned/badges/platforms.svg)](https://anaconda.org/conda-forge/geouned)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/geouned/badges/downloads.svg)](https://anaconda.org/conda-forge/geouned)

# GEOUNED

A tool to convert from CAD to CSG & CSG to CAD for Monte Carlo transport codes (MCNP & OpenMC).
This repository contains the implementation of the algorithm presented in the paper [GEOUNED: A new conversion tool from CAD to Monte Carlo geometry](https://doi.org/10.1016/j.net.2024.01.052).

Expand Down
37 changes: 29 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import re
import sys

sys.path.insert(0, os.path.abspath("../../src"))
Expand All @@ -22,7 +23,10 @@
author = "Juan-Pablo Catalan and Patrick Sauvan"

# The full version, including alpha/beta/rc tags
release = "1.0.1"
import geouned

version = geouned.__version__
release = geouned.__version__


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -51,17 +55,34 @@

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
# The theme to use for HTML and HTML Help pages.
# this theme supports versions https://github.com/pydata/pydata-sphinx-theme
html_theme = "pydata_sphinx_theme"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

html_context = {
"display_github": True,
}
# TODO add logo
# html_favicon = "favicon.ico"

# Version match must match the 'version' key in version_switcher.json
pattern = re.compile(r"^[0-9]+\.[0-9]+")
version_match = pattern.search(version)
if version_match:
version_match = version_match.group()
elif "dev" in version:
version_match = "dev"
else:
version_match = version

html_theme_options = {
"github_url": "https://github.com/GEOUNED-org/GEOUNED",
"switcher": {
"json_url": "https://raw.githubusercontent.com/GEOUNED-org/GEOUNED/dev/docs/version_switcher.json",
"version_match": version_match,
},
"nav_title": "Geouned",
"navbar_start": ["version-switcher", "navbar-icon-links"],
}
Loading