From 79f91069ea7297a72947c0ab3c8f561abdebc301 Mon Sep 17 00:00:00 2001 From: Michael Boniface <m.j.boniface@soton.ac.uk> Date: Sat, 22 Feb 2025 16:35:47 +0000 Subject: [PATCH] docs:added hatch documentation, resulted in fix to project toml to run the dev tools #7 --- docs/index.md | 52 +++++++++++++++++++++++++++++++------------------- pyproject.toml | 2 +- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/docs/index.md b/docs/index.md index 4d99003..baa813b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -205,25 +205,37 @@ This will create a virtual environment with all required dependencies. ## Development Environment -### Activate the Development Environment +By defining two separate environments, we ensure that development dependencies (such as testing tools, linters, or other utilities) don't interfere with your production environment. The default environment is the bare minimum required to run the application, while the dev environment includes everything need for development. + +- default environment: Includes the core dependencies your app needs to run (e.g., requests, etc.). +- dev environment: Includes additional tools for testing, code formatting, linting, and other development workflows (e.g., pytest, black, mypy, etc.). + +### Activate Default Environment To enter the development environment, use: ```sh hatch shell ``` +### Activate the Development Environment +To enter the development environment, use: + +```sh +hatch shell dev +``` + ### Code Formatting The project uses `black` for code formatting. Ensure your code is properly formatted before committing: ```sh -black acmc +hatch run black --check acmc ``` ### Type Checking The project uses `mypy` for type checking: ```sh -mypy acmc +hatch run mypy -p acmc ``` ### Running Tests @@ -248,33 +260,29 @@ acmc --help ``` ## Contributing -If you make changes, ensure all tests pass and code formatting is correct before submitting a merge request. -1. Create a new branch for your feature or bugfix: +### GitLab Basic Workflow + +1. Create an new issue in the [Issue Tracker](https://git.soton.ac.uk/meldb/concepts-processing/-/issues) + +2. Create a new branch for your feature or bugfix: ```sh git checkout -b feature-branch ``` -2. Make changes and commit them: +3. Make changes and commit them: ```sh git add . git commit -m "Description of changes" ``` -3. Push your branch: +4. Push your branch: ```sh git push origin feature-branch ``` -4. Open a merge request in GitLab. - -## Additional Resources -- [Repository](https://git.soton.ac.uk/meldb/concepts-processing) -- [Documentation](https://git.soton.ac.uk/meldb/concepts-processing/docs) -- [Issue Tracker](https://git.soton.ac.uk/meldb/concepts-processing/-/issues) - +5. Open a merge request in GitLab. +If you make changes, ensure all tests pass and code formatting is correct before submitting a merge request. -# GitLab Workflow for Managing Releases - -## Branching Strategy +## GitLab Workflow for Managing Releases ### 1. Main Branch (`main`) - Represents the stable production-ready code. @@ -320,14 +328,18 @@ If you make changes, ensure all tests pass and code formatting is correct before - Deploy to production after approval. - Requires authorization from a repository maintainer or admin before merging. -## Commit Message Guidelines +### Commit Message Guidelines - Use clear and descriptive commit messages. - Format: `<type>(<scope>): <description>` -- Example: `docs (documentation): git workflow documentation (#issue)` -- Types: `feat` (feature), `fix` (bug fix), `docs` (documentation), `refactor` (code refactoring), `test` (tests), `chore` (maintenance). +- Example: `docs: git workflow documentation (#issue)` +- Types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`. ## Additional Guidelines - Always pull the latest changes before starting a new feature: `git pull origin dev` - Write unit tests for new features. - Keep feature branches short-lived and regularly updated with `dev`. +## Additional Resources +- [Repository](https://git.soton.ac.uk/meldb/concepts-processing) +- [Documentation](https://git.soton.ac.uk/meldb/concepts-processing/docs) +- [Issue Tracker](https://git.soton.ac.uk/meldb/concepts-processing/-/issues) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8c9b030..096598a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ packages = ["acmc"] [tool.hatch.envs.default] dependencies = [ "hatch", - "pytest" + "pytest", ] [tool.hatch.envs.dev] -- GitLab