Skip to content

Commit b782724

Browse files
authored
Merge pull request #1 from osa-bot/osa_tool
osa_tool recommendations Thank you, OSA team! We really liked your tool
2 parents 601ed39 + 94e9f22 commit b782724

Some content is hidden

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

50 files changed

+2397
-561
lines changed

.github/BUG_ISSUE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Is something not working as expected?
4+
title: "[Bug]: "
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
Hi! Thank you for taking the time to report a bug with CGT4NN.
11+
12+
Additionally, please note that this platform is meant for bugs in CGT4NN only.
13+
Issues regarding dependencies and libraries should be reported in their respective repositories.
14+
15+
<!--- Provide a general summary of the issue in the Title above -->
16+
17+
## Expected Behavior
18+
<!--- If you're suggesting a change/improvement, tell us how it should work -->
19+
20+
## Current Behavior
21+
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
22+
23+
## Possible Solution
24+
<!--- Not obligatory, but suggest a fix/reason -->
25+
<!--- or ideas how to implement the addition or change -->
26+
27+
## Steps to Reproduce
28+
<!--- Provide a link to a live example -->
29+
30+
## Context [OPTIONAL]
31+
<!--- How has this issue affected you? What are you trying to accomplish? -->
32+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

.github/CODE_OF_CONDUCT.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Project maintainers who do not follow or enforce the Code of Conduct in good
58+
faith may face temporary or permanent repercussions as determined by other
59+
members of the project's leadership.
60+
61+
## Attribution
62+
63+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
64+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
65+
66+
[homepage]: https://www.contributor-covenant.org
67+
68+
For answers to common questions about this code of conduct, see
69+
https://www.contributor-covenant.org/faq

