Skip to content

Commit 448af60

Browse files
authored
Merge pull request #74 from smason/move-tests
Move tests to root directory
2 parents df5836d + a5d4269 commit 448af60

42 files changed

Lines changed: 1285 additions & 1509 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/auto_format_pep8.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
11+
- name: Setup Python
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: 3.7
15+
cache: 'pip'
16+
17+
- name: Install packages
18+
run: |
19+
pip install .[dev]
20+
21+
- name: Test with pytest
22+
run: |
23+
pytest --cov=csg2csg
24+
25+
- name: Lint with Ruff
26+
run: |
27+
ruff --format=github --target-version=py37 .
28+
continue-on-error: true

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ share/python-wheels/
2222
*.egg-info/
2323
.installed.cfg
2424
*.egg
25-
MANIFEST
25+
MANIFEST
26+
27+
*~

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
[![CircleCI](https://circleci.com/gh/makeclean/csg2csg.svg?style=svg)](https://circleci.com/gh/makeclean/csg2csg)
1+
[![CI test results](https://github.com/makeclean/csg2csg/actions/workflows/ci.yaml/badge.svg)](https://github.com/makeclean/csg2csg/actions/workflows/ci.yaml)
32

43
# csg2csg
54
A tool to translate common Monte Carlo geometry formats between each other.

conftest.py

Whitespace-only changes.

csg2csg/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

csg2csg/Input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def find_cell(self, cell_id):
4646
# read the whole file into a big list for further
4747
# procesing
4848
def read(self):
49-
with open(self.filename, "rU", errors="replace") as f:
49+
with open(self.filename, errors="replace") as f:
5050
self.file_lines = f.readlines()
5151

5252
# sometimes truely monstrous people stuff weird

csg2csg/MaterialCard.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,16 @@ class MaterialCard(Card):
9393
approach is taken here for maximal compability amongst codes.
9494
"""
9595

96-
material_name = ""
97-
material_number = 0
98-
composition_dictionary = {}
99-
xsid_dictionary = {}
100-
density = 0
101-
mat_data = 0
102-
material_colour = 0
103-
10496
# constructor
10597
def __init__(self, material_number=0, card_string=""):
10698
Card.__init__(self, card_string)
99+
self.material_name = ""
100+
self.material_number = 0
101+
self.composition_dictionary = {}
102+
self.xsid_dictionary = {}
103+
self.density = 0
104+
self.mat_data = 0
105+
self.material_colour = 0
107106
self.material_number = material_number
108107
self.mat_data = MaterialData()
109108

csg2csg/test/UnitTestMCNPCell.py

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)