-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit test covering all v2.0.1 datatypes and enums #684
Changes from 4 commits
68e048b
ef88e26
efbf7b1
ef2907a
e53d73c
051aa93
26b35b8
1d51685
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
### Changes included in this PR | ||
|
||
*(Bug fix, feature, docs update, ...)* | ||
|
||
### Current behavior | ||
|
||
*Link to an open issue here...* | ||
|
||
### New behavior | ||
|
||
*If this is a feature change, describe the new behavior* | ||
|
||
### Impact | ||
|
||
*Describe breaking changes, including changes a users might need to make due to this PR* | ||
|
||
### Checklist | ||
|
||
1. [ ] Does your submission pass the existing tests? | ||
2. [ ] Are there new tests that cover these additions/changes? | ||
3. [ ] Have you linted your code locally before submission? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, 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 both within project spaces and in public spaces | ||
when an individual is representing the project or its community. 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 {{ email }}. 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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
## Contributing | ||
|
||
[fork]: /fork | ||
[pr]: /compare | ||
[style]: https://standardjs.com/ | ||
[code-of-conduct]: CODE_OF_CONDUCT.md | ||
|
||
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. | ||
|
||
Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms. | ||
|
||
## Issues and PRs | ||
|
||
If you have suggestions for how this project could be improved, or want to report a bug, open an issue! We'd love all and any contributions. If you have questions, too, we'd love to hear them. | ||
|
||
We'd also love PRs. If you're thinking of a large PR, we advise opening up an issue first to talk about it, though! Look at the links below if you're not sure how to open a PR. | ||
|
||
Work in Progress pull requests are also welcome to get feedback early on, or if there is something blocked you. | ||
|
||
## Submitting a pull request | ||
|
||
1. [Fork][fork] and clone the repository. | ||
1. Create a new branch: `git checkout -b my-branch-name`. | ||
1. Configure and install the dependencies: `poetry install`. | ||
1. Make sure the tests pass on your machine: `make install & make tests` | ||
1. Make your change, add tests, and make sure the tests still pass. | ||
1. Push to your fork and [submit a pull request][pr] and complete the information in the pull request template. | ||
|
||
## Linting requirements | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A migration to ruff should be considered. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'm not as familiar with ruff as black, isort and flake8. could you open an issue and give some justification? i'd be happy to switch over if there's enough support from the community. apologies for the confusion, i removed these files as they are really part of #681. could you add addition comments there? |
||
|
||
using `make install & make tests` will also run the following linters: | ||
|
||
- [Black: The uncompromising Python code formatter](https://black.readthedocs.io/en/stable/) | ||
- [isort your imports, so you don't have to](https://pycqa.github.io/isort/) | ||
- [flake8: Your Tool For Style Guide Enforcement](https://flake8.pycqa.org/en/latest/) | ||
|
||
## Resources | ||
|
||
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) | ||
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) | ||
- [GitHub Help](https://help.github.com) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Security Policy | ||
|
||
This document outlines security procedures and general policies for this OCPP project. | ||
|
||
## Supported Versions | ||
|
||
The currently supported versions of this OCPP project are: | ||
|
||
| Version | Supported | | ||
|----------| ------------------ | | ||
| 2.0.0 | :white_check_mark: | | ||
| 0.26.0 | :white_check_mark: | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No version 1.x.x has been released? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not quite yet : ( there's a release candidate pending since february: https://github.com/mobilityhouse/ocpp/releases probably should remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. apologies for the confusion, i removed these files as they are really part of #681 |
||
| < 0.26.0 | :x: | | ||
|
||
## Reporting a Vulnerability | ||
|
||
Please include the requested information listed below (as much as you can provide) to help | ||
us better understand the nature and scope of the possible issue: | ||
|
||
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) | ||
- Full paths of source file(s) related to the manifestation of the issue | ||
- The location of the affected source code (tag/branch/commit or direct URL) | ||
- Any special configuration required to reproduce the issue | ||
- Step-by-step instructions to reproduce the issue | ||
- Proof-of-concept or exploit code (if possible) | ||
- Impact of the issue, including how an attacker might exploit the issue | ||
|
||
This information will help us triage your report more quickly. | ||
|
||
## Comments on this Policy | ||
|
||
If you have suggestions on how this process could be improved please submit a | ||
pull request. Thanks! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Support | ||
|
||
This article explains where to get help with this OCPP project. | ||
Please read through the following guidelines. | ||
|
||
> 👉 **Note**: before participating in our community, please read our | ||
> [code of conduct][coc]. | ||
> By interacting with this repository, organization, or community you agree to | ||
> abide by its terms. | ||
|
||
## Asking quality questions | ||
|
||
Questions can go to [GitHub discussions][chat]. | ||
|
||
Help us help you! | ||
Spend time framing questions and add links and resources. | ||
Spending the extra time up front can help save everyone time in the long run. | ||
Here are some tips: | ||
|
||
* Search to find out if a similar question has been asked or a similar issue has been reported | ||
* Check to see if a PR is already in progress for the issue you want to raise | ||
* Try to define what you need help with: | ||
* Is there something in particular you want to do? | ||
* What problem are you encountering and what steps have you taken to try | ||
and fix it? | ||
* Is there a concept you don’t understand? | ||
* Provide sample code, such as a [CodeSandbox][cs] or video, if possible | ||
* Screenshots can help, but if there’s important text such as code or error | ||
messages in them, please also provide those as text | ||
* The more time you put into asking your question, the better we can help you | ||
|
||
## Contributions | ||
|
||
See [`contributing.md`][contributing] on how to contribute. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -454,7 +454,7 @@ class IdTokenType: | |
""" | ||
|
||
id_token: str | ||
type: enums.IdTokenType | ||
type: enums.IdTokenEnumType | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what's the value add of renaming enums There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Compliance with the OCPP specs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cross Checked this. This makes me question the whether the rest of the enums and datatypes are compliant or not. Will take a look at this soon. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did a double check when I came across this one and all of the others seemed compliant. But another set of eyes is always appreciated! |
||
additional_info: Optional[List[AdditionalInfoType]] = None | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A migration to
task
should be considered.make
is not really a build tool the python community use.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would agree... sort of.
make
is so ubiquitous; I've seen many (legitimate) uses ofmake
and python.for the time being with this PR, was trying to document current process : )
if you think it's important, i could get behind it. could you create an issue ticket so that the community can have the discussion about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apologies for the confusion, i removed these files as they are really part of #681
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jerome-benoit which
task
library were you referring to? there's pytask. but also snakemake, scons, invoke, bitbake all of which are python friendly, although probably way more functionality than is needed here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taskpy
. TheMakefile
is only used here to run ordered shell command(s), so is pointless.taskpy
can do the same without requiring another external tool.