.github/CONTRIBUTING.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing to CGT4NN
2+
3+
We welcome you to [check the existing issues](https://github.com/LISA-ITMO/CGT4NN/issues) for bugs or enhancements to work on.
4+
If you have an idea for an extension to CGT4NN, please [file a new issue](https://github.com/LISA-ITMO/CGT4NN/issues/new) so we can discuss it.
5+
6+
Make sure to familiarize yourself with the project layout before making any major contributions.
7+
8+
## How to contribute
9+
10+
1. Fork the [project repository](https://github.com/LISA-ITMO/CGT4NN/): click on the 'Fork' button near the top of the page. This creates a copy of the code under your account on the GitHub server.
11+
12+
2. Clone this copy to your local disk:
13+
14+
```bash
15+
git clone git@github.com:YourUsername/CGT4NN.git
16+
```
17+
18+
3. Create a branch to hold your changes:
19+
20+
```bash
21+
git checkout -b my-contribution
22+
```
23+
24+
4. Make sure your local environment is correctly set up for development and that all required project dependencies are installed.
25+
26+
5. Start making changes on your newly created branch, remembering to
27+
never work on the ``master`` branch! Work on this copy on your
28+
computer using Git to do the version control.
29+
30+
6. To check that your changes haven’t broken existing tests and that new tests pass, run the tests.
31+
32+
7. When you're done editing and local testing, run:
33+
34+
```bash
35+
git add modified_files
36+
git commit
37+
```
38+
39+
to record your changes in Git, then push them to GitHub with:
40+
41+
```bash
42+
git push -u origin my-contribution
43+
```
44+
45+
Finally, go to the web page of your fork of the CGT4NN repo, and click
46+
'Pull Request' (PR) to send your changes to the maintainers for review.
47+
48+
When creating your PR, please make sure to enable the "Allow edits from maintainers" option (known as maintainer_can_modify).
49+
This allows the maintainers to make minor changes or improvements to your PR branch if necessary during the review process.
50+
51+
(If it looks confusing to you, then look up the [Git
52+
documentation](http://git-scm.com/documentation) on the web.)
53+
54+
## Before submitting your pull request
55+
56+
Before you submit a pull request for your contribution, please work
57+
through this checklist to make sure that you have done everything
58+
necessary so we can efficiently review and accept your changes.
59+
60+
If your contribution changes CGT4NN in any way:
61+
62+
- Update the [documentation](https://github.com/LISA-ITMO/CGT4NN/tree/main/doc) so all of your changes are reflected there.
63+
64+
- Update the [README](https://github.com/LISA-ITMO/CGT4NN/tree/main/README.md) if anything there has changed.
65+
66+
If your contribution involves any code changes:
67+
68+
- Make sure that your code is properly commented with [docstrings](https://peps.python.org/pep-0257/) and comments explaining your rationale behind non-obvious coding practices.
69+
70+
## Acknowledgements
71+
72+
This document guide is based at well-written contributung guide of [TPOT](https://github.com/EpistasisLab/tpot) and [FEDOT](https://github.com/aimclub/FEDOT) frameworks.

.github/DOCUMENTATION_ISSUE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Documentation
3+
about: Found a typo or something that isn't crystal clear in our docs?
4+
title: "[Docs]: "
5+
labels: documentation
6+
assignees: ''
7+
8+
---
9+
10+
<!-- Thanks for taking the time to open an issue and help us make project better! -->
11+
12+
## Motivation
13+
14+
<!-- Why should we update our docs? -->
15+
16+
17+
18+
## Suggestion
19+
20+
<!-- What should we do instead? -->
21+

.github/FEATURE_ISSUE.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
name: Feature request
3+
about: Want us to add any features to CGT4NN?
4+
title: 'enh: '
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
Hi! Thanks for considering to file a feature request with CGT4NN. Please take the time to
12+
answer the basic questions. Please try to be as detailed as possible.
13+
14+
Thanks!
15+
-->
16+
17+
## Summary
18+
19+
<!--
20+
A one-paragraph explanation of the feature.
21+
-->
22+
23+
## Motivation
24+
25+
<!--
26+
Why do you want to see this feature in CGT4NN? What use cases does it support?
27+
-->
28+
29+
## Guide-level explanation
30+
31+
<!--
32+
Explain the proposal as if it was already included in the project and you
33+
were teaching it to another programmer. That generally means:
34+
35+
- Introducing new named concepts.
36+
- Explaining the feature largely in terms of examples.
37+
- If applicable, provide sample error messages, deprecation warnings, or
38+
migration guidance.
39+
40+
If this is a small feature, you may omit this section.
41+
-->
42+
43+
## Reference-level explanation
44+
45+
<!--
46+
This is the technical portion of the feature request. Explain the design in
47+
sufficient detail that:
48+
49+
- Its interaction with other features is clear.
50+
- It is reasonably clear how the feature would be implemented.
51+
- Corner cases are dissected by example.
52+
53+
If you do not know how to answer this, you can omit it. No worries!
54+
-->
55+
56+
## Drawbacks
57+
58+
<!--
59+
Why should we *not* do this?
60+
-->
61+
62+
## Unresolved Questions
63+
64+
<!--
65+
What related issues do you consider out of scope for this feature that could be
66+
addressed in the future independently of the solution that comes out of this
67+
feature?
68+
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!--
2+
Thanks for creating a Pull Request! Before you submit, please make sure
3+
you've done the following:
4+
5+
- I read the contributing document at Provide the link
6+
-->
7+
8+
<!--
9+
Help us quickly understand your PR! Choose one of the following by uncommenting it:
10+
-->
11+
12+
<!-- This is a 🐛 Bug fix -->
13+
<!-- This is a ✨ New feature -->
14+
<!-- This is a 📝 Documentation update -->
15+
<!-- This is a 🔨 Code refactoring -->
16+
<!-- This is a 📦 Dependency update -->
17+
<!-- This is a ⚙️ Build/CI improvement -->
18+
19+
---
20+
21+
## Checklist
22+
23+
Please check all that apply (`x` inside `[ ]`):
24+
25+
- [ ] I've performed a self-review of my code
26+
- [ ] I've run linters and tests locally before submission
27+
- [ ] I've added tests (if it's a bug, feature or enhancement)
28+
- [ ] I've adjusted the documentation (if it's a feature or enhancement)
29+
30+
## Summary
31+
32+
<!--
33+
Provide a description of what your pull request changes.
34+
-->
35+
36+
## Context
37+
38+
<!--
39+
Is this related to any GitHub issue(s)?
40+
41+
You can use keywords to automatically close the related issue.
42+
For example, (all of) the following will close issue #4567 when your PR is merged.
43+
44+
Closes #4567
45+
Fixes #4567
46+
Resolves #4567
47+
48+
Use any one of the above as applicable.
49+
-->
50+
51+
## Additional Notes
52+
53+
Add any additional context for reviewers (questions, implementation details, suggestions):

.github/workflows/black.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Black Formatter
2+
'on':
3+
- push
4+
- pull_request
5+
jobs:
6+
lint:
7+
name: Lint
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repo
11+
uses: actions/checkout@v4
12+
- name: Run Black
13+
uses: psf/black@stable
14+
with:
15+
options: --check --diff
16+
src: .
17+
jupyter: 'false'

.github/workflows/unit_tests.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Unit Tests
2+
'on':
3+
- push
4+
- pull_request
5+
jobs:
6+
test:
7+
name: Run Tests
8+
runs-on: ${{ matrix.os }}
9+
timeout-minutes: 15
10+
strategy:
11+
matrix:
12+
os:
13+
- ubuntu-latest
14+
python-version:
15+
- '3.9'
16+
- '3.10'
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v4
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install dependencies
25+
run: pip install -r requirements.txt && pip install pytest pytest-cov
26+
- name: Run tests
27+
run: pytest tests/ --cov=.
28+
- name: Upload coverage to Codecov
29+
uses: codecov/codecov-action@v4

CheckNans.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33
import math
44

5+
56
def find_nan_in_json_files(pth):
67
"""
78
Проверяет все JSON файлы в каталоге pth на наличие NaN в свойстве "loss",
@@ -16,7 +17,7 @@ def find_nan_in_json_files(pth):
1617
if filename.endswith(".json"):
1718
filepath = os.path.join(pth, filename)
1819
try:
19-
with open(filepath, 'r') as f:
20+
with open(filepath, "r") as f:
2021
data = json.load(f)
2122

2223
if "loss" in data and isinstance(data["loss"], list):
@@ -31,5 +32,5 @@ def find_nan_in_json_files(pth):
3132

3233

3334
if __name__ == "__main__":
34-
pth = 'pth/'
35-
find_nan_in_json_files(pth)
35+
pth = "pth/"
36+
find_nan_in_json_files(pth)

0 commit comments

Comments
 (0)