Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
35 changes: 0 additions & 35 deletions .circleci/config.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/auto_format_pep8.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.7
cache: 'pip'

- name: Install packages
run: |
pip install .[dev]

- name: Test with pytest
run: |
pytest --cov=csg2csg

- name: Lint with Ruff
run: |
ruff --format=github --target-version=py37 .
continue-on-error: true
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
MANIFEST

*~
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

[![CircleCI](https://circleci.com/gh/makeclean/csg2csg.svg?style=svg)](https://circleci.com/gh/makeclean/csg2csg)
[![CI test results](https://github.com/makeclean/csg2csg/actions/workflows/ci.yaml/badge.svg)](https://github.com/makeclean/csg2csg/actions/workflows/ci.yaml)

# csg2csg
A tool to translate common Monte Carlo geometry formats between each other.
Expand Down
Empty file added conftest.py
Empty file.
1 change: 0 additions & 1 deletion csg2csg/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion csg2csg/Input.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def find_cell(self, cell_id):
# read the whole file into a big list for further
# procesing
def read(self):
with open(self.filename, "rU", errors="replace") as f:
with open(self.filename, errors="replace") as f:
self.file_lines = f.readlines()

# sometimes truely monstrous people stuff weird
Expand Down
15 changes: 7 additions & 8 deletions csg2csg/MaterialCard.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,16 @@ class MaterialCard(Card):
approach is taken here for maximal compability amongst codes.
"""

material_name = ""
material_number = 0
composition_dictionary = {}
xsid_dictionary = {}
density = 0
mat_data = 0
material_colour = 0

# constructor
def __init__(self, material_number=0, card_string=""):
Card.__init__(self, card_string)
self.material_name = ""
self.material_number = 0
self.composition_dictionary = {}
self.xsid_dictionary = {}
self.density = 0
self.mat_data = 0
self.material_colour = 0
self.material_number = material_number
self.mat_data = MaterialData()

Expand Down
86 changes: 0 additions & 86 deletions csg2csg/test/UnitTestMCNPCell.py

This file was deleted.

47 changes: 0 additions & 47 deletions csg2csg/test/UnitTestMCNPFormatter.py

This file was deleted.

Loading