Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit e71f131d authored by Dorian Turba's avatar Dorian Turba
Browse files

add pymarkdown

parent 2221cd4d
No related branches found
No related tags found
No related merge requests found
# Merge Request (MR) Template
## Summary
Provide a brief summary of the changes introduced by this merge request.
## Issue Link
* Related Issue: #[issue_number]
## Type of Change
* [ ] New feature
* [ ] Bugfix
* [ ] Code quality improvements
* [ ] Dependency upgrades
* [ ] Refactoring
* [ ] Other: [Please specify]
## Automation Done
Check the passing the tests you've performed to ensure that the change works as expected.
* [ ] Pre-commit hooks passing
* [ ] Automated tests passing in local
* [ ] Automated tests passing in CI
## Checklist
* [ ] My code follows the project's style guidelines.
* [ ] I have commented my code, particularly in hard-to-understand areas.
* [ ] I have made corresponding changes to the documentation.
* [ ] Pre-commit, local automated tests and CI automated tests passed.
* [ ] I have checked for any regression impacts and ensured they are addressed.
## Additional Notes
(Optional) Add any additional information or context about the merge request here.
repos:
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
args: [--check, --diff, --quiet]
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [--check-only]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
exclude: ^tests/
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
args: [ --check, --diff, --quiet ]
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [ --check-only ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
exclude: ^tests/
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.13.3
hooks:
- id: pymarkdown
# Changes from [0.0.3][0.0.3] to [0.1.0][0.1.0]
# Changelog
## Changes from [0.0.3][0.0.3] to [0.1.0][0.1.0]
- ➕ add support for async session makers
# Changes from [0.0.2][0.0.2] to [0.0.3][0.0.3]
## Changes from [0.0.2][0.0.2] to [0.0.3][0.0.3]
- ➕ Session.commit() is now a true commit, FSM will create a transaction per test and rollback the
transaction as teardown
- ➕ Session.commit() is now a true commit, FSM will create a transaction per test and
rollback the transaction as teardown
- 📝 a CODE_OF_CONDUCT.md
- 📝 more info in CONTRIBUTING.md
- ⚙️ pytest fixtures for shorter tests
- ⚙️ more tests
# Changes from [0.0.1][0.0.1] to [0.0.2][0.0.2]
## Changes from [0.0.1][0.0.1] to [0.0.2][0.0.2]
- 📝 this CHANGELOG.md
- 📝 more info in CONTRIBUTING.md and README.md
......@@ -20,8 +22,8 @@
- 📝 add a MERGE_REQUEST_TEMPLATE.md
- ➕ Session.commit() isn't forbidden anymore, but behavior is changed to only perform a
Session.flush()
- ⚙️ quality testing: tox won't try to test with py312 anymore until fake_session_maker is py312
compatible
- ⚙️ quality testing: tox won't try to test with py312 anymore until fake_session_maker
is py312 compatible
[0.0.1]: https://lab.frogg.it/dorianturba/fake_session_maker/-/releases/0.0.1
......@@ -29,4 +31,4 @@
[0.0.3]: https://lab.frogg.it/dorianturba/fake_session_maker/-/releases/0.0.3
[0.1.0]: https://lab.frogg.it/dorianturba/fake_session_maker/-/releases/0.1.0
\ No newline at end of file
[0.1.0]: https://lab.frogg.it/dorianturba/fake_session_maker/-/releases/0.1.0
# Contributor Covenant Code of Conduct
## Our Pledge
......@@ -60,10 +59,10 @@ representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
reported to the community leaders responsible for enforcement at
[contact.5rgbj@8shield.net](mailto:contact.5rgbj@8shield.net).
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
......@@ -127,7 +126,11 @@ For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
......@@ -6,92 +6,107 @@ First off, thanks for taking the time to contribute!
This file is for:
- Project owners - creators and maintainers of the project
- Project contributors - users of the project who want to know items they're welcome to tackle, and
tact they need in navigating the project/respecting those involved with the project
- Project consumers - users who want to build off the project to create their own project
* Project owners - creators and maintainers of the project
* Project contributors - users of the project who want to know items they're welcome to
tackle, and tact they need in navigating the project/respecting those involved with
the project
* Project consumers - users who want to build off the project to create their own
project
## Code of Conduct
Please note that this project is released with a [Contributor Code of Conduct](https://lab.frogg.it/dorianturba/fake_session_maker/-/blob/main/CODE_OF_CONDUCT.md).
Please note that this project is released with
a [Contributor Code of Conduct](https://lab.frogg.it/dorianturba/fake_session_maker/-/blob/main/CODE_OF_CONDUCT.md).
By participating in this project you agree to abide by its terms.
## How Can I Contribute?
### Reporting Bugs
This section guides you through submitting a bug report for fake_session_maker. Following these
guidelines helps maintainers and the community understand your report.
This section guides you through submitting a bug report for fake_session_maker.
Following these guidelines helps maintainers and the community understand your report.
- Use the [issue search][issue search] — check if the issue has already been reported.
- Check if the issue has been fixed — try to reproduce it using the latest `main` branch in the
repository.
- Isolate the problem — ideally create a reduced test case.
* Use the [issue search][issue search] — check if the issue has already been reported.
* Check if the issue has been fixed — try to reproduce it using the latest `main` branch
in the repository.
* Isolate the problem — ideally create a reduced test case.
Please provide as much detail as you can. This helps us resolve the issue more quickly.
### Suggesting Enhancements
This section guides you through submitting an enhancement suggestion for fake_session_maker, which
can range from small improvements in existing functionality to proposing new features.
This section guides you through submitting an enhancement suggestion for
fake_session_maker, which can range from small improvements in existing functionality to
proposing new features.
When you are creating an enhancement suggestion, please:
#### 1. Check Existing Enhancements
Before creating an enhancement suggestion, please check the [issue tracker][issue search] to see if
a similar suggestion has already been made. If it exists and is still open, add a comment to the
existing issue instead of opening a new one.
Before creating an enhancement suggestion, please check
the [issue tracker][issue search] to see if a similar suggestion has already been made.
If it exists and is still open, add a comment to the existing issue instead of opening a
new one.
#### 2. Provide a Clear Summary
When you create your enhancement suggestion, provide a clear and concise summary in the title of the
issue to help us understand the scope of the suggestion.
When you create your enhancement suggestion, provide a clear and concise summary in the
title of the issue to help us understand the scope of the suggestion.
#### 3. Describe Your Suggestion
In the issue description, explain the following:
- **What is the current behavior?** Describe what happens in the software currently.
- **What would you like to suggest?** Describe what you want to happen instead.
- **What are the potential benefits of this change?** Describe the benefits of the change you
* **What is the current behavior?** Describe what happens in the software currently.
* **What would you like to suggest?** Describe what you want to happen instead.
* **What are the potential benefits of this change?** Describe the benefits of the
change you
suggest.
- **Are there any potential drawbacks?** While every change has potential downsides, it's important
* **Are there any potential drawbacks?** While every change has potential downsides,
it's important
to try to anticipate them if possible.
You may also want to include additional details, such as how the change might be implemented.
You may also want to include additional details, such as how the change might be
implemented.
Your detailed description helps us to understand your ideas clearly, consider them thoughtfully, and
Your detailed description helps us to understand your ideas clearly, consider them
thoughtfully, and
hopefully integrate them into fake_session_maker.
### Merge Requests
The process described here has several goals:
- Maintain fake_session_maker's quality
- Fix problems that are important to users
- Engage the community in working toward the best possible fake_session_maker
- Enable a sustainable system for fake_session_maker's maintainers to review contributions
* Maintain fake_session_maker's quality
* Fix problems that are important to users
* Engage the community in working toward the best possible fake_session_maker
* Enable a sustainable system for fake_session_maker's maintainers to review
contributions
Please follow these steps to have your contribution considered by the maintainers:
1. Use the [MERGE_REQUEST_TEMPLATE.md][merge request template], or one of the other templates
1. Use the [MERGE_REQUEST_TEMPLATE.md][merge request template], or one of the other
templates
provided, to describe the changes in your merge request
2. After you submit your merge request, verify that all status checks are passing
3. If a status check is failing, and you believe that the failure is unrelated to your change,
please leave a comment on the pull request explaining why you believe the failure is unrelated.
3. If a status check is failing, and you believe that the failure is unrelated to your
change,
please leave a comment on the pull request explaining why you believe the failure is
unrelated.
### Quality Standards
#### Style Guide
Please adhere to
the [PEP 8 -- Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008/) to maintain
the [PEP 8 -- Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008/) to
maintain
consistency in the codebase.
#### Pre-commit hooks
Please use the pre-commit hooks provided in this repository to maintain consistency in the codebase.
Please use the pre-commit hooks provided in this repository to maintain consistency in
the codebase.
```bash
pip install -e .[QUALITY]
......@@ -106,10 +121,11 @@ pre-commit run --all-files
This will run the following hooks:
- `black`
- `flake8`
- `isort`
- `mypy`
* `black`
* `flake8`
* `isort`
* `mypy`
* `pymarkdown`
##### Fixing quality issues
......@@ -121,6 +137,7 @@ isort .
```
#### Testing
##### PostgreSQL
PostgreSQL is required to run the tests because of the async property of async_fsm.
......@@ -153,24 +170,26 @@ Run tests using `pytest` in the main directory.
pytest
```
# Generating distribution archives
## Generating distribution archives
### Build archive
## Build archive
```bash
pip install --upgrade pip
pip install -r build_requirements.txt
python -m build
```
# Share archive
## Share archive
```bash
pip install --upgrade twine
python -m twine upload --repository pypi dist/* --skip-existing
```
You will be prompted for a username and password. For the username, use __token__. For the password, use the token value, including the pypi- prefix.
You will be prompted for a username and password. For the username, use __token__. For
the password, use the token value, including the pypi- prefix.
[issue search]: https://lab.frogg.it/search?project_id=980&repository_ref=main&scope=issues
[merge request template]: https://lab.frogg.it/dorianturba/fake_session_maker/-/blob/main/.gitlab/merge_request_templates/MERGE_REQUEST_TEMPLATE.md
\ No newline at end of file
[merge request template]: https://lab.frogg.it/dorianturba/fake_session_maker/-/blob/main/.gitlab/merge_request_templates/MERGE_REQUEST_TEMPLATE.md
<p align="center">
<a href="https://lab.frogg.it/dorianturba/fake_session_maker/-/releases" target="_blank">
<img src="https://lab.frogg.it/dorianturba/fake_session_maker/-/badges/release.svg?order_by=release_at" alt="Latest Release">
</a>
<a href="https://lab.frogg.it/dorianturba/fake_session_maker/-/pipelines" target="_blank">
<img src="https://lab.frogg.it/dorianturba/fake_session_maker/badges/main/pipeline.svg">
</a>
</p>
<p align="center">
<a href="https://pypi.org/project/fake_session_maker" target="_blank">
<img src="https://img.shields.io/pypi/pyversions/fake_session_maker.svg" alt="Supported Python versions">
</a>
<a href="https://pycqa.github.io/isort/" target="_blank">
<img src="https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336" alt="Imports: isort">
</a>
<a href="https://pypi.org/project/fake_session_maker" target="_blank">
<img src="https://img.shields.io/pypi/dm/fake_session_maker" alt="PyPI - Downloads">
</a>
</p>
# fake_session_maker
[![Latest Release](https://lab.frogg.it/dorianturba/fake_session_maker/-/badges/release.svg?order_by=release_at)](https://lab.frogg.it/dorianturba/fake_session_maker/-/releases)
[![Pipeline](https://lab.frogg.it/dorianturba/fake_session_maker/badges/main/pipeline.svg)](https://lab.frogg.it/dorianturba/fake_session_maker/-/pipelines)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/fake_session_maker.svg)](https://pypi.org/project/fake_session_maker)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/fake_session_maker)](https://pypi.org/project/fake_session_maker)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://lab.frogg.it/dorianturba/fake_session_maker/-/blob/main/LICENSE)
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Markdown: pymarkdown](https://img.shields.io/badge/%20markdown-pymarkdown-%231674b1?style=flat&labelColor=ef8336)](https://github.com/jackdewinter/pymarkdown)
The `fake_session_maker` is a SQLAlchemy and Pytest-based package designed to facilitate
database testing by replacing a classic SQLAlchemy `SessionMaker` context manager.
......@@ -103,4 +91,4 @@ If you want to run the tests locally, you can follow instructions here:
Distributed under the MIT License.
See [LICENSE](Lhttps://lab.frogg.it/dorianturba/fake_session_maker/-/blob/main/LICENSE)
for more information.
\ No newline at end of file
for more information.
......@@ -95,4 +95,8 @@ legacy_tox_ini = """
[testenv:mypy]
deps = mypy
commands = mypy src
"""
\ No newline at end of file
"""
[tool.pymarkdown]
strict-config = true
plugins.line-length.line_length = 88
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment