Skip to content
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

Feature/remove isort and black (#87) #88

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ jobs:
# - "3.8"
# - "3.7"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# cache: 'pip'
# cache-dependency-path: '**/setup.py'
- name: Install detect-secrets
run: pip install --no-cache-dir detect-secrets doc8 isort==5.11.5
- name: Run pre-commit
uses: pre-commit/[email protected].0
uses: pre-commit/[email protected].1

# *************************************
# *********** Additional tests ********
Expand Down Expand Up @@ -63,9 +63,9 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y wkhtmltopdf libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 poppler-utils
- name: Clean-up
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# cache: 'pip'
Expand Down Expand Up @@ -109,9 +109,9 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y wkhtmltopdf libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 poppler-utils
- name: Clean-up
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# cache: 'pip'
Expand Down Expand Up @@ -172,9 +172,9 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y wkhtmltopdf libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 poppler-utils
- name: Clean-up
run: sudo apt clean && sudo apt autoclean && sudo rm -rf /tmp/* && sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# cache: 'pip'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ codebin/
/examples/tmp/
/examples/logs/
/builddocs/
/docs/_build/
/builddocs.zip
/build/
/dist/
Expand Down
36 changes: 18 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
exclude: "^docs/|/migrations/"
default_stages: [ commit, push ]
default_stages: [ pre-commit, pre-push ]
default_language_version:
python: python3

Expand All @@ -20,7 +20,7 @@ repos:
args: []

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: "data/"
Expand All @@ -32,29 +32,29 @@ repos:
- id: debug-statements
- id: check-merge-conflict

- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
name: black
files: .
args: [ "--config", "pyproject.toml" ]
# - repo: https://github.com/psf/black
# rev: 24.4.2
# hooks:
# - id: black
# name: black
# files: .
# args: [ "--config", "pyproject.toml" ]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort
files: .
args: [ "--settings-path", "pyproject.toml", "--profile=black" ]
# - repo: https://github.com/pycqa/isort
# rev: 5.13.2
# hooks:
# - id: isort
# name: isort
# files: .
# args: [ "--settings-path", "pyproject.toml", "--profile=black" ]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.4.4
rev: v0.7.3
hooks:
- id: ruff
name: lint
files: .
args: [ "--config", "pyproject.toml" ]
args: [ "--config", "pyproject.toml", "--fix" ]

# - repo: https://github.com/asottile/pyupgrade
# rev: v3.2.0
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ are used for versioning (schema follows below):
0.3.4 to 0.4).
- All backwards incompatible changes are mentioned in this document.

0.17.14
-------
2024-11-14

- Minor fixes.

0.17.13
-------
2024-10-30
Expand Down
19 changes: 11 additions & 8 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Contributor guidelines
.. _doc8: https://doc8.readthedocs.io/
.. _ruff: https://beta.ruff.rs/docs/
.. _pip-tools: https://pip-tools.readthedocs.io/
.. _uv: https://docs.astral.sh/uv/
.. _issues: https://github.com/barseghyanartur/faker-file/issues
.. _discussions: https://github.com/barseghyanartur/faker-file/discussions
.. _pull request: https://github.com/barseghyanartur/faker-file/pulls
Expand Down Expand Up @@ -38,23 +39,25 @@ standards.

Code standards
--------------
`black`_, `isort`_, `ruff`_ and `doc8`_ will be automatically triggered by
`pre-commit`_. Still, if you want to run checks manually:
`ruff`_ and `doc8`_ will be automatically triggered by `pre-commit`_.

`ruff`_ is configured to do the job of `black`_ and `isort`_ as well, so
all the standards apply.

Still, if you want to run checks manually:

.. code-block:: sh

./scripts/black.sh
./scripts/doc8.sh
./scripts/isort.sh
./scripts/ruff.sh
make pre-commit

Requirements
------------
Requirements are compiled using `pip-tools`_.
Requirements are compiled using `uv`_.

.. code-block:: sh

./scripts/compile_requirements.sh
make compile_requirements
make compile_requirements_upgrade

Virtual environment
-------------------
Expand Down
Loading