Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spell check workflow #22

Merged
merged 6 commits into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ on:
push:
branches:
- master
- "release/v[0-9].[0-9].[0-9]"
- 'release/v[0-9]+\.[0-9]+\.[0-9]+'
- "feature/**"
pull_request:
types:
- opened
- synchronize
branches:
- 'release/v[0-9]+\.[0-9]+\.[0-9]+'
- "feature/**"
# Manual trigger
workflow_dispatch:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Spell check

on:
push:
branches:
- master
- 'release/v[0-9]+\.[0-9]+\.[0-9]+'
- "feature/**"
pull_request:
types:
- opened
- synchronize
branches:
- 'release/v[0-9]+\.[0-9]+\.[0-9]+'
- "feature/**"
# Manual trigger
workflow_dispatch:

jobs:
check:
name: Codespell
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
with:
check_filenames: true
skip: "**/*.svg"
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if(NOT DEFINED LIB_PATH)
message(FATAL_ERROR
"Path to dependencies must be specified."
" All dependencies must be available in the same directory."
" Use -DLIB_PATH=/path/to/dependenices to set this path."
" Use -DLIB_PATH=/path/to/dependencies to set this path."
)
else()
list(APPEND CMAKE_PREFIX_PATH ${LIB_PATH})
Expand Down
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# ChemTools

ChemTools is a collection of thermochemical tools for certain chemical and combustion applications.

## Status

This project is currently in the early stages of development. All the necessary infrastructure is in place though. The work on the core applications is in progress.

## Description

Ultimately, the following applications will become available:

- Chemical reactor with one or two properties held constant:
- pressure,
- volume,
Expand All @@ -14,31 +18,36 @@ Ultimately, the following applications will become available:
- Chemical reactor with user-defined Python scripts providing functions for:
- the volume and its time derivative as a function of time, or
- the temperature and pressure as a function of time.
- One-dimensional premixed flames.
- One-dimensional premixed flames.
- Flamelet library generator using:
- the β-PDF approach, or
- the Presumed Mapping Function approach.

## Language, build configuration and testing

ChemTools:

- is written in C++14,
- has CMake support, and
- includes automated unit tests.

## How to build

- To build the code:
- mkdir build && cd build
- cmake -DLIB_PATH=/path/to/dependcies /path/to//ChemTools/
- cmake -DLIB_PATH=/path/to/dependencies /path/to//ChemTools/
- To build the tests (in-source possible for now because some tests use relative paths):
- cd path/to//ChemTools/
- mkdir build
- cmake -DLIB_PATH=/path/to/dependcies -DTEST_VERBOSE=ON ../tests
Notes:
- cmake -DLIB_PATH=/path/to/dependencies -DTEST_VERBOSE=ON ../tests
Notes:
- Option LIB_PATH adds the specified path to CMAKE_PREFIX_PATH. Please refer to the next section for a complete list of dependencies.
- Option TEST_VERBOSE is used to log some tests results to standard output. By default it is set to OFF.

## Dependencies

ChemTools relies on a number of excellent third-party libraries:

