Skip to content

Commit 822482f

Browse files
committed
Documentation fixes
1 parent 9285458 commit 822482f

File tree

7 files changed

+131
-20
lines changed

7 files changed

+131
-20
lines changed

Doxyfile

+2
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,8 @@ EXCLUDE_PATTERNS += */librapid/fftw/*
986986
EXCLUDE_PATTERNS += */opencl/kernels/*
987987
EXCLUDE_PATTERNS += */cuda/kernels/*
988988
EXCLUDE_PATTERNS += */opencl/opencl.hpp
989+
EXCLUDE_PATTERNS += */librapid/bindings/*
990+
EXCLUDE_PATTERNS += *.py
989991

990992
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
991993
# (namespaces, classes, functions, etc.) that should be excluded from the

docs/source/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@
154154
exclude_patterns = [
155155
"*jitify*",
156156
"*fmt*",
157-
"*blas/*"
157+
"*blas/*",
158+
"*bindings*"
158159
]
159160

160161
# -- Options for HTML output -------------------------------------------------

librapid/include/librapid/datastructures/bitset.hpp

+9-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ namespace librapid {
66
class BitSet {
77
public:
88
template<uint64_t otherBits, bool otherStackAlloc>
9+
10+
#ifndef LIBRAPID_DOXYGEN
911
using BitSetMerger =
1012
BitSet<(numBits_ > otherBits ? numBits_ : otherBits), stackAlloc_ && otherStackAlloc>;
11-
12-
friend BitSet<numBits_, !stackAlloc_>;
13+
#else
14+
using BitSetMerger = BitSet;
15+
#endif
1316

1417
using ElementType = uint64_t;
1518
static constexpr bool stackAlloc = stackAlloc_;
@@ -414,11 +417,13 @@ struct fmt::formatter<librapid::BitSet<numBits, stackAlloc>, Char> {
414417
}
415418
};
416419

417-
LIBRAPID_SIMPLE_IO_NORANGE(uint64_t numBits COMMA bool stackAlloc, librapid::BitSet<numBits COMMA stackAlloc>)
420+
LIBRAPID_SIMPLE_IO_NORANGE(uint64_t numBits COMMA bool stackAlloc,
421+
librapid::BitSet<numBits COMMA stackAlloc>)
418422

419423
// std ostream support
420424
template<uint64_t numElements, bool stackAlloc>
421-
std::ostream &operator<<(std::ostream &os, const librapid::BitSet<numElements, stackAlloc> &bitset) {
425+
std::ostream &operator<<(std::ostream &os,
426+
const librapid::BitSet<numElements, stackAlloc> &bitset) {
422427
return os << fmt::format("{}", bitset);
423428
}
424429

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ sdist.exclude = [
4444
name = "librapid"
4545
version = "0.7.3"
4646
description = "A high-performance library for arrays and numeric calculations"
47+
readme = "README.md"
4748
long_description = ["file: README.md"]
4849
long_description_content_type = "text/markdown"
4950
author = "Toby Davis"

scripts/setVersion.py

+15-15
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"""
88

99
import sys
10-
import regex
10+
import re
1111
import argparse
1212
from datetime import datetime
1313

@@ -19,9 +19,9 @@
1919
try:
2020
with open("../version.txt", "r") as versionFile:
2121
text = versionFile.read()
22-
currentMajorVersion = regex.search("MAJOR [0-9]+", text).group().split()[1]
23-
currentMinorVersion = regex.search("MINOR [0-9]+", text).group().split()[1]
24-
currentPatchVersion = regex.search("PATCH [0-9]+", text).group().split()[1]
22+
currentMajorVersion = re.search("MAJOR [0-9]+", text).group().split()[1]
23+
currentMinorVersion = re.search("MINOR [0-9]+", text).group().split()[1]
24+
currentPatchVersion = re.search("PATCH [0-9]+", text).group().split()[1]
2525
print(f"Current Version: v{currentMajorVersion}.{currentMinorVersion}.{currentPatchVersion}")
2626
except Exception as e:
2727
print("[ ERROR ] Failed to read version.txt")
@@ -42,7 +42,7 @@
4242

4343
if args.version:
4444
# Validate version number
45-
if not regex.match("[0-9]+\.[0-9]+\.[0-9]+", args.version):
45+
if not re.match("[0-9]+\.[0-9]+\.[0-9]+", args.version):
4646
print("[ ERROR ] Invalid version number")
4747
sys.exit(1)
4848
newMajorVersion = args.version.split(".")[0]
@@ -87,13 +87,13 @@
8787
citationFile.write(template)
8888
print("Written to CITATION.cff")
8989

90-
# # Write to .hdoc.toml
91-
# with open("tmp/hdocTemplate.toml", "r") as templateFile:
92-
# template = templateFile.read()
93-
# print("Loaded .hdoc.toml template")
94-
#
95-
# with open("../.hdoc.toml", "w") as hdocFile:
96-
# versionString = f"v{newMajorVersion}.{newMinorVersion}.{newPatchVersion}"
97-
# template = template.replace("$${{ INSERT_VERSION_NUMBER_HERE }}$$", versionString)
98-
# hdocFile.write(template)
99-
# print("Written to .hdoc.toml")
90+
# Write to pyproject.toml
91+
with open("tmp/pyprojectTemplate.toml", "r") as templateFile:
92+
template = templateFile.read()
93+
print("Loaded pyproject.toml template")
94+
95+
with open("../pyproject.toml", "w") as pyprojectFile:
96+
versionString = f"\"{newMajorVersion}.{newMinorVersion}.{newPatchVersion}\""
97+
template = template.replace("$${{ INSERT_VERSION_NUMBER_HERE }}$$", versionString)
98+
pyprojectFile.write(template)
99+
print("Written to pyproject.toml")

scripts/tmp/doxyTemplate

+2
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,8 @@ EXCLUDE_PATTERNS += */librapid/fftw/*
987987
EXCLUDE_PATTERNS += */opencl/kernels/*
988988
EXCLUDE_PATTERNS += */cuda/kernels/*
989989
EXCLUDE_PATTERNS += */opencl/opencl.hpp
990+
EXCLUDE_PATTERNS += */librapid/bindings/*
991+
EXCLUDE_PATTERNS += *.py
990992

991993
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
992994
# (namespaces, classes, functions, etc.) that should be excluded from the

scripts/tmp/pyproject.toml

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
[build-system]
2+
requires = [
3+
"setuptools",
4+
"wheel",
5+
"pybind11",
6+
"cibuildwheel",
7+
"scikit-build-core",
8+
"cmake",
9+
"ninja",
10+
"icecream",
11+
"build"
12+
]
13+
build-backend = "scikit_build_core.build"
14+
15+
[tool.scikit-build]
16+
17+
cmake.build-type = "Release"
18+
19+
ninja.make-fallback = true
20+
21+
sdist.exclude = [
22+
"CMakeLists.txt",
23+
"cmake",
24+
"CMakeFiles",
25+
"build",
26+
"dist",
27+
"*.h",
28+
"*.c",
29+
"*.hpp",
30+
"*.cpp",
31+
"*.tcc",
32+
"*.cxx",
33+
"*.cu",
34+
"*.cuh",
35+
"*.cl",
36+
"*.so",
37+
"*.dylib",
38+
"*.dll",
39+
"*.doc",
40+
"*.tgz",
41+
]
42+
43+
[project]
44+
name = "librapid"
45+
version = "$${{ INSERT_VERSION_NUMBER_HERE }}$$"
46+
description = "A high-performance library for arrays and numeric calculations"
47+
readme = "README.md"
48+
long_description = ["file: README.md"]
49+
long_description_content_type = "text/markdown"
50+
author = "Toby Davis"
51+
author_email = "[email protected]"
52+
license = { file = "LICENSE" }
53+
keywords = [
54+
"librapid",
55+
"high-performance computing",
56+
"c++",
57+
"mathematics",
58+
"array",
59+
"matrix",
60+
"vector",
61+
"tensor",
62+
"gpu",
63+
"cuda",
64+
"openmp",
65+
"multithreading",
66+
"multicore",
67+
"parallel"
68+
]
69+
classifiers = [
70+
"Development Status :: 4 - Beta",
71+
"Intended Audience :: Developers",
72+
"Intended Audience :: Science/Research",
73+
"License :: OSI Approved :: MIT License",
74+
"Operating System :: MacOS",
75+
"Operating System :: Microsoft :: Windows",
76+
"Operating System :: POSIX :: Linux",
77+
"Programming Language :: C++",
78+
"Programming Language :: Python :: 3",
79+
"Programming Language :: Python :: 3.6",
80+
"Programming Language :: Python :: 3.7",
81+
"Programming Language :: Python :: 3.8",
82+
"Programming Language :: Python :: 3.9",
83+
"Programming Language :: Python :: 3.10",
84+
"Programming Language :: Python :: 3.11",
85+
"Programming Language :: Python :: 3.12",
86+
"Topic :: Scientific/Engineering",
87+
"Topic :: Scientific/Engineering :: Mathematics",
88+
"Topic :: Software Development",
89+
"Topic :: Software Development :: Libraries",
90+
"Topic :: Software Development :: Libraries :: Python Modules",
91+
"Topic :: Utilities",
92+
]
93+
94+
[project.urls]
95+
homepage = "https://tobydavis.dev/librapid"
96+
documentation = "https://librapid.readthedocs.io/en/latest/"
97+
repository = "https://github.com/LibRapid/librapid"
98+
download = "https://pypi.org/project/librapid/#files"
99+
bug-tracker = "https://github.com/LibRapid/librapid/issues"
100+

0 commit comments

Comments
 (0)