From b3290752d2edd5b4dbdcd167c334544e6edb2fcd Mon Sep 17 00:00:00 2001 From: KristinaGomoryova Date: Mon, 15 Jul 2024 10:47:31 +0200 Subject: [PATCH] project_setup updated --- project_setup.md | 95 +++++++++--------------------------------------- 1 file changed, 17 insertions(+), 78 deletions(-) diff --git a/project_setup.md b/project_setup.md index 496eea5..4bc61bb 100644 --- a/project_setup.md +++ b/project_setup.md @@ -1,70 +1,44 @@ # Project Setup -Here we provide some details about the project setup. Most of the choices are explained in the -[guide](https://guide.esciencecenter.nl). Links to the relevant sections are included below. Feel free to remove this -text when the development of the software package takes off. - -For a quick reference on software development, we refer to [the software guide -checklist](https://guide.esciencecenter.nl/#/best_practices/checklist). - ## Python versions This repository is set up with Python versions: -- 3.8 -- 3.9 -- 3.10 - 3.11 - 3.12 -Add or remove Python versions based on project requirements. See [the -guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python) for more information about Python -versions. - ## Package management and dependencies -You can use either pip or conda for installing dependencies and package management. This repository does not force you -to use one or the other, as project requirements differ. For advice on what to use, please check [the relevant section -of the -guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=dependencies-and-package-management). +For installing the dependencies and package management, [micromamba](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html) and [poetry](https://python-poetry.org/) have been used. -- Runtime dependencies should be added to `pyproject.toml` in the `dependencies` list under `[project]`. -- Development dependencies should be added to `pyproject.toml` in one of the lists under `[project.optional-dependencies]`. +The dependencies are listed in the `pyproject.toml` file under the section `[tool.poetry.dependencies]` and `[tool.poetry.group.dev.dependencies]`. ## Packaging/One command install -You can distribute your code using PyPI. -[The guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=building-and-packaging-code) can -help you decide which tool to use for packaging. +To create a new environment, use the micromamba: + +```console +micromamba create rcx-tk +micromamba activate rcx-tk +``` +To install all dependencies specified in the `pyproject.toml` file, use poetry: + +```console +poetry install +``` ## Testing and code coverage -- Tests should be put in the `tests` folder. -- The `tests` folder contains: - - Example tests that you should replace with your own meaningful tests (file: `test_my_module.py`) +- Tests are in the `tests` folder, in the `test_process_metadata_file.py` file. - The testing framework used is [PyTest](https://pytest.org) - - [PyTest introduction](https://pythontest.com/pytest-book/) - - PyTest is listed as a development dependency - - This is configured in `pyproject.toml` - The project uses [GitHub action workflows](https://docs.github.com/en/actions) to automatically run tests on GitHub infrastructure against multiple Python versions - - Workflows can be found in [`.github/workflows`](.github/workflows/) -- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=testing) ## Documentation -- Documentation should be put in the [`docs/`](docs/) directory. The contents have been generated using `sphinx-quickstart` (Sphinx version 1.6.5). -- We recommend writing the documentation using Restructured Text (reST) and Google style docstrings. - - [Restructured Text (reST) and Sphinx CheatSheet](https://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html) - - [Google style docstring examples](http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html). +- Documentation is in the [`docs/`](docs/) directory. The contents have been generated using `sphinx-quickstart` (Sphinx version 1.6.5). - The documentation is set up with the ReadTheDocs Sphinx theme. - - Check out its [configuration options](https://sphinx-rtd-theme.readthedocs.io/en/latest/). - [AutoAPI](https://sphinx-autoapi.readthedocs.io/) is used to generate documentation for the package Python objects. - `.readthedocs.yaml` is the ReadTheDocs configuration file. When ReadTheDocs is building the documentation this package and its development dependencies are installed so the API reference can be rendered. -- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=writingdocumentation) - -## Coding style conventions and code quality - -- [Relevant section in the NLeSC guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=coding-style-conventions) and [README.dev.md](README.dev.md). ## Continuous code quality @@ -75,43 +49,8 @@ help you decide which tool to use for packaging. ## Package version number -- We recommend using [semantic versioning](https://guide.esciencecenter.nl/#/best_practices/releases?id=semantic-versioning). -- For convenience, the package version is stored in a single place: `rcx-tk/pyproject.toml` under the `tool.bumpversion` header. -- Don't forget to update the version number before [making a release](https://guide.esciencecenter.nl/#/best_practices/releases)! - -## Logging - -- We recommend using the logging module for getting useful information from your module (instead of using print). -- The project is set up with a logging example. -- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=logging) +- Releases are labelled using the [semantic versioning](https://guide.esciencecenter.nl/#/best_practices/releases?id=semantic-versioning). ## CHANGELOG.md -- Document changes to your software package -- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/releases?id=changelogmd) - -## CITATION.cff - -- To allow others to cite your software, add a `CITATION.cff` file -- It only makes sense to do this once there is something to cite (e.g., a software release with a DOI). -- Follow the [making software citable](https://guide.esciencecenter.nl/#/citable_software/making_software_citable) section in the guide. - -## CODE_OF_CONDUCT.md - -- Information about how to behave professionally -- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/documentation?id=code-of-conduct) - -## CONTRIBUTING.md - -- Information about how to contribute to this software package -- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/documentation?id=contribution-guidelines) - -## MANIFEST.in - -- List non-Python files that should be included in a source distribution -- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=building-and-packaging-code) - -## NOTICE - -- List of attributions of this project and Apache-license dependencies -- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/licensing?id=notice) +- To document the changes, we use the [CHANGELOG.md](https://github.com/RECETOX/rcx-tk/blob/master/CHANGELOG.md)