- [Cantera](https://github.com/Cantera/cantera) for the computation of thermodynamic and transport properties, and chemical kinetics,
- [Sundials](https://github.com/LLNL/sundials) for the numerical solution of systems of ordinary differential equations,
- [eigen](https://gitlab.com/libeigen/eigen) for numerical linear algebra computations,
Expand All @@ -52,10 +61,13 @@ ChemTools relies on a number of excellent third-party libraries:
- various Boost libraries.

## Platforms

Chemtools is developed and tested under Linux. Build tested with GCC versions 7.3.0 and 11.2.0 and CMake version 3.20.2.

## Documentation

Documentation will be made available as soon some basic applications are published.

## License

ChemTools is distributed under the MIT license.
2 changes: 1 addition & 1 deletion include/embedded_python/helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace CppPy
{

/*
Initialises and finalises the Python interprete
Initialises and finalises the Python interpreter
When needed, a single instance should be created during initialisation
*/

Expand Down
2 changes: 1 addition & 1 deletion include/input/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Input
// YAML parser
void Parse();

// vaildation of parsed input
// validation of parsed input
void Validate() const;

public:
Expand Down
2 changes: 1 addition & 1 deletion include/results/hdf5_writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace Results
// opens the results file
void OpenFile();

// creates gropus of registered variables
// creates groups of registered variables
void CreateGroups();

// creates scalar datasets in groups
Expand Down
2 changes: 1 addition & 1 deletion include/results/observer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Results
virtual void Update(class Subject&) = 0;
};

// Meta of registerd variables
// Meta of registered variables
class Meta
{
public:
Expand Down
6 changes: 3 additions & 3 deletions scripts/dependencies_installer/BoostInstaller.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class BoostInstaller {
}
}

hidden [void] Downlaod() {
hidden [void] Download() {
$VersionUnderScore = $this.Tag.Replace('.', '_')
$this.Stem = $this.Name + '_' + $VersionUnderScore
$FileName = $this.Stem + ($Global:IsLinux ? '.tar.gz' : '.zip')
Expand Down Expand Up @@ -108,7 +108,7 @@ class BoostInstaller {
Start-Process -FilePath ('./bootstrap' + ($Global:IsLinux ? '.sh' : '.bat')) -Wait -NoNewWindow
$ExitCode = $LASTEXITCODE
if ( $ExitCode -ne 0 ) {
throw ('Failed to boostrap boost.')
throw ('Failed to bootstrap boost.')
}
Pop-Location
}
Expand Down Expand Up @@ -148,7 +148,7 @@ class BoostInstaller {
[void] Run() {
if ($this.DoInstall) {
Utilities\PrintDecoratedMessage $this.Name "Start"
$this.Downlaod()
$this.Download()
$this.Extract()
$this.Bootstrap()
$this.Install()
Expand Down
2 changes: 1 addition & 1 deletion scripts/dependencies_installer/InstallDependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ catch {
}

Write-Host ( `
"`nAll dependncies are now installed!`n" `
"`nAll dependencies are now installed!`n" `
+ "`nYou must now either:`n" `
+ (" - add {0} to your path before building, or`n" -f $Global:InstallDir) `
+ (" - configure the build with -DCMAKE_PREFIX_PATH={0}." -f $Global:InstallDir) `
Expand Down
2 changes: 1 addition & 1 deletion src/input_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ namespace Input
{
throw std::runtime_error(fmt::format("Input error: found invalid species: [{}].\n", invalid_species));
}
} // existance scope
} // existence scope

// check if species are positive
{
Expand Down
2 changes: 1 addition & 1 deletion src/results/hdf5_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ namespace Results
void HDF5Writer::CreateGroups()
{
std::vector<Meta::Scalar> const& scalars = subject.results_meta.scalars;
// extract unique group names and and cerate groups
// extract unique group names and and create groups
std::unordered_set<std::string> unique_groups;
// scalar
for (auto it_scalars = scalars.begin(); it_scalars != scalars.end(); ++it_scalars)
Expand Down
6 changes: 3 additions & 3 deletions src/sundials/cvode/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ namespace SUNDIALS
}

// initialize the integrator memory and specify the user's
// right hand side function in u'= f(t,u), the inital time,
// right hand side function in u'= f(t,u), the initial time,
// and the initial dependent variable vector u
ret_code = CVodeInit(memory,
Client::RightHandSideCallback,
Expand Down Expand Up @@ -399,7 +399,7 @@ namespace SUNDIALS
return ret_code;
}

// set the maximum number of nonlinear iteartions
// set the maximum number of nonlinear iterations
ret_code = CVodeSetMaxNonlinIters(memory, solver_ctrl.max_nonlin_iters);
if (ret_code != CV_SUCCESS)
{
Expand Down Expand Up @@ -449,7 +449,7 @@ namespace SUNDIALS
This method returns a success, warning or failure code to the client code.
The client code must:
- decide what to do in case of failure
- assess the impact of warnings when they occurr
- assess the impact of warnings when they occur
*/
int IStrategy::Integrate(realtype const time_target)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if(NOT DEFINED LIB_PATH)
message(FATAL_ERROR
"Path to dependencies must be specified."
" All dependencies must be available in the same directory."
" Use -DLIB_PATH=/path/to/dependenices to set this path."
" Use -DLIB_PATH=/path/to/dependencies to set this path."
)
else()
list(APPEND CMAKE_PREFIX_PATH ${LIB_PATH})
Expand Down