pyproject.toml: update dependencies

This commit is contained in:
Sina Atalay 2024-06-24 16:08:25 +03:00
parent 4fc622dd4d
commit 82df86403a
2 changed files with 25 additions and 14 deletions

View File

@ -79,6 +79,10 @@ These commands are defined in the [`pyproject.toml`](https://github.com/sinaatal
```bash
hatch run default:lint
```
- Sort the imports with [isort](https://github.com/timothycrosley/isort/):
```bash
hatch run default:sort-imports
```
- Run the tests:
```bash
hatch run test:run

View File

@ -21,7 +21,7 @@
# many build packages like `setuptools`, `flit`, `poetry`, `hatchling`, etc. We will use
# `hatchling`.
requires = [
"hatchling==1.21.1",
"hatchling==1.25.0",
] # List of packages that are needed to build RenderCV
# Python has a standard object format called build-backend object. Python standard asks
@ -71,14 +71,14 @@ requires-python = '>=3.10'
# is installed:
dependencies = [
'Jinja2==3.1.4', # to generate LaTeX and Markdown files
'phonenumbers==8.13.37', # to validate phone numbers
'email-validator==2.1.1', # to validate email addresses
'pydantic==2.7.1', # to validate and parse the input file
'pydantic-extra-types==2.7.0', # to validate some extra types
'phonenumbers==8.13.39', # to validate phone numbers
'email-validator==2.2.0', # to validate email addresses
'pydantic==2.7.4', # to validate and parse the input file
'pydantic-extra-types==2.8.2', # to validate some extra types
'ruamel.yaml==0.18.6', # to parse YAML files
'typer==0.12.3', # to create the command-line interface
"markdown==3.6", # to convert Markdown to HTML
"PyMuPDF==1.24.4", # to convert PDF files to images
"PyMuPDF==1.24.5", # to convert PDF files to images
]
classifiers = [
"Intended Audience :: Science/Research",
@ -131,24 +131,28 @@ rendercv = 'rendercv.cli:app'
[tool.hatch.envs.default]
# Dependencies to be installed in the `default` virtual environment.
dependencies = [
"ruff==0.4.5", # to lint the code
"black==24.4.2", # to format the code
"ruff==0.4.10", # to lint the code
"black==24.4.2", # to format the code
"ipython==8.25.0", # for ipython shell
"isort==5.13.2", # to sort the imports
]
path = ".venv"
[tool.hatch.envs.default.scripts]
# Hatch allows us to define scripts that can be run in the activated virtual environment
# with `hatch run ENV_NAME:SCRIPT_NAME`.
# Format all the code in the `rendercv` package with `black`:
format = "black rendercv" # hatch run format
format = "black ." # hatch run format
# Lint the code in the `rendercv` package with `ruff`:
lint = "ruff check rendercv" # hatch run lint
lint = "ruff check ." # hatch run lint
# Sort the imports in the `rendercv` package with `isort`:
sort-imports = "isort ." # hatch run sort-imports
[tool.hatch.envs.docs]
# Dependencies to be installed in the `docs` virtual environment.
dependencies = [
"mkdocs-material==9.5.24", # to build docs
"mkdocstrings-python==1.10.3", # to build reference documentation from docstrings
"mkdocs-material==9.5.27", # to build docs
"mkdocstrings-python==1.10.5", # to build reference documentation from docstrings
"pdfCropMargins==2.1.3", # to generate entry figures for the documentation
"pillow==10.3.0", # lock the dependency of pdfCropMargins
"mkdocs-macros-plugin==1.0.5", # to be able to have dynamic content in the documentation
@ -171,8 +175,8 @@ update-entry-figures = "python docs/update_entry_figures.py" # hatch run docs:up
[tool.hatch.envs.test]
# Dependencies to be installed in the `test` virtual environment.
dependencies = [
"pytest==8.2.1", # to run the tests
"coverage==7.5.1", # to generate coverage reports
"pytest==8.2.2", # to run the tests
"coverage==7.5.4", # to generate coverage reports
"time-machine==2.14.1", # to select an arbitrary date and time for testing
"pypdf==4.2.0", # to read PDF files
]
@ -211,6 +215,9 @@ enable-unstable-feature = [
"string_processing",
] # to break strings into multiple lines
[tool.isort]
profile = "black"
[tool.coverage.run]
source = ['rendercv'] # The source to measure during execution