From 4a3e6395c10881125afc68445e99ab9c7e74e9b3 Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Thu, 15 Aug 2024 23:27:01 -0500 Subject: [PATCH] add metadata, fix c coverage in Makefile --- .gitattributes | 4 ++-- c/Makefile | 11 +++++++++-- rust/Cargo.toml | 8 ++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index fb88970a..812c80c9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8,6 +8,6 @@ c/*/*.c linguist-language=c c/*/*.h linguist-language=c cplusplus/*.cpp linguist-language=c++ -cplusplus/*.h linguist-language=c++ +cplusplus/*.hpp linguist-language=c++ cplusplus/*/*.cpp linguist-language=c++ -cplusplus/*/*.h linguist-language=c++ +cplusplus/*/*.hpp linguist-language=c++ diff --git a/c/Makefile b/c/Makefile index 408dbf15..b9b21cd8 100644 --- a/c/Makefile +++ b/c/Makefile @@ -14,6 +14,13 @@ PROXY_ARG= endif endif +COV?=false +ifneq ($(COV),false) +pytest_args= -vl --benchmark-sort=fullname --benchmark-group-by=fullfunc --benchmark-verbose --cov +else +pytest_args= -vl --benchmark-sort=fullname --benchmark-group-by=fullfunc --benchmark-verbose +endif + .PHONY: help help: @echo " $(BLUE)test$(NC) run through all tests in sequence. Utilizes the Python test runner infrastructure" @@ -25,11 +32,11 @@ help: .PHONY: test_% test_%: ../LICENSE dependencies - @$(PY) -m pytest -dvl -n$* test_euler.py --cov + @$(PY) -m pytest $(pytest_args) -d -n$* test_euler.py .PHONY: test test: ../LICENSE dependencies - @$(PY) -m pytest -vl --benchmark-sort=fullname --benchmark-group-by=fullfunc --benchmark-verbose test_euler.py --cov + @$(PY) -m pytest $(pytest_args) test_euler.py Unity/src/unity.c: @git submodule init diff --git a/rust/Cargo.toml b/rust/Cargo.toml index b81355ff..ab4c889b 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,7 +1,15 @@ [package] +authors = ["Olivia Appleton"] name = "rust" +description = "Project Euler solutions in Rust" +documentation = "https://euler.oliviaappleton.com" +homepage = "https://euler.oliviaappleton.com" +repository = "https://github.com/LivInTheLookingGlass/Euler" version = "0.1.0" edition = "2021" +rust-version = "1.69" +license = "GPL-3.0" +license-file = "../LICENSE" [dependencies] chrono = "0.4.38"