Skip to content

Commit

Permalink
Update makefile and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
f-PLT committed Sep 17, 2024
1 parent 8f84f9f commit 8fdb97f
Show file tree
Hide file tree
Showing 10 changed files with 371 additions and 204 deletions.
12 changes: 8 additions & 4 deletions .make/base.make
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ conda-install: ## Install Conda on your local machine
echo "Fetching and installing miniconda"; \
echo " "; \
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh; \
bash ~/miniconda.sh -b -p ${HOME}/.conda; \
export PATH=${HOME}/.conda/bin:$PATH; \
bash ~/miniconda.sh -b -p $${HOME}/.conda; \
export PATH=$${HOME}/.conda/bin:$$PATH; \
conda init; \
/usr/bin/rm ~/miniconda.sh; \
;; \
Expand All @@ -121,8 +121,12 @@ conda-env-info: ## Print information about active Conda environment using <CONDA
.PHONY: _conda-poetry-install
_conda-poetry-install:
$(CONDA_TOOL) run -n $(CONDA_ENVIRONMENT) $(CONDA_TOOL) install -c conda-forge poetry; \


CURRENT_VERSION=$$(poetry --version | awk '{print $$NF}' | tr -d ')'); \
REQUIRED_VERSION="1.6.0"; \
if [ "$$(printf '%s\n' "$$REQUIRED_VERSION" "$$CURRENT_VERSION" | sort -V | head -n1)" != "$$REQUIRED_VERSION" ]; then \
echo "Poetry installed version $$CURRENT_VERSION is less than minimal version $$REQUIRED_VERSION, fixing urllib3 version to prevent problems"; \
poetry add "urllib3<2.0.0"; \
fi;

.PHONY:conda-poetry-install
conda-poetry-install: ## Install Poetry in currently active Conda environment. Will fail if Conda is not found
Expand Down
18 changes: 15 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ poetry add "<dependency_name>==<x.x.x>"
```

To add a new dependency to a specific group of dependencies
(for exemple, the developer dependencies):
(for example, the development dependencies):

```
poetry add --group dev <dependency_name>
Expand All @@ -34,7 +34,11 @@ Therefore, new additions should try to follow this design pattern and either imp
new concrete classes or create new abstract classes and their implementations for
completely new behavior or needs.

Secondly, a dependency-injection approach is to be preferred, as well as a composition
Avoid multiple levels of inheritance; the approach should be _AbstractClass ->
[ConcreteClass1, ConcreteClass2, ...]_ and not
_AbstractClass -> ChildClass -> GrandChildClass -> ..._

Next, a dependency-injection approach is to be preferred, as well as a composition
approach when creating new modules or extending existing ones.

Functional approaches are also acceptable when appropriate, but classes should still
Expand All @@ -48,4 +52,12 @@ New contributions should include appropriate tests.
## Docstring and type hinting

Docstring format should follow the Numpy standard and type hinting should be used
as per the PEP8 standard : https://docs.python.org/3/library/typing.html
as per the PEP8 standard : https://docs.python.org/3/library/typing.html

## Version management and Changelogs

Changes to this repository should be tracked in the [CHANGES.md](CHANGES.md) file.

Actual version handling should be done using the following targets:

![](img/versionning_targets.png)
Loading

0 comments on commit 8fdb97f

Please sign in to comment.