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

Test the Windows CI on dev #200

Open
wants to merge 106 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
508983a
Add qNParEGO Ax MOO Interface
ronald-jaepel Apr 22, 2024
fdb7dcf
Relax tolerance for MOO convergence test
ronald-jaepel Apr 22, 2024
69a5478
Unify calling evaluation functions for individuals and populations
schmoelder Apr 21, 2024
1a4debb
Ensure callback dirs are created for final callback
ronald-jaepel Apr 29, 2024
9720966
Update docstrings
schmoelder Nov 24, 2023
83fff8f
Add method to create fraction
schmoelder Nov 24, 2023
8cc02e1
Add `start` and `end` times to `Fraction`
schmoelder Jan 19, 2024
159b374
Specify and validate reference type for difference metrics
schmoelder Jan 19, 2024
11c59f4
Add classes to __all__
schmoelder Jan 20, 2024
4d7fc10
Add `only_transforms_solution` flag
schmoelder Jan 22, 2024
a8ed736
Only resample if flag is set
schmoelder Jan 22, 2024
d20d9cd
Formatting
schmoelder Jan 20, 2024
52e33bf
Fix typo
schmoelder Mar 2, 2024
a59372a
Add FractionationReference
schmoelder Jan 19, 2024
8f0faf6
Add FractionationSSE
schmoelder Jan 19, 2024
6bbb6c8
Fix add_concentration_profile (#140)
schmoelder Jun 19, 2024
12d862b
Always inherit cadet path
ronald-jaepel May 22, 2024
19e5457
Add method to calculate volumetric flow rate from velocity.
schmoelder Feb 15, 2023
3356cde
Rename .t0 to .calculate_interstitial_rt in Cstr
ronald-jaepel Mar 20, 2024
6fd5a44
Do not modify LD_LIBRARY_PATH when setting install_path
schmoelder Jun 17, 2024
618fb1f
Adapt to new DG interface in CADET-Core
schmoelder Mar 20, 2024
8ce41f3
Fix using minute for x-Axis
schmoelder Jun 17, 2024
1c9251f
Freeze discretization attributes
schmoelder Jun 17, 2024
4f1671b
Update docstrings
schmoelder Jun 17, 2024
7ddabeb
Fix incorrect declaration in AntiLangmuir as optional
AntoniaBerger May 22, 2024
cdc11b9
Change AntiLangmuir coefficient from SizedUnsignedList to SizedList
AntoniaBerger Jun 10, 2024
6150667
Raise exception when adding connections to Inlets or from Outlets
schmoelder Jun 25, 2024
e706472
Fix header level in documentation for unit operation
schmoelder Jun 25, 2024
2e6a7e3
Fix bug when adding linear constraints
schmoelder Jun 26, 2024
39402fe
Fix plot_at_position
hannahlanzrath Jul 3, 2024
0f900b3
Fix divide by zero error in pearsonr_mat
ronald-jaepel Jul 8, 2024
ead85ce
Avoid duplicate entries in user_solution_times
schmoelder Jun 21, 2024
736a4b4
Improve tearDown after tests
schmoelder Dec 9, 2023
b9e637e
Add FanoutCache
schmoelder Mar 14, 2024
b114674
Add colloidal binding model
Jun 20, 2024
3a177b7
Add support for numpy v2.0.0
schmoelder Jul 22, 2024
e85ca8d
Fix typo in set_diameter methods
schmoelder Aug 5, 2024
022ecf3
Fix bug when adding linear equality constraints
schmoelder Jun 26, 2024
b715f57
Explicitly specify support for bounds
schmoelder Jun 26, 2024
e0ebd09
Return np.array for linear constraints
schmoelder Jun 26, 2024
8032e81
Fix comparison logic for linear equality constraints
schmoelder Jun 26, 2024
498f64f
Use common optimizer interface for tolerances
schmoelder Jun 26, 2024
407eba8
Make optimial solution a property
schmoelder Jun 27, 2024
a68557e
Formatting
schmoelder Jun 26, 2024
5d97c65
Add option to (not) close cache on pruning
schmoelder Jun 26, 2024
9174bd7
Do not plot figures if progress_frequency is None
schmoelder Jun 26, 2024
1673101
Use in-memory cache for testing optimizer behaviour
schmoelder Jun 26, 2024
e59d9ae
Update population size in non-default parameters
schmoelder Jun 26, 2024
76e03e8
Add NelderMead and COBYLA to optimizer tests
schmoelder Jun 27, 2024
0a5fba1
Add type hints and update docstrings
schmoelder Jun 28, 2024
4b20473
Add method to evaluate bounds violation
schmoelder Jun 28, 2024
061def5
Cast np.bool_ to bool
schmoelder Jun 29, 2024
32f6a29
Allow evaluation of population for getting (in)dependent values
schmoelder Jun 28, 2024
572e96e
Add option to evaluate nonlinear constraints when checking individual
schmoelder Jun 28, 2024
e4cc118
Rename eps_eq -> eps_lineq
schmoelder Jun 28, 2024
b3fbe27
Make callback error logger warning more verbose.
ronald-jaepel Aug 6, 2024
1d1037b
Update gets_dependent_variables decorators
schmoelder Jul 31, 2024
3a8d88e
Rename decorator wrapper functions to improve stacktrace readability.
ronald-jaepel Jul 31, 2024
815f4a4
Add tolerance argument for constraint violation check methods
schmoelder Aug 6, 2024
3b87fe8
Handle maximum number of initial evaluations in Ax
schmoelder Aug 8, 2024
0115300
Distinguish between different constraint violations
schmoelder Jun 28, 2024
612099d
Add MCTDiscretization
hannahlanzrath Jul 12, 2024
c17b91c
Add MCTRecorder
schmoelder Jul 12, 2024
65591fa
Add ports to unitOperation
hannahlanzrath Jul 12, 2024
c5c06c7
Add ports to flowSheet
hannahlanzrath Jul 12, 2024
5ae2b84
Add ports to process
hannahlanzrath Jul 12, 2024
29404d1
Add ports to carouselBuilder
daklauss Jul 12, 2024
f7774f1
Add ports to compartmentBuilder
hannahlanzrath Jul 12, 2024
9f1e689
Add ports to simulationResults
daklauss Jul 12, 2024
546830c
Add ports to cadetAdapter
daklauss Jul 12, 2024
c0babf2
Add singelton dimension handling to solution
daklauss Aug 1, 2024
4e8dad5
Add method to get information about CADET version
hannahlanzrath Aug 1, 2024
e1e624f
Formatting
schmoelder Aug 14, 2024
5fed4a8
Update tests to pytest
hannahlanzrath Aug 1, 2024
29b5066
Add create_LWE
hannahlanzrath Aug 1, 2024
0794a23
Add LWE tests to test_cadet_adapter
hannahlanzrath Aug 1, 2024
36adbeb
Fix default value for start time when creating fractions
schmoelder Oct 2, 2024
1458a0b
Fix loading of multi-cycle solutions
ronald-jaepel Sep 26, 2024
336ae35
Pin ax version
schmoelder Nov 14, 2024
e1be7cb
Temporarily disable Windows tests to avoid crashes
schmoelder Nov 14, 2024
66d6b9d
Pin CADET-Python version
schmoelder Nov 14, 2024
35ba311
Fix AxInterface options
schmoelder Nov 14, 2024
20ead9c
Adapt cadetAdapter.py to match new install_path settings in CADET-Pyt…
ronald-jaepel Aug 16, 2024
bdc937d
Raise required CADET-Python version to v1.0
ronald-jaepel Nov 14, 2024
4d9d3d5
Adapt to new CSTR interface.
ronald-jaepel Nov 15, 2024
8b4dc27
Deprecate Mambaforge
schmoelder Oct 2, 2024
c2383f8
Improve cleanup after tests
schmoelder Nov 15, 2024
9d5dd2a
Remove `setup.cfg`
schmoelder Jul 22, 2024
868dfe7
For mobile phase modulator binding add linear threshold parameter.
ronald-jaepel Aug 2, 2024
71d2b54
Add test for mobile phase modulator binding model.
ronald-jaepel Nov 14, 2024
231d27d
Use SingleTaskGP instead of FixedNoiseGP as recommended in the Deprec…
flo-schu Nov 19, 2024
825c718
Add CITATION.bib
jbreue16 Nov 27, 2024
6e0ab42
Add zenodo metadata file
hannahlanzrath Nov 27, 2024
ad7a571
Add release guide (#186)
schmoelder Dec 2, 2024
9afa82c
Fix molecular weights attribute of component system and add test
daklauss Dec 3, 2024
b7ff113
Remove tests for detection of CADET
schmoelder Dec 2, 2024
1e7789f
Update tests for CADET-Core v5.0.2
schmoelder Dec 2, 2024
21af220
Remove checks for singleton dimensions
schmoelder Nov 29, 2024
e2877a3
Update volume dimensionality
schmoelder Dec 2, 2024
dc3762f
Call pytest if __file__ == "__main__
schmoelder Dec 2, 2024
7ae3f96
Update detect_cadet() expected variables
hannahlanzrath Dec 4, 2024
10a21c9
Remove faulty kwargs pass
hannahlanzrath Dec 2, 2024
45babef
Add parameterization to test_cadet_adapter
hannahlanzrath Dec 4, 2024
d97cf31
Update MacOS in CI
schmoelder Dec 4, 2024
aa93ffc
Add Mamba run
hannahlanzrath Dec 9, 2024
4efe2b0
Test for Windows now
hannahlanzrath Dec 9, 2024
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
Prev Previous commit
Next Next commit
Update docstrings
  • Loading branch information
schmoelder committed Jun 18, 2024
commit 9720966d7abd460dd4c211d4787b7b58a587844c
14 changes: 14 additions & 0 deletions CADETProcess/dataStructure/cache.py
Original file line number Diff line number Diff line change
@@ -23,6 +23,19 @@ def name(self):


class CachedPropertiesMixin(Structure):
"""
Mixin class for caching properties in a structured object.

This class is designed to be used as a mixin in conjunction with other classes
inheriting from `Structure`. It provides functionality for caching properties and
managing a lock state to control the caching behavior.

Notes
-----
- To prevent the return of outdated state, the cache is cleared whenever the `lock`
state is changed.
"""

_lock = Bool(default=False)

def __init__(self, *args, **kwargs):
@@ -31,6 +44,7 @@ def __init__(self, *args, **kwargs):

@property
def lock(self):
"""bool: If True, properties are cached. False otherwise."""
return self._lock

@lock.setter
21 changes: 13 additions & 8 deletions CADETProcess/fractionation/fractionator.py
Original file line number Diff line number Diff line change
@@ -21,11 +21,16 @@
class Fractionator(EventHandler):
"""Class for Chromatogram Fractionation.

To set Events for starting and ending a fractionation it inherits from the
EventHandler class. It defines a ranking list for components as a
DependentlySizedUnsignedList with the number of components as dependent
size. The time_signal to fractionate is defined. If no ranking is set,
every component is equivalently.
This class is responsible for setting events for starting and ending fractionation,
handling multiple chromatograms, and calculating various performance metrics.

Attributes
----------
name : String
Name of the fractionator, defaulting to 'Fractionator'.
performance_keys : list
Keys for performance metrics including mass, concentration, purity, recovery,
productivity, and eluent consumption.

"""

@@ -136,7 +141,7 @@ def component_system(self):
"""ComponentSystem: The component system of the chromatograms."""
return self.chromatograms[0].component_system

def call_by_chrom_name(func):
def _call_by_chrom_name(func):
"""Decorator to enable calling functions with chromatogram object or name."""
@wraps(func)
def wrapper(self, chrom, *args, **kwargs):
@@ -329,7 +334,7 @@ def fractionation_states(self):
"""
return self._fractionation_states

@call_by_chrom_name
@_call_by_chrom_name
def set_fractionation_state(self, chrom, state):
"""Set fractionation states of Chromatogram.

@@ -436,7 +441,7 @@ def _create_fraction(self, chrom_index, start, end):
start : float
start time of the fraction
start : float
start time of the fraction
end time of the fraction

Returns
-------
57 changes: 41 additions & 16 deletions CADETProcess/fractionation/fractions.py
Original file line number Diff line number Diff line change
@@ -16,27 +16,31 @@ class Fraction(Structure):
Attributes
----------
mass : np.ndarray
The mass of each component in the fraction. The array is 1-dimensional.
Mass of each component in the fraction.
volume : float
The volume of the fraction.
Volume of the fraction.

Properties
----------
n_comp : int
Number of components in the fraction.
fraction_mass : np.ndarray
Cumulative mass of all species in the fraction.
purity : np.ndarray
Purity of the fraction, with invalid values set to zero.
concentration : np.ndarray
Component concentrations of the fraction, with invalid values set to zero.

See Also
--------
CADETProcess.fractionation.FractionPool
CADETProcess.fractionation.Fractionator
"""

mass = Vector()
volume = UnsignedFloat()

def __init__(self, mass, volume):
"""Initialize a Fraction instance.

Parameters
----------
mass : numpy.ndarray
The mass of each component in the fraction.
The array should be 1-dimensional.
volume : float
The volume of the fraction.
"""
self.mass = mass
self.volume = volume
_parameters = ['mass', 'volume']

@property
def n_comp(self):
@@ -106,6 +110,23 @@ class FractionPool(Structure):
n_comp : int
The number of components each fraction in the pool should have.

Properties
----------
fractions : list
List of fractions in the pool.
n_fractions : int
Number of fractions in the pool.
volume : float
Total volume of all fractions in the pool.
mass : np.ndarray
Cumulative mass of each component in the pool.
pool_mass : float
Total mass of all components in the pool.
purity : np.ndarray
Overall purity of the pool, with invalid values set to zero.
concentration : np.ndarray
Average concentration of the pool, with invalid values set to zero.

See Also
--------
CADETProcess.fractionation.Fraction
@@ -114,7 +135,9 @@ class FractionPool(Structure):

n_comp = UnsignedInteger()

def __init__(self, n_comp):
_parameters = ['n_comp']

def __init__(self, n_comp, *args, **kwargs):
"""Initialize a FractionPool instance.

Parameters
@@ -125,6 +148,8 @@ def __init__(self, n_comp):
self._fractions = []
self.n_comp = n_comp

super().__init__(*args, **kwargs)

def add_fraction(self, fraction):
"""Add a fraction to the fraction pool.