Skip to content

Commit ac385c3

Browse files
authored
AI System Clarity & Code Quality Improvements
2 parents 1af0428 + 81fbfd2 commit ac385c3

49 files changed

Lines changed: 1492 additions & 2852 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Bug report
2+
description: Report a bug in LP
3+
body:
4+
5+
- type: markdown
6+
attributes:
7+
value: |
8+
When reporting bugs, please follow the guidelines in this template. This helps identify the problem precisely and thus enables contributors to fix it faster.
9+
- Write a descriptive issue title above.
10+
- The golden rule is to **always open *one* issue for *one* bug**. If you notice several bugs and want to report them, make sure to create one new issue for each of them.
11+
- Search [open issues](https://github.com/erematorg/LP/issues) and [closed issues](https://github.com/erematorg/LP/issues?q=is%3Aissue+is%3Aclosed) to ensure it has not already been reported. If you don't find a relevant match or if you're unsure, don't hesitate to **open a new issue**. The bugsquad will handle it from there if it's a duplicate.
12+
- Please always check if your issue is reproducible in the latest version – it may already have been fixed!
13+
14+
- type: textarea
15+
attributes:
16+
label: Tested versions
17+
description: |
18+
To properly fix a bug, we need to identify if the bug was recently introduced in the LP project or if it has been present from the beginning.
19+
- Specify the LP version you found the issue in. If you are using a specific build, include relevant details.
20+
- If you can, **please test earlier LP versions** and, if applicable, newer versions. Mention whether the bug is reproducible or not in the versions you tested.
21+
placeholder: |
22+
23+
- Reproducible in: v1.0, v1.1
24+
- Not reproducible in: v0.9
25+
validations:
26+
required: true
27+
28+
- type: input
29+
attributes:
30+
label: System information
31+
description: |
32+
- Specify the OS version, and when relevant, hardware information.
33+
- For issues that are likely OS-specific and/or graphics-related, please specify the CPU model and architecture.
34+
placeholder: Windows 10 - LP v1.0 - dedicated GPU NVIDIA GeForce GTX 970 - Intel Core i7-10700KF CPU @ 3.80GHz (16 Threads)
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
attributes:
40+
label: Issue description
41+
description: |
42+
Describe your issue briefly. What doesn't work, and how do you expect it to work instead?
43+
You can include images or videos with drag and drop, and format code blocks or logs with <code>```</code> tags.
44+
validations:
45+
required: true
46+
47+
- type: textarea
48+
attributes:
49+
label: Steps to reproduce
50+
description: |
51+
List the steps or sample code that reproduces the issue. Having reproducible issues is a prerequisite for contributors to be able to solve them.
52+
If you include a minimal reproduction project below, detail how to use it here.
53+
validations:
54+
required: true
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Feature request
2+
description: Suggest a new feature for LP
3+
body:
4+
5+
- type: markdown
6+
attributes:
7+
value: |
8+
When suggesting new features, please follow the guidelines in this template. This helps provide clear and actionable suggestions.
9+
- Write a descriptive title above.
10+
- Clearly describe the problem or need that this feature aims to address.
11+
- If you have multiple feature suggestions, create a new request for each to maintain clarity.
12+
- Search [open issues](https://github.com/erematorg/LP/issues) to ensure a similar feature request has not already been submitted. If you don't find a relevant match or if you're unsure, feel free to **open a new request**.
13+
14+
- type: textarea
15+
attributes:
16+
label: Problem Description
17+
description: |
18+
A clear and concise description of the problem or need that this feature aims to address.
19+
20+
- type: textarea
21+
attributes:
22+
label: Proposed Solution
23+
description: |
24+
A clear and concise description of the solution or functionality you would like to see implemented.
25+
26+
- type: textarea
27+
attributes:
28+
label: Alternatives Considered
29+
description: |
30+
Describe any alternative solutions or features you have considered or think might be viable.
31+
32+
- type: textarea
33+
attributes:
34+
label: Additional Context
35+
description: |
36+
Add any other context, examples, or use cases that provide additional information about the feature request.

.github/code_of_conduct.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
contact@eremat.org.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.
129+

.github/funding.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# These are supported funding model platforms
2+
3+
github: [erematorg]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: eremat
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
14+

crates/energy/src/electromagnetism/interactions.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
use super::fields::{ElectricField, MagneticField};
21
use bevy::prelude::*;
32

3+
use super::fields::{ElectricField, MagneticField};
4+
45
// Speed of light (in m/s) constant physical value
56
//TODO: Making this cleaner later on to make units of measure dynamic rather than admiting 1 meter = 1 meter, same for seconds and much more
67
const C: f32 = 299_792_458.0;

crates/energy/src/waves/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
pub mod oscillation;
22
pub mod propagation;
3+
4+
use bevy::prelude::Vec2;
5+
6+
/// Helper function to normalize a vector or return a fallback if the vector is too small
7+
#[inline]
8+
pub(crate) fn normalize_or(vec: Vec2, fallback: Vec2) -> Vec2 {
9+
if vec.length_squared() > f32::EPSILON {
10+
vec.normalize()
11+
} else {
12+
fallback
13+
}
14+
}
315
pub mod superposition;
416
pub mod wave_equation;
517

crates/energy/src/waves/oscillation.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
use bevy::prelude::*;
22

3-
#[inline]
4-
fn normalize_or(vec: Vec2, fallback: Vec2) -> Vec2 {
5-
if vec.length_squared() > f32::EPSILON {
6-
vec.normalize()
7-
} else {
8-
fallback
9-
}
10-
}
3+
use super::normalize_or;
114

125
/// Wave parameters for configuring wave behavior
136
#[derive(Component, Debug, Clone, Copy, Reflect)]
@@ -47,11 +40,6 @@ impl Default for WaveParameters {
4740
}
4841

4942
impl WaveParameters {
50-
/// Builder-style method for creating custom wave parameters
51-
pub fn new() -> Self {
52-
Self::default()
53-
}
54-
5543
/// Fluent interface for setting speed
5644
pub fn with_speed(mut self, speed: f32) -> Self {
5745
self.speed = speed;

crates/energy/src/waves/propagation.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
use super::oscillation::{WaveParameters, angular_frequency, wave_number};
21
use bevy::prelude::*;
32

4-
#[inline]
5-
fn normalize_or(vec: Vec2, fallback: Vec2) -> Vec2 {
6-
if vec.length_squared() > f32::EPSILON {
7-
vec.normalize()
8-
} else {
9-
fallback
10-
}
11-
}
3+
use super::normalize_or;
4+
use super::oscillation::{WaveParameters, angular_frequency, wave_number};
125

136
// Calculate modified angular frequency with dispersion
147
#[inline]

0 commit comments

Comments
 (0)