diff --git a/.gitignore b/.gitignore index 0c1bc8bd966744f01c0dd002b562d9e62034b0e7..8c9c1fcf9f253046c2067756e320566e85c3f8f0 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ __pycache__ ~$* # Build -.tox/ +venv/* # ACMC phenotype build files diff --git a/docs/index.md b/docs/index.md index ab68f392e0a81b0f089211c9039fb38ba2a18300..4d99003a203f5d8c09e2420cd5dc3c0d061c4a4d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -175,6 +175,103 @@ The `phen` command is used phenotype-related operations. # Development +# Developer Usage Guide for ACMC + +## Installation +To install the ACMC package for development, ensure you have Python 3.9 or later installed. + +### Clone the Repository +```sh +git clone https://git.soton.ac.uk/meldb/concepts-processing.git +cd concepts-processing +``` + +### Set Up a Virtual Environment +It is recommended to use a virtual environment to manage dependencies. + +```sh +python -m venv venv +source venv/bin/activate # On Windows use `venv\Scripts\activate` +``` + +### Install Dependencies +Using `hatch`, you can install the necessary dependencies easily. + +```sh +pip install --upgrade pip +pip install hatch +``` +This will create a virtual environment with all required dependencies. + +## Development Environment + +### Activate the Development Environment +To enter the development environment, use: + +```sh +hatch shell +``` + +### Code Formatting +The project uses `black` for code formatting. Ensure your code is properly formatted before committing: + +```sh +black acmc +``` + +### Type Checking +The project uses `mypy` for type checking: + +```sh +mypy acmc +``` + +### Running Tests +Run tests using `pytest`: + +```sh +hatch run pytest +``` + +## Building the Package +To build the package, use: + +```sh +hatch build +``` + +## Running the CLI +The package provides a command-line interface (CLI) entry point. To run it: + +```sh +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: + ```sh + git checkout -b feature-branch + ``` +2. Make changes and commit them: + ```sh + git add . + git commit -m "Description of changes" + ``` +3. 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) + + + # GitLab Workflow for Managing Releases ## Branching Strategy diff --git a/pyproject.toml b/pyproject.toml index aeb94388c9a0e46b0627dc71a99e322d692f6d0b..8c9b030a2dd6e7a0bb23cfd2c5be5b1503d73e96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,14 +47,6 @@ Repository = "https://git.soton.ac.uk/meldb/concepts-processing" Documentation = "https://git.soton.ac.uk/meldb/concepts-processing/docs" Issues = "https://git.soton.ac.uk/meldb/concepts-processing/-/issues" -[tool.hatch.build] -include = ["acmc/**"] # Ensure only the acmc package is included - -[tool.hatch.build.targets.sdist] -include = [ - "acmc/**", -] - [tool.hatch.build.targets.wheel] packages = ["acmc"] @@ -64,6 +56,17 @@ dependencies = [ "pytest" ] -[tool.hatch.envs.default.scripts] -dev = "python -m acmc" -test = "pytest tests" \ No newline at end of file +[tool.hatch.envs.dev] +dependencies = [ + "pytest", + "black", + "mypy" +] + +[tool.hatch.build] +include = ["acmc/**"] # Ensure only the acmc package is included + +[tool.hatch.build.targets.sdist] +include = [ + "acmc/**", +] \ No newline at end of file