Skip to content

Commit

Permalink
Merge pull request #124 from fusion-energy/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
shimwell authored Oct 19, 2021
2 parents 15a0734 + d630204 commit bee4f04
Show file tree
Hide file tree
Showing 14 changed files with 158 additions and 2 deletions.
77 changes: 77 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributing to Paramak

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:


## Code of Conduct

This project and everyone participating in it is governed by the [Paramak Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.

## Resources

- [GitHub Repository](https://github.com/fusion-energy/paramak)
- [Documentation](http://paramak.readthedocs.io/en/latest)

## How to Report Bugs

Paramak is hosted on GitHub and all bugs are reported and tracked through the
[Issues](https://github.com/fusion-energy/paramak/issues) listed on GitHub.

## How to Suggest Enhancements

We welcome suggestions for new features or enhancements to the code and
encourage you to submit them as Issues on GitHub.

## How to Submit Changes

All changes to Paramak happen through pull requests. We use a
[simplified](https://thomaspoignant.medium.com/simple-git-flow-who-works-dac82430e484)
version of the original [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/) workflow that avoids release branches.

## Code Style

We have automated PEP formatting of commits using GitHub actions so don't be
surprised if your code gets reformatted when pushing to the repository.


## Testing

We have a handful of tests that run on pull requests and new pull requests are
expected to include tests to show that the feature works. We suggest running
the tests locally before submitting a pull request.
8 changes: 6 additions & 2 deletions paramak/parametric_shapes/extruded_circle_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,23 @@ def __init__(
rotation_angle: Optional[float] = 360,
extrude_both: Optional[bool] = True,
color: Optional[Tuple[float, float, float, Optional[float]]] = (0.984, 0.603, 0.6),
name: str = 'extrudecircleshape',
**kwargs
):

super().__init__(
color=color,
name=name,
**kwargs
)

self.radius = radius
self.distance = distance
self.radius = radius
self.extrusion_start_offset = extrusion_start_offset
self.rotation_angle = rotation_angle
self.extrude_both = extrude_both
self.extrusion_start_offset = extrusion_start_offset
self.color = color
self.name = name

@property
def radius(self):
Expand Down
4 changes: 4 additions & 0 deletions paramak/parametric_shapes/extruded_mixed_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,21 @@ def __init__(
rotation_angle: Optional[float] = 360.0,
extrusion_start_offset: Optional[float] = 0.0,
color: Optional[Tuple[float, float, float, Optional[float]]] = (0.2, 0.627, 0.172),
name: str = 'extrudemixedshape',
**kwargs
):

super().__init__(
color=color,
name=name,
**kwargs
)
self.distance = distance
self.extrude_both = extrude_both
self.rotation_angle = rotation_angle
self.extrusion_start_offset = extrusion_start_offset
self.color = color
self.name = name

@property
def distance(self):
Expand Down
2 changes: 2 additions & 0 deletions paramak/parametric_shapes/extruded_spline_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ def __init__(
self,
distance: float,
color: Optional[Tuple[float, float, float, Optional[float]]] = (0.984, 0.603, 0.6),
name: str = 'extrudesplineshape',
**kwargs
):

super().__init__(
distance=distance,
connection_type="spline",
color=color,
name=name,
**kwargs
)
2 changes: 2 additions & 0 deletions paramak/parametric_shapes/extruded_straight_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ def __init__(
self,
distance: float,
color: Optional[Tuple[float, float, float, Optional[float]]] = (1.0, 0.498, 0.0),
name: str = 'extrudestraightshape',
**kwargs
):

super().__init__(
distance=distance,
connection_type="straight",
color=color,
name=name,
**kwargs
)
4 changes: 4 additions & 0 deletions paramak/parametric_shapes/rotate_circle_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@ def __init__(
radius: float,
rotation_angle: Optional[float] = 360.0,
color: Optional[Tuple[float, float, float, Optional[float]]] = (1., 1., 0.6),
name: str = 'rotatecircleshape',
**kwargs
):

super().__init__(
color=color,
name=name,
**kwargs
)
self.radius = radius
self.rotation_angle = rotation_angle
self.color = color
self.name = name

@property
def rotation_angle(self):
Expand Down
4 changes: 4 additions & 0 deletions paramak/parametric_shapes/rotate_mixed_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ def __init__(
self,
rotation_angle: Optional[float] = 360.,
color: Optional[Tuple[float, float, float, Optional[float]]] = (0.121, 0.47, 0.705),
name: str = 'rotatemixedshape',
**kwargs
):

super().__init__(
color=color,
name=name,
**kwargs
)
self.rotation_angle = rotation_angle
self.color = color
self.name = name

@property
def rotation_angle(self):
Expand Down
2 changes: 2 additions & 0 deletions paramak/parametric_shapes/rotate_spline_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ def __init__(
self,
rotation_angle: Optional[float] = 360.,
color: Optional[Tuple[float, float, float, Optional[float]]] = (0.415, 0.239, 0.603),
name: str = 'rotatesplineshape',
**kwargs
):

super().__init__(
rotation_angle=rotation_angle,
color=color,
connection_type="spline",
name=name,
**kwargs
)
2 changes: 2 additions & 0 deletions paramak/parametric_shapes/rotate_straight_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ def __init__(
self,
rotation_angle: Optional[float] = 360.,
color: Optional[Tuple[float, float, float, Optional[float]]] = (0.89, 0.101, 0.109),
name: str = 'rotatestraightshape',
**kwargs
):

super().__init__(
rotation_angle=rotation_angle,
color=color,
connection_type="straight",
name=name,
**kwargs
)
5 changes: 5 additions & 0 deletions paramak/parametric_shapes/sweep_circle_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,24 @@ def __init__(
path_workplane: Optional[str] = "XZ",
force_cross_section: Optional[bool] = False,
color: Optional[Tuple[float, float, float, Optional[float]]] = (0.651, 0.808, 0.89),
name: str = 'sweepcircleshape',
**kwargs
):

super().__init__(
workplane=workplane,
color=color,
name=name,
**kwargs
)

self.radius = radius
self.path_points = path_points
self.workplane = workplane
self.path_workplane = path_workplane
self.force_cross_section = force_cross_section
self.color = color
self.name = name

@property
def radius(self):
Expand Down
5 changes: 5 additions & 0 deletions paramak/parametric_shapes/sweep_mixed_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,23 @@ def __init__(
path_workplane: Optional[str] = "XZ",
force_cross_section: Optional[bool] = False,
color: Optional[Tuple[float, float, float, Optional[float]]] = (0.792, 0.698, 0.839),
name: str = 'sweepmixedshape',
**kwargs
):

super().__init__(
workplane=workplane,
color=color,
name=name,
**kwargs
)

self.path_points = path_points
self.workplane = workplane
self.path_workplane = path_workplane
self.force_cross_section = force_cross_section
self.color = color
self.name = name

@property
def path_points(self):
Expand Down
2 changes: 2 additions & 0 deletions paramak/parametric_shapes/sweep_spline_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(
path_workplane: Optional[str] = "XZ",
force_cross_section: Optional[bool] = False,
color: Optional[Tuple[float, float, float, Optional[float]]] = (0.992, 0.749, 0.435),
name: str = 'sweepsplineshape',
**kwargs
):

Expand All @@ -39,5 +40,6 @@ def __init__(
connection_type="spline",
force_cross_section=force_cross_section,
color=color,
name=name,
**kwargs
)
2 changes: 2 additions & 0 deletions paramak/parametric_shapes/sweep_straight_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(
path_workplane: Optional[str] = "XZ",
force_cross_section: Optional[bool] = False,
color: Optional[Tuple[float, float, float, Optional[float]]] = (0.698, 0.8745, 0.541),
name: str = 'sweepstraightshape',
**kwargs
):

Expand All @@ -38,5 +39,6 @@ def __init__(
connection_type="straight",
force_cross_section=force_cross_section,
color=color,
name=name,
**kwargs
)

0 comments on commit bee4f04

Please sign in to comment.