Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fileparser2 #26

Merged
merged 42 commits into from
Oct 25, 2023
Merged

Fileparser2 #26

merged 42 commits into from
Oct 25, 2023

Conversation

barisccolak
Copy link
Owner

#18 rule defined, #20 rule defined,
#14 rule formatting completed,
#22 rule class is defined,
#17 documentation is started.
Ruff check and Black check completed.

…rule class is defined, #17 documentation is started. Ruff check and black check completed.
@barisccolak barisccolak added documentation Improvements or additions to documentation rule Adds a new YASKAWA rule labels Oct 11, 2023
@barisccolak barisccolak self-assigned this Oct 11, 2023
@barisccolak barisccolak reopened this Oct 11, 2023
@gitguardian
Copy link

gitguardian bot commented Oct 17, 2023

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id Secret Commit Filename
- OpenSSH Private Key 3b46c30 testmodule/�� View secret
- OpenSSH Private Key 55a4717 testmodule/�� View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

Copy link
Collaborator

@CagtayFabry CagtayFabry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General changes:

  • add type hints for all function arguments and return values. You already list the argument types in the function docstrings which is great! In the latest Python versions it is usually recommended to define them as type hints which should be enough, you can remove them from the docstrings.
  • remove the example files in the files directory but keep a select few (maybe 5 files) that you think are interesting

.github/workflows/githubaction.yml Outdated Show resolved Hide resolved

- name: Run Python script on JOB files
run: |
find . -name "*.JBI" -exec python testmodule/fileparser.py {} \;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you have implemented that user can pass a folder as argument, why not use that command instead of the complex bash syntax?

.pre-commit-config.yaml Outdated Show resolved Hide resolved
README2.md Outdated
Comment on lines 6 to 7
### Installation

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installation should list how to install the python package, e.g. pip install .

README2.md Outdated
Comment on lines 9 to 11
from testmodule import JobFile

JobFile(`EXAMPLE_FILE.JBI`)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user guide section should answer the following question:

  1. How to I check the rules for a single .JBI file?
  2. How do I check the rules for all files in a folder?

testmodule/fileparser.py Outdated Show resolved Hide resolved
testmodule/fileparser.py Outdated Show resolved Hide resolved
testmodule/fileparser.py Outdated Show resolved Hide resolved
testmodule/fileparser.py Outdated Show resolved Hide resolved
testmodule/fileparser.py Outdated Show resolved Hide resolved
@barisccolak barisccolak merged commit b455372 into main Oct 25, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Improvements or additions to documentation rule Adds a new YASKAWA rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants