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

Andres joss review #85

Merged
merged 10 commits into from
Oct 7, 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
2 changes: 1 addition & 1 deletion .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ jobs:
source $(conda info --base)/etc/profile.d/conda.sh # Ensure conda is properly initialized
echo "Running tests"
conda activate fenicsx-env
cd test && pytest -v . || echo "Tests failed"
cd test && python3 -m pytest . || echo "Tests failed"
11 changes: 7 additions & 4 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@ jobs:
run: |
echo "Installing Python dependencies and irrevolutions"
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt # Adjust this if you're using a different file for dependencies
python3 -m pip install numpy==1.21.6 --force-reinstall # Downgrade NumPy to a compatible version
python3 -m pip install . # Install irrevolutions package

- name: Check versions of installed packages
run: |
python3 -c "import numpy; print(f'NumPy version: {numpy.__version__}')"
python3 -c "import scipy; print(f'SciPy version: {scipy.__version__}')"
python3 -c "import pyvista; print(f'PyVista version: {pyvista.__version__}')"
# Optionally run tests within the environment
- name: Run tests
run: |
echo "Running tests"
conda activate fenicsx-env
cd test && pytest -v . || echo "Tests failed"
cd test && python3 -m pytest . || echo "Tests failed"
15 changes: 2 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,26 +71,15 @@ For a windows box:
docker run --rm -ti -v "C:/...":/home/numerix" -w /home/numerix kumiori3\numerix:stable-amd64
```


We recommend using Poetry to manage Python dependencies and the virtual environment for the project. Follow the instructions below to install Poetry and set up the environment.

```
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
```

Clone this repository:

```
git clone https://github.com/kumiori/irrevolutions.git
git clone https://github.com/kumiori/irrevolutions.gt
cd irrevolutions
```


Finally, to install `irrevolutions` with poetry run
```poetry install```

Alternatively, `irrevolutions` can be installed using setuptools from the root directory
Finally, `irrevolutions` can be installed using setuptools from the root directory
```python3 -m pip install .```


Expand Down
61 changes: 30 additions & 31 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,40 @@
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[tool.poetry]
[project]
name = "irrevolutions"
version = "0.1.0"
description = "A Python package for solving nonlinear and nonconvex evolutionary problems using a general energetic notion of stability and dolfinx."
authors = ["Your Name <[email protected]>"]

# Optional dependencies are specified in this section
[tool.poetry.dependencies]
python = "^3.9"
pandas = "^1.2"
sympy = "^1.8"
pytest = "^6.0"
matplotlib = "^3.4"
gmsh = "^4.11.0"
PyYAML = "^6.0.1"
scipy = "^1.12.0"
pyvista = "^0.43"
numba = "^0.60.0"

[tool.poetry.extras]
dolfinx_support = []
authors = [
{name = "Andrés A León Baldelli", email = "[email protected]"}
]
dependencies = [
"pandas>=1.2",
"sympy>=1.8",
"pytest>=6.0",
"matplotlib>=3.4",
"gmsh>=4.11.0",
"PyYAML>=6.0.1",
"scipy>=1.12.0",
"pyvista>=0.43",
"numpy<2", # Pin NumPy to this version
"numba>=0.60.0"
]
readme = "README.md"
requires-python = ">=3.9"
license = {text = "GNU Lesser General Public License v3.0"}

[tool.poetry.scripts]
irrevolutions = 'irrevolutions:main'
[project.urls]
homepage = "https://github.com/kumiori3/irrevolutions"
repository = "https://github.com/kumiori3/irrevolutions"

# Ensure that non-code files (e.g., default_parameters.yml) are included in the package
[tool.poetry.include]
irrevolutions = ["src/irrevolutions/models/default_parameters.yml"]
[tool.setuptools.packages.find]
where = ["src"]
include = ["irrevolutions*"]

# Additional files to include (e.g., readme, licenses, configs)
include = [
"README.md",
"LICENSE",
"src/irrevolutions/models/default_parameters.yml"
]
[project.scripts]
irrevolutions = "irrevolutions:main"

[tool.poetry.packages]
irrevolutions = { from = "src/irrevolutions" }
# Optional include files like configuration, license, etc.
[tool.setuptools.package-data]
irrevolutions = ["models/default_parameters.yml"]
Loading