Skip to content

Commit e82ac7d

Browse files
committed
merge
2 parents b516aa7 + 84ebb5c commit e82ac7d

File tree

340 files changed

+15320
-1633
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

340 files changed

+15320
-1633
lines changed

.devcontainer/api_reference.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ clone_if_missing "https://github.com/JohelEGP/cxxdraft-htmlgen.git" "standardese
102102

103103
# Configure CMake
104104
echo "Configuring CMake for API reference documentation..."
105-
BUILD_DIR="$PROJECT_ROOT/build/docs/api_reference"
106-
SOURCE_DIR="$PROJECT_ROOT/docs/api_reference/src"
105+
BUILD_DIR="$PROJECT_ROOT/build/docs/reference/api_reference"
106+
SOURCE_DIR="$PROJECT_ROOT/docs/reference/api_reference/src"
107107

108108
if [[ ! -d "$SOURCE_DIR" ]]; then
109109
echo "Error: Source directory not found: $SOURCE_DIR" >&2
@@ -119,9 +119,9 @@ cmake -S "$SOURCE_DIR" \
119119
echo "CMake configuration completed successfully."
120120

121121
# Create symlink for generated HTML documentation
122-
# This allows accessing the generated docs via docs/api_reference/gen
122+
# This allows accessing the generated docs via docs/reference/api_reference/gen
123123
echo "Creating symlink for generated documentation..."
124-
SYMLINK_TARGET="$PROJECT_ROOT/docs/api_reference/gen"
124+
SYMLINK_TARGET="$PROJECT_ROOT/docs/reference/api_reference/gen"
125125
SYMLINK_SOURCE="${BUILD_DIR}/mp-units.html"
126126

127127
# Ensure the parent directory exists

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ ignore =
55
E711,
66
# comparison to True should be 'if cond is True:' or 'if cond:'
77
E712,
8+
# whitespace before ':' - conflicts with Black formatter
9+
E203,
810
# line break before binary operator
911
W503
1012
per-file-ignores =

.github/workflows/documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ jobs:
8282
git clone https://github.com/JohelEGP/cxxdraft-htmlgen.git --branch=standardese_sources_base --depth=1
8383
- name: Generate API reference
8484
run: |
85-
cmake -S docs/api_reference/src -B build \
85+
cmake -S docs/reference/api_reference/src -B build \
8686
-DCMAKE_MODULE_PATH="${{ github.workspace }}/jegp.cmake_modules/modules" \
8787
-DJEGP_STANDARDESE_SOURCES_GIT_REPOSITORY="${{ github.workspace }}/draft" \
8888
-DJEGP_CXXDRAFT_HTMLGEN_GIT_REPOSITORY="${{ github.workspace }}/cxxdraft-htmlgen"
8989
cmake --build build
90-
mv build/mp-units.html docs/api_reference/gen
90+
mv build/mp-units.html docs/reference/api_reference/gen
9191
- name: Installing pip dependencies
9292
run: |
9393
pip install conan mkdocs-material mkdocs-rss-plugin mkdocs-material[imaging] mkdocs-exclude mike

.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
*.out
2929
*.app
3030

31+
# macOS files
32+
.DS_Store
33+
3134
# IDE-specific
3235
/.idea/
3336
/.vs/
@@ -48,8 +51,8 @@ CMakeUserPresets.json
4851
/test_package/build/
4952

5053
# cxxdraft-htmlgen
51-
docs/api_reference/src/source/
52-
docs/api_reference/gen
54+
docs/reference/api_reference/src/source/
55+
docs/reference/api_reference/gen
5356

54-
# macOS files
55-
.DS_Store
57+
# Generated website files
58+
site/

CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,23 @@ For more, see the [official documentation](https://mpusz.github.io/mp-units) and
348348
[cmake time-trace support]: https://github.com/mpusz/mp-units/releases/tag/v2.5.0
349349

350350

351+
## AI-Generated Contributions
352+
353+
We welcome the use of LLMs (Large Language Models) to help you write better prose, generate
354+
unit test cases, or brainstorm solutions. However, to maintain the high technical standards
355+
of **mp-units**, we ask you to follow these rules:
356+
357+
1. **Rationale First:** Never submit a "blind refactor." If an AI suggests a different
358+
design, you must be able to explain the rationale behind it.
359+
2. **Review Your Diff:** Ensure the AI hasn't rewritten entire files unnecessarily.
360+
Large, monolithic diffs for small changes will be rejected.
361+
3. **Verify Quality:** AI often suggests "average" code. Since this is a bleeding-edge
362+
library using C++20/23, ensure the AI hasn't introduced legacy patterns or inefficient
363+
templates.
364+
4. **Transparency:** If a significant portion of your PR was generated by AI, please
365+
disclose it. This helps reviewers focus on correctness rather than style.
366+
367+
351368
## Before committing git changes
352369

353370
There are a few recommended checks before committing and pushing changes.

CONTRIBUTORS.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ wouldn't be possible without the dedication and hard work of our amazing communi
3232

3333
## Statistics
3434

35-
- **Total Contributors**: 34
36-
- **Total Contributions**: 318
35+
- **Total Contributors**: 36
36+
- **Total Contributions**: 326
3737
- **Major Contributors** (50+ contributions): 0
3838
- **Regular Contributors** (10-49 contributions): 10
39-
- **Occasional Contributors** (1-9 contributions): 24
39+
- **Occasional Contributors** (1-9 contributions): 26
4040

41-
_Last updated: 2025-12-13_
41+
_Last updated: 2026-01-01_
4242

4343

4444
### Major Contributors
@@ -57,8 +57,8 @@ _10-49 contributions_
5757
- **[rbrugo](https://github.com/rbrugo)** (44 contributions)
5858
- **[yasamoka](https://github.com/yasamoka)** (20 contributions)
5959
- **[hofbi](https://github.com/hofbi)** (19 contributions)
60+
- **[rothmichaels](https://github.com/rothmichaels)** (19 contributions)
6061
- **[Twon](https://github.com/Twon)** (17 contributions)
61-
- **[rothmichaels](https://github.com/rothmichaels)** (17 contributions)
6262
- **[kwikius](https://github.com/kwikius)** (16 contributions)
6363
- **[RalphSteinhagen](https://github.com/RalphSteinhagen)** (14 contributions)
6464
- **[mikeford1](https://github.com/mikeford1)** (13 contributions)
@@ -73,9 +73,11 @@ _Everyone who has contributed to mp-units_
7373
- **[HazardyKnusperkeks](https://github.com/HazardyKnusperkeks)**
7474
- **[nebkat](https://github.com/nebkat)**
7575
- **[jansende](https://github.com/jansende)**
76+
- **[kammce](https://github.com/kammce)**
7677
- **[jvocht](https://github.com/jvocht)**
7778
- **[uilianries](https://github.com/uilianries)**
7879
- **[sohamroy19](https://github.com/sohamroy19)**
80+
- **[alejandro-alvarez-sonarsource](https://github.com/alejandro-alvarez-sonarsource)**
7981
- **[alex-tee](https://github.com/alex-tee)**
8082
- **[go2sh](https://github.com/go2sh)**
8183
- **[dkavolis](https://github.com/dkavolis)**

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ dimensional analysis and safe manipulation of units, quantities, and quantity po
7272
- **Rich Text Formatting** – Text formatting support with extensive options &
7373
character sets
7474
- **Flexible Usage** – C++ modules support (when available) and header‑only usage
75-
- **Configurable** – Contracts, freestanding mode, and natural units (experimental)
75+
- **Configurable** – Contracts and freestanding mode
7676
- **Interoperable** – Seamless pathways for legacy and external libraries
7777

7878
### Quick Example
@@ -117,9 +117,9 @@ analysis at compile time—without sacrificing runtime performance or accuracy.
117117
Here's a broader preview showcasing **mp-units** capabilities:
118118
119119
```cpp
120-
#include <mp-units/systems/international.h>
121120
#include <mp-units/systems/isq.h>
122121
#include <mp-units/systems/si.h>
122+
#include <mp-units/systems/yard_pound.h>
123123
#include <format>
124124
#include <iomanip>
125125
#include <iostream>
@@ -128,15 +128,15 @@ Here's a broader preview showcasing **mp-units** capabilities:
128128
using namespace mp_units;
129129
130130
constexpr QuantityOf<isq::speed> auto avg_speed(QuantityOf<isq::length> auto d,
131-
QuantityOf<isq::time> auto t)
131+
QuantityOf<isq::duration> auto t)
132132
{
133133
return d / t;
134134
}
135135
136136
int main()
137137
{
138138
using namespace mp_units::si::unit_symbols;
139-
using namespace mp_units::international::unit_symbols;
139+
using namespace mp_units::yard_pound::unit_symbols;
140140
141141
constexpr quantity v1 = 110 * km / h;
142142
constexpr quantity v2 = 70 * mph;
@@ -156,7 +156,7 @@ int main()
156156
}
157157
```
158158

159-
[![Try it live on Compiler Explorer](https://img.shields.io/badge/Try_live_on-Compiler_Explorer-black?style=for-the-badge&logo=compilerexplorer&labelColor=black&color=67C52A)](https://godbolt.org/z/fxcjs19ah)
159+
[![Try it live on Compiler Explorer](https://img.shields.io/badge/Try_live_on-Compiler_Explorer-black?style=for-the-badge&logo=compilerexplorer&labelColor=black&color=67C52A)](https://godbolt.org/z/rYq7cfdxY)
160160

161161

162162
## 🔍 Try It Out

conanfile.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class MPUnitsConan(ConanFile):
6161
"no_crtp": [True, False],
6262
"contracts": ["none", "gsl-lite", "ms-gsl"],
6363
"freestanding": [True, False],
64-
"natural_units": [True, False],
6564
}
6665
default_options = {
6766
# "cxx_modules" default set in config_options()
@@ -71,7 +70,6 @@ class MPUnitsConan(ConanFile):
7170
"import_std": False, # still experimental in CMake
7271
"contracts": "gsl-lite",
7372
"freestanding": False,
74-
"natural_units": True,
7573
}
7674
implements = ["auto_header_only"]
7775
exports = "LICENSE.md"
@@ -285,7 +283,6 @@ def generate(self):
285283
tc.cache_variables["MP_UNITS_API_STD_FORMAT"] = opt.std_format
286284
tc.cache_variables["MP_UNITS_API_NO_CRTP"] = opt.no_crtp
287285
tc.cache_variables["MP_UNITS_API_CONTRACTS"] = str(opt.contracts).upper()
288-
tc.cache_variables["MP_UNITS_API_NATURAL_UNITS"] = opt.natural_units
289286

290287
tc.generate()
291288
deps = CMakeDeps(self)
@@ -346,10 +343,6 @@ def package_info(self):
346343
self.cpp_info.components["core"].defines.append(
347344
"MP_UNITS_API_NO_CRTP=" + str(int(self.options.no_crtp == True))
348345
)
349-
self.cpp_info.components["core"].defines.append(
350-
"MP_UNITS_API_NATURAL_UNITS="
351-
+ str(int(self.options.natural_units == True))
352-
)
353346

354347
# handle hosted configuration
355348
if self.options.freestanding:

docs/blog/posts/2.1.0-released.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ We've also introduced an innovative approach that allows us to specify if such
130130
conversions should happen implicitly or if they need to be forced explicitly.
131131

132132
More on this subject can be found in the [Interoperability with Other
133-
Libraries](../../users_guide/use_cases/interoperability_with_other_libraries.md)
133+
Libraries](../../how_to_guides/interoperability_with_other_libraries.md)
134134
chapter.
135135

136136

docs/blog/posts/2.2.0-released.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ code like the below anymore:
143143
Additionally, we merged all of the compatibility-related macros into one header
144144
file `mp-units/compat_macros.h`. This header file should be explicitly included
145145
before importing C++ modules if we want to benefit from the
146-
[Wide Compatibility tools](../../users_guide/use_cases/wide_compatibility.md).
146+
[Wide Compatibility tools](../../how_to_guides/wide_compatibility.md).
147147

148148

149149
## Better control over the library's API

0 commit comments

Comments
 (0)