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 ```bash
hatch run default:lint hatch run default:lint
``` ```
- Sort the imports with [isort](https://github.com/timothycrosley/isort/):
```bash
hatch run default:sort-imports
```
- Run the tests: - Run the tests:
```bash ```bash
hatch run test:run hatch run test:run

View File

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