-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for spellchecker and spellcheck docs (#2025)
* Documentation for using the spellchecker * remove comment * reorder dictionary manually * add ability to ignore text in 'cards' * correct spelling in docs * update with except pattern delimiters * add words to dictionary * ignore icon text * spellcheck and update dictionary * spellcheck and add words to dictionary * spellcheck docs and update dictionary * spellchecked and updated dictionary * updated name of pyspelling YAML * update guidance * update instructions for docs * spellchecked docs and updated dictionary * spellchecking * update bash script to exclude auto-generated files * ignore angle brackets * spellcheck and update dictionary * spellcheck * add ignore pattern * spellcheck * update documentation with changes from master * old docs guide added to general contribution guidance * spellcheck and update dictionary * remove Americanisms * Capitalise authors' names * update tables * move `jaro_winkler_sim` to a code block * splink -> Splink * Capitalise names * postgres -> Postgres * Add some additional words to the dict * add descriptive comments to yaml * mention dictionary is British English * spellchecking complete! * alpha-sorted custom dictionary * correct PyPI * delete test file * fixing links * dummy commit * update dictionary * update documentation * update action to ignore markdown file * revert markdown --------- Co-authored-by: Tom Hepworth <[email protected]>
- Loading branch information
1 parent
e53a044
commit d1acc1d
Showing
42 changed files
with
759 additions
and
395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
## Creating a Virtual Environment for Splink | ||
|
||
### Managing Dependencies with Poetry | ||
|
||
Splink utilises `poetry` for managing its core dependencies, offering a clean and effective solution for tracking and resolving any ensuing package and version conflicts. | ||
|
||
You can find a list of Splink's core dependencies within the [pyproject.toml](https://github.com/moj-analytical-services/splink/blob/master/pyproject.toml) file. | ||
|
||
#### Fundamental Commands in Poetry | ||
|
||
Below are some useful commands to help in the maintenance and upkeep of the [pyproject.toml](https://github.com/moj-analytical-services/splink/blob/master/pyproject.toml) file. | ||
|
||
**Adding Packages** | ||
- To incorporate a new package into Splink: | ||
```sh | ||
poetry add <package-name> | ||
``` | ||
- To specify a version when adding a new package: | ||
```sh | ||
poetry add <package-name>==<version> | ||
# Add quotes if you want to use other equality calls | ||
poetry add "<package-name> >= <version>" | ||
``` | ||
|
||
**Modifying Packages** | ||
- To remove a package from the project: | ||
```sh | ||
poetry remove <package-name> | ||
``` | ||
- Updating an existing package to a specific version: | ||
```sh | ||
poetry add <package-name>==<version> | ||
poetry add "<package-name> >= <version>" | ||
``` | ||
- To update an existing package to the latest version: | ||
```sh | ||
poetry add <package-name>==<version> | ||
poetry update <package-name> | ||
``` | ||
Note: Direct updates can also be performed within the pyproject.toml file. | ||
|
||
**Locking the Project** | ||
- To update the existing `poetry.lock` file, thereby locking the project to ensure consistent dependency installation across different environments: | ||
```sh | ||
poetry lock | ||
``` | ||
Note: This should be used sparingly due to our loose dependency requirements and the resulting time to solve the dependency graph. If you only need to update a single dependency, update it using `poetry add <pkg>==<version>` instead. | ||
|
||
**Installing Dependencies** | ||
- To install project dependencies as per the lock file: | ||
```sh | ||
poetry install | ||
``` | ||
- For optional dependencies, additional flags are required. For instance, to install dependencies along with Spark support: | ||
```sh | ||
poetry install -E spark | ||
``` | ||
|
||
A comprehensive list of Poetry commands is available in the [Poetry documentation](https://python-poetry.org/docs/cli/). | ||
|
||
### Automating Virtual Environment Creation | ||
|
||
To streamline the creation of a virtual environment via `venv`, you may use the [create_venv.sh](https://github.com/moj-analytical-services/splink/blob/master/scripts/create_venv.sh) script. | ||
|
||
This script facilitates the automatic setup of a virtual environment, with the default environment name being **venv**. | ||
|
||
**Default Environment Creation:** | ||
```sh | ||
source scripts/create_venv.sh | ||
``` | ||
|
||
**Specifying a Custom Environment Name:** | ||
```sh | ||
source scripts/create_venv.sh <name_of_venv> | ||
``` |
Oops, something went wrong.