From 412a49a28212b24e99924a8eb4e748315e5c0ea8 Mon Sep 17 00:00:00 2001 From: 1993CRV <146706527+1993CRV@users.noreply.github.com> Date: Sun, 14 Jul 2024 16:10:17 -0400 Subject: [PATCH] proofread docs --- docs/changelog.md | 15 ++++++-- docs/developer_guide/index.md | 20 +++++------ docs/developer_guide/testing.md | 3 -- docs/developer_guide/writing_documentation.md | 2 +- docs/reference/cli/commands.md | 2 +- docs/reference/cli/printer.md | 2 +- docs/reference/cli/utilities.md | 2 +- docs/reference/index.md | 18 +++++----- docs/reference/themes/index.md | 2 +- docs/update_entry_figures.py | 34 +++++++++---------- docs/update_examples.py | 18 +++++----- docs/user_guide/cli.md | 2 +- docs/user_guide/faq.md | 2 +- docs/user_guide/index.md | 16 ++++----- 14 files changed, 73 insertions(+), 65 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 33e05317..3ffee0e6 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -121,11 +121,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). > **Full Changelog**: [v1.6...v1.7] ### Added + - The new theme, `engineeringresumes`, is ready to be used now. - The `education_degree_width` design option has been added for the `classic` theme. - `last_updated_date_style` design option has been added for all the themes except `moderncv`. ### Fixed + - Highlights can now be broken into multiple pages in the `classic` theme ([#47](https://github.com/sinaatalay/rendercv/issues/47)). - Some JSON Schema bugs have been fixed. @@ -134,12 +136,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). > **Full Changelog**: [v1.5...v1.6] ### Added + - A new theme has been added: `engineeringresumes`. It hasn't been tested fully yet. - A new text alignment option has been added to `classic` and `sb2nov`: `justified-with-no-hyphenation` ([#34](https://github.com/sinaatalay/rendercv/issues/34)) - Users are now allowed to run local `lualatex`, `xelatex`, `latexmk` commands in addition to `pdflatex` ([#48](https://github.com/sinaatalay/rendercv/issues/48)). ### Changed -- Orcid is now displayed in the header like other social media links. + +- ORCID is now displayed in the header like other social media links. ### Fixed @@ -236,6 +240,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). > **Full Changelog**: [v0.9...v0.10] ### Fixed + - Author highlighting issue has been fixed in `PublicationEntry`. ## [0.9] - 2023-11-29 @@ -243,6 +248,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). > **Full Changelog**: [v0.8...v0.9] ### Added + - Page numbering has been added. - Text alignment options have been added (left-aligned or justified). - Header options have been added (margins and header font size). @@ -253,6 +259,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). > **Full Changelog**: [v0.7...v0.8] ### Fixed + - YYYY date issue has been solved ([#5](https://github.com/sinaatalay/rendercv/issues/5)). ## [0.7] - 2023-11-03 @@ -260,9 +267,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). > **Full Changelog**: [v0.6...v0.7] ### Changed + - The date type has been improved. It supports `YYYY-MM-DD`, `YYYY-MM`, and `YYYY` formats now. ### Fixed + - Custom sections' error messages have been fixed. ## [0.6] - 2023-10-28 @@ -270,9 +279,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). > **Full Changelog**: [v0.5...v0.6] ### Added + - New fields have been added: `experience`, `projects`, `awards`, `interests`, and `programming_skills`. ### Fixed + - DOI validation bug has been fixed by [@LabAsim](https://github.com/LabAsim) in [#3](https://github.com/sinaatalay/rendercv/pull/3)/ @@ -282,7 +293,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added -- Orcid support has been added. +- ORCID support has been added. ### Fixed diff --git a/docs/developer_guide/index.md b/docs/developer_guide/index.md index e143d961..cefad1aa 100644 --- a/docs/developer_guide/index.md +++ b/docs/developer_guide/index.md @@ -53,15 +53,15 @@ The source code is thoroughly documented and well-commented, making it an enjoya These commands are defined in the [`pyproject.toml`](https://github.com/sinaatalay/rendercv/blob/main/pyproject.toml) file. -- Format the code with [Black](https://github.com/psf/black): +- Format the code with [Black](https://github.com/psf/black) ```bash hatch run default:format ``` -- Lint the code with [Ruff](https://github.com/astral-sh/ruff): +- Lint the code with [Ruff](https://github.com/astral-sh/ruff) ```bash hatch run default:lint ``` -- Sort the imports with [isort](https://github.com/timothycrosley/isort/): +- Sort the imports with [isort](https://github.com/timothycrosley/isort/) ```bash hatch run default:sort-imports ``` @@ -69,19 +69,19 @@ These commands are defined in the [`pyproject.toml`](https://github.com/sinaatal ```bash hatch run default:check-types ``` -- Run the tests: +- Run the tests ```bash hatch run test:run ``` -- Run the tests and generate a coverage report: +- Run the tests and generate a coverage report ```bash hatch run test:run-and-report ``` -- Start the development server for the documentation: +- Start the development server for the documentation ```bash hatch run docs:serve ``` -- Build the documentation: +- Build the documentation ```bash hatch run docs:build ``` @@ -89,15 +89,15 @@ These commands are defined in the [`pyproject.toml`](https://github.com/sinaatal ```bash hatch run docs:update-schema ``` -- Update [`examples`](https://github.com/sinaatalay/rendercv/tree/main/examples) folder: +- Update [`examples`](https://github.com/sinaatalay/rendercv/tree/main/examples) folder ```bash hatch run docs:update-examples ``` -- Update figures of the entry types in the "[Structure of the YAML Input File](https://docs.rendercv.com/user_guide/structure_of_the_yaml_input_file/)": +- Update figures of the entry types in the "[Structure of the YAML Input File](https://docs.rendercv.com/user_guide/structure_of_the_yaml_input_file/)" ```bash hatch run docs:update-entry-figures ``` ## About [`pyproject.toml`](https://github.com/sinaatalay/rendercv/blob/main/pyproject.toml) -[`pyproject.toml`](https://github.com/sinaatalay/rendercv/blob/main/pyproject.toml) contains all the metadata, dependencies, and tools required for the project. Please read through the file to understand the project's technical details. \ No newline at end of file +[`pyproject.toml`](https://github.com/sinaatalay/rendercv/blob/main/pyproject.toml) contains the metadata, dependencies, and tools required for the project. Please read through the file to understand the project's technical details. diff --git a/docs/developer_guide/testing.md b/docs/developer_guide/testing.md index 68253a63..b8fef719 100644 --- a/docs/developer_guide/testing.md +++ b/docs/developer_guide/testing.md @@ -29,6 +29,3 @@ When the `testdata` folder needs to be updated, it can be manually regenerated b !!! warning - Whenever the `testdata` folder is generated, the files should be reviewed manually to ensure everything works as expected. - `update_testdata` should be set to `False` before committing the changes. - - - diff --git a/docs/developer_guide/writing_documentation.md b/docs/developer_guide/writing_documentation.md index 928f3634..8e37a922 100644 --- a/docs/developer_guide/writing_documentation.md +++ b/docs/developer_guide/writing_documentation.md @@ -49,4 +49,4 @@ Run the following command to update the JSON Schema. hatch run docs:update-schema ``` -Once a new release is created on GitHub, the [`publish.yaml`](https://github.com/sinaatalay/rendercv/blob/main/.github/workflows/publish.yaml) workflow will be automatically triggered, and `schema.json` will be updated to the most recent version. \ No newline at end of file +Once a new release is created on GitHub, the [`publish.yaml`](https://github.com/sinaatalay/rendercv/blob/main/.github/workflows/publish.yaml) workflow will be automatically triggered, and `schema.json` will be updated to the most recent version. diff --git a/docs/reference/cli/commands.md b/docs/reference/cli/commands.md index c71ca73f..fcc0e8de 100644 --- a/docs/reference/cli/commands.md +++ b/docs/reference/cli/commands.md @@ -1,3 +1,3 @@ # `rendercv.cli.commands` -::: rendercv.cli.commands \ No newline at end of file +::: rendercv.cli.commands diff --git a/docs/reference/cli/printer.md b/docs/reference/cli/printer.md index 5b99a170..2aa1af94 100644 --- a/docs/reference/cli/printer.md +++ b/docs/reference/cli/printer.md @@ -1,3 +1,3 @@ # `rendercv.cli.printer` -::: rendercv.cli.printer \ No newline at end of file +::: rendercv.cli.printer diff --git a/docs/reference/cli/utilities.md b/docs/reference/cli/utilities.md index 0a7f380c..4b4d50a4 100644 --- a/docs/reference/cli/utilities.md +++ b/docs/reference/cli/utilities.md @@ -1,3 +1,3 @@ # `rendercv.cli.utilities` -::: rendercv.cli.utilities \ No newline at end of file +::: rendercv.cli.utilities diff --git a/docs/reference/index.md b/docs/reference/index.md index 89e08cc5..fd89fd17 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -27,26 +27,26 @@ flowchart TD end ``` -- [`cli`](cli/index.md) package contains all the command-line interface (CLI) related code for RenderCV. - - [`commands.py`](cli/commands.md) module contains all the CLI commands. - - [`printer.py`](cli/printer.md) module contains all the functions and classes that are used to print nice-looking messages to the terminal. +- [`cli`](cli/index.md) package contains the command-line interface (CLI) related code for RenderCV. + - [`commands.py`](cli/commands.md) module contains the CLI commands. + - [`printer.py`](cli/printer.md) module contains the functions and classes that are used to print nice-looking messages to the terminal. - [`utilities.py`](cli/utilities.md) module contains utility functions that are required by the CLI. - [`data`](data/index.md) package contains classes and functions to parse and validate a YAML input file. - - [`models`](data/models/index.md) package contains all the Pydantic data models, validators, and computed fields that are used in RenderCV. + - [`models`](data/models/index.md) package contains the Pydantic data models, validators, and computed fields that are used in RenderCV. - [`computers.py`](data/models/computers.md) module contains functions that compute some properties based on the input data. - - [`base.py`](data/models/base.md) module contains the base data model for all the other data models. - - [`entry_types.py`](data/models/entry_types.md) module contains the data models of all the available entry types in RenderCV. + - [`base.py`](data/models/base.md) module contains the base data model for the other data models. + - [`entry_types.py`](data/models/entry_types.md) module contains the data models of the available entry types in RenderCV. - [`curriculum_vitae.py`](data/models/curriculum_vitae.md) module contains the data model of the `cv` field of the input file. - [`design.py`](data/models/design.md) module contains the data model of the `design` field of the input file. - [`locale_catalog.py`](data/models/locale_catalog.md) module contains the data model of the `locale_catalog` field of the input file. - [`rendercv_data_model.py`](data/models/rendercv_data_model.md) module contains the `RenderCVDataModel` data model, which is the main data model that defines the whole input file structure. - - [`generator.py`](data/generator.md) module contains all the functions for generating the JSON Schema of the input data format and a sample YAML input file. + - [`generator.py`](data/generator.md) module contains the functions for generating the JSON Schema of the input data format and a sample YAML input file. - [`reader.py`](data/reader.md) module contains the functions that are used to read the input files. - [`renderer`](renderer/index.md) package contains the necessary classes and functions for generating the output files from the `RenderCVDataModel` object. - [`renderer.py`](renderer/renderer.md) module contains the necessary functions for rendering $\\LaTeX$, PDF, Markdown, HTML, and PNG files from the data model. - - [`templater.py`](renderer/templater.md) module contains all the necessary classes and functions for templating the $\\LaTeX$ and Markdown files from the data model. + - [`templater.py`](renderer/templater.md) module contains the necessary classes and functions for templating the $\\LaTeX$ and Markdown files from the data model. object. -- [`themes`](themes/index.md) package contains all the built-in themes of RenderCV. +- [`themes`](themes/index.md) package contains the built-in themes of RenderCV. - [`common_options.py`](themes/common_options.md) module contains some standard data models for design options. - [`classic`](themes/classic.md) package contains the `classic` theme templates and data models for its design options. - [`engineeringresumes`](themes/engineeringresumes.md) package contains the `engineeringresumes` theme templates and data models for its design options. diff --git a/docs/reference/themes/index.md b/docs/reference/themes/index.md index 029f3a07..a8e52c3e 100644 --- a/docs/reference/themes/index.md +++ b/docs/reference/themes/index.md @@ -1,3 +1,3 @@ # `rendercv.themes` -::: rendercv.themes \ No newline at end of file +::: rendercv.themes diff --git a/docs/update_entry_figures.py b/docs/update_entry_figures.py index b431ea65..147f0d73 100644 --- a/docs/update_entry_figures.py +++ b/docs/update_entry_figures.py @@ -105,7 +105,7 @@ def dictionary_to_yaml(dictionary: dict[str, Any]): def define_env(env): - # see https://mkdocs-macros-plugin.readthedocs.io/en/latest/macros/ + # See https://mkdocs-macros-plugin.readthedocs.io/en/latest/macros/ entries = [ "education_entry", "experience_entry", @@ -133,7 +133,7 @@ def define_env(env): env.variables["showcase_entries"] = entries_showcase - # for theme templates reference docs: + # For theme templates reference docs themes_path = rendercv_path / "themes" theme_templates = dict() for theme in data.available_themes: @@ -141,7 +141,7 @@ def define_env(env): for theme_file in themes_path.glob(f"{theme}/*.tex"): theme_templates[theme][theme_file.stem] = theme_file.read_text() - # Update the ordering of the theme templates: + # Update ordering of theme templates order = [ "Preamble.j2", "Header.j2", @@ -168,11 +168,11 @@ def define_env(env): env.variables["theme_templates"] = theme_templates - # available themes strings (put available themes between ``) + # Available themes strings (put available themes between ``) themes = [f"`{theme}`" for theme in data.available_themes] env.variables["available_themes"] = ", ".join(themes) - # available social networks strings (put available social networks between ``) + # Available social networks strings (put available social networks between ``) social_networks = [ f"`{social_network}`" for social_network in data.available_social_networks ] @@ -194,7 +194,7 @@ def generate_entry_figures(): themes = data.available_themes with tempfile.TemporaryDirectory() as temporary_directory: - # create a temporary directory: + # Create temporary directory temporary_directory_path = pathlib.Path(temporary_directory) for theme in themes: design_dictionary = { @@ -203,12 +203,12 @@ def generate_entry_figures(): "disable_last_updated_date": True, } if theme == "moderncv": - # moderncv theme does not support these options: + # moderncv theme does not support these options del design_dictionary["disable_page_numbering"] del design_dictionary["disable_last_updated_date"] for entry_type, entry in entries.items(): - # Create the data model with only one section and one entry + # Create data model with only one section and one entry data_model = data.RenderCVDataModel( **{ "cv": data.CurriculumVitae(sections={entry_type: [entry]}), @@ -216,22 +216,22 @@ def generate_entry_figures(): } ) - # Render: + # Render latex_file_path = renderer.render_a_latex_file_and_copy_theme_files( data_model, temporary_directory_path ) pdf_file_path = renderer.render_a_pdf_from_latex(latex_file_path) - # Prepare the output directory and file path: + # Prepare output directory and file path output_directory = image_assets_directory / theme output_directory.mkdir(parents=True, exist_ok=True) output_pdf_file_path = output_directory / f"{entry_type}.pdf" - # Remove the file if it exists: + # Remove file if it exists if output_pdf_file_path.exists(): output_pdf_file_path.unlink() - # Crop the margins + # Crop margins pdfCropMargins.crop( argv_list=[ "-p4", @@ -250,23 +250,23 @@ def generate_entry_figures(): ] ) - # Convert pdf to an image + # Convert PDF to image png_file_path = renderer.render_pngs_from_pdf(output_pdf_file_path)[0] desired_png_file_path = output_pdf_file_path.with_suffix(".png") - # If the image exists, remove it + # If image exists, remove it if desired_png_file_path.exists(): desired_png_file_path.unlink() - # Move the image to the desired location + # Move image to desired location png_file_path.rename(desired_png_file_path) - # Remove the pdf file + # Remove PDF file output_pdf_file_path.unlink() def update_index(): - """Update the index.md file by copying the README.md file.""" + """Update index.md file by copying README.md file.""" index_file_path = repository_root / "docs" / "index.md" readme_file_path = repository_root / "README.md" shutil.copy(readme_file_path, index_file_path) diff --git a/docs/update_examples.py b/docs/update_examples.py index a24d413d..341a110f 100644 --- a/docs/update_examples.py +++ b/docs/update_examples.py @@ -17,7 +17,7 @@ def generate_examples(): """Generate example YAML and PDF files.""" examples_directory_path = pathlib.Path(__file__).parent.parent / "examples" - # check if the examples directory exists, if not create it + # Check if examples directory exists. If not, create it if not examples_directory_path.exists(): examples_directory_path.mkdir() @@ -32,7 +32,7 @@ def generate_examples(): ) yaml_file_path = examples_directory_path / "John_Doe_CV.yaml" - # Rename John_Doe_CV.yaml: + # Rename John_Doe_CV.yaml proper_theme_name = theme.capitalize() + "Theme" new_yaml_file_path = ( examples_directory_path / f"John_Doe_{proper_theme_name}_CV.yaml" @@ -42,39 +42,39 @@ def generate_examples(): yaml_file_path.rename(new_yaml_file_path) yaml_file_path = new_yaml_file_path - # Generate the PDF file: + # Generate PDF file cli.cli_command_render(yaml_file_path) output_pdf_file = ( examples_directory_path / "rendercv_output" / "John_Doe_CV.pdf" ) - # Move pdf file to the examples directory: + # Move PDF file to examples directory new_pdf_file_path = examples_directory_path / f"{yaml_file_path.stem}.pdf" if new_pdf_file_path.exists(): new_pdf_file_path.unlink() output_pdf_file.rename(new_pdf_file_path) - # Remove the rendercv_output directory: + # Remove rendercv_output directory rendercv_output_directory = examples_directory_path / "rendercv_output" shutil.rmtree(rendercv_output_directory) - # convert first page of the pdf to an image: + # Convert first page of PDF to image png_file_paths = renderer.render_pngs_from_pdf(new_pdf_file_path) firt_page_png_file_path = png_file_paths[0] if len(png_file_paths) > 1: - # remove the other pages + # Remove other pages for png_file_path in png_file_paths[1:]: png_file_path.unlink() desired_png_file_path = image_assets_directory / f"{theme}.png" - # If the image exists, remove it + # If image exists, remove it if desired_png_file_path.exists(): desired_png_file_path.unlink() - # Move the image to the desired location + # Move image to desired location firt_page_png_file_path.rename(desired_png_file_path) diff --git a/docs/user_guide/cli.md b/docs/user_guide/cli.md index 99701df4..bb20d696 100644 --- a/docs/user_guide/cli.md +++ b/docs/user_guide/cli.md @@ -1,6 +1,6 @@ # Command Line Interface (CLI) -This page lists all the available commands and options of the RenderCV CLI. +This page lists the available commands and options of the RenderCV CLI. ## Options of the `rendercv` command diff --git a/docs/user_guide/faq.md b/docs/user_guide/faq.md index 089c73ba..269d2f50 100644 --- a/docs/user_guide/faq.md +++ b/docs/user_guide/faq.md @@ -26,4 +26,4 @@ To be answered. ## How can I switch the order of `company` and `position` in ExperienceEntry? -To be answered. \ No newline at end of file +To be answered. diff --git a/docs/user_guide/index.md b/docs/user_guide/index.md index ba226af0..51e7d1a6 100644 --- a/docs/user_guide/index.md +++ b/docs/user_guide/index.md @@ -25,7 +25,7 @@ This command will create the following files: - A YAML input file called `Your_Name_CV.yaml`. - This file will contain all the content and design options of your CV. + This file contains the content and design options of your CV. - A directory called `classic`. @@ -33,13 +33,13 @@ This command will create the following files: - A directory called `markdown`. - This directory contains the Markdown templates of RenderCV's default Markdown template. You can update its contents to tweak the Markdown and HTML output of the CV. + This directory contains the templates of RenderCV's default Markdown template. You can update its contents to tweak the Markdown and HTML output of the CV. Please refer to the [here](cli.md#options-of-the-rendercv-new-command) for the complete list of CLI options available for the `new` command. ## Structure of the YAML input file -The YAML input file contains all the content and design options of your CV. A detailed explanation of the structure of the YAML input file is provided [here](structure_of_the_yaml_input_file.md). +The YAML input file contains the content and design options of your CV. A detailed explanation of the structure of the YAML input file is provided [here](structure_of_the_yaml_input_file.md). ## Rendering the CV with the `render` command @@ -134,11 +134,11 @@ For example, the content of `ExperienceEntry.j2.tex` for the `moderncv` theme is ((* endfor *)) ``` -The values between `<<` and `>>` are the names of Python variables, allowing you to write a $\\LaTeX$ CV without writing any content. They will be replaced with the values found in the YAML input. Also, the values between `((*` and `*))` are Python blocks, allowing you to use loops and conditional statements. +The values between `<<` and `>>` are the names of Python variables, allowing you to write a $\\LaTeX$ CV without writing any content. They will be replaced with the values found in the YAML input. The values between `((*` and `*))` are Python blocks, allowing you to use loops and conditional statements. -The process of generating $\\LaTeX$ files like this is called "templating," and it's achieved with a Python package called [Jinja](https://jinja.palletsprojects.com/en/3.1.x/). +The process of generating $\\LaTeX$ files like this is called "templating," and it is achieved with a Python package called [Jinja](https://jinja.palletsprojects.com/en/3.1.x/). -Also, the `__init__.py` file found in the theme directory is used to define the design options of the custom theme. You can define your custom design options in this file. +The `__init__.py` file found in the theme directory defines the design options of the custom theme. You can define your custom design options in this file. For example, an `__init__.py` file is shown below: @@ -155,7 +155,7 @@ class YourcustomthemeThemeOptions(pydantic.BaseModel): option4: bool ``` -Then, RenderCV will parse your custom design options from the YAML input, and you can use these variables inside your `*.j2.tex` files as shown below: +RenderCV will then parse your custom design options from the YAML input. You can use these variables inside your `*.j2.tex` files as shown below: ```latex <> @@ -165,4 +165,4 @@ Then, RenderCV will parse your custom design options from the YAML input, and yo ((* endif *)) ``` -Please refer to the [here](cli.md#options-of-the-rendercv-create-theme-command) for the complete list of CLI options available for the `create-theme` command. +Please refer [here](cli.md#options-of-the-rendercv-create-theme-command) for the complete list of CLI options available for the `create-theme` command.