| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
A bug is one of:
If your issue does not fall under one of the above, it is not a bug; check out "Requesting a feature.
A bug report must have an OpenAPI document that can be used to replicate the bug. Reports without a valid document will be closed.
A feature is usually:
To request a feature:
All changes must be tested, I recommend writing the test first, then writing the code to make it pass. 100% code coverage is enforced in CI, a check will fail in GitHub if your code does not have 100% coverage. An HTML report will be added to the test artifacts in this case to help you locate missed lines.
If you think that some of the added code is not testable (or testing it would add little value), mention that in your PR and we can discuss it.
This project aims to have all "happy paths" (types of code which can be generated) covered by end-to-end tests. There are two types of these: snapshot tests, and functional tests.
Snapshot tests verify that the generated code is identical to a previously-committed set of snapshots (called a "golden record" here). They are basically regression tests to catch any unintended changes in the generator output.
In order to check code changes against the previous set of snapshots (called a "golden record" here), you can run pdm e2e. To regenerate the snapshots, run pdm regen.
There are 4 types of snapshots generated right now, you may have to update only some or all of these depending on the changes you're making. Within the end_to_end_tests directory:
These are black-box tests that verify the runtime behavior of generated code, as well as the generator's validation behavior. They are also end-to-end tests, since they run the generator as a shell command.
This can sometimes identify issues with error handling, validation logic, module imports, etc., that might be harder to diagnose via the snapshot tests, especially during development of a new feature. For instance, they can verify that JSON data is correctly decoded into model class attributes, or that the generator will emit an appropriate warning or error for an invalid spec.
See end_to_end_tests/functional_tests.
These include:
Once you've written the tests and code and run the checks, the next step is to create a pull request against the main branch of this repository. This repository uses Knope to auto-generate release notes and version numbers. This can either be done by setting the title of the PR to a [conventional commit] (for simple changes) or by adding changesets. If the changes are not documented yet, a check will fail on GitHub. The details of this check will have suggestions for documenting the change (including an example change file for changesets).
As soon as possible, your PR will be reviewed. If there are any changes requested there will likely be a bit of back and forth. Once this process is done, your changes will be merged into main and included in the next release. If you need your changes available on PyPI by a certain time, please mention it in the PR, and we'll do our best to accommodate.
| Back | FazBrowse Home | New Git URL |