-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from kumiori/andres-joss-review
Andres joss review
- Loading branch information
Showing
8 changed files
with
213 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Test Conda Installation | ||
|
||
# This triggers the workflow on any push to the repository | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Test Conda Installation and Setup | ||
runs-on: ubuntu-latest | ||
|
||
# Steps to run | ||
steps: | ||
# Checkout the repo content to the runner | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Set up Miniconda | ||
- name: Set up Miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniconda-version: "latest" | ||
channels: conda-forge, defaults | ||
auto-update-conda: true | ||
auto-activate-base: true | ||
|
||
# Create the environment and install dependencies | ||
- name: Create and activate conda environment | ||
run: | | ||
echo "Creating the conda environment: fenicsx-env" | ||
conda create -n fenicsx-env -c conda-forge fenics-dolfinx=0.7.2 mpich pyvista sympy pandas pyyaml -y | ||
echo "Activating the conda environment" | ||
source $(conda info --base)/etc/profile.d/conda.sh # Fix to allow `conda activate` | ||
conda activate fenicsx-env | ||
echo "Environment created and activated. Now, verifying installation..." | ||
conda list # Print all installed packages for verification | ||
which python # Verify the Python interpreter being used | ||
# Install the irrevolutions package in the conda environment | ||
- name: Install irrevolutions | ||
run: | | ||
source $(conda info --base)/etc/profile.d/conda.sh # Ensure conda is properly initialized | ||
echo "Installing irrevolutions package" | ||
conda activate fenicsx-env | ||
python -m pip install . # Assuming irrevolutions is in the current directory | ||
echo "irrevolutions package installed" | ||
# Optionally run tests within the environment | ||
- name: Run tests | ||
run: | | ||
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Test Ubuntu Installation | ||
|
||
# This triggers the workflow on any push to the repository | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Test Ubuntu/apt Installation and Setup | ||
runs-on: ubuntu-latest | ||
|
||
# Steps to run | ||
steps: | ||
# Checkout the repo content to the runner | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Install Ubuntu dependencies via APT | ||
- name: Install system dependencies via APT | ||
run: | | ||
echo "Installing required system dependencies via APT" | ||
sudo apt-get update | ||
sudo apt-get install -y software-properties-common python3-pip git libgl1-mesa-glx xvfb libglu1 libxcursor1 libxinerama1 | ||
# Add the FEniCS PPA and install fenicsx | ||
- name: Install fenicsx | ||
run: | | ||
echo "Adding FEniCS PPA and installing fenicsx" | ||
sudo add-apt-repository ppa:fenics-packages/fenics | ||
sudo apt update | ||
sudo apt-get install -y fenicsx | ||
# Install irrevolutions dependencies (if any) and the package itself | ||
- name: Install Python dependencies and irrevolutions | ||
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 . # Install irrevolutions package | ||
# Optionally run tests within the environment | ||
- name: Run tests | ||
run: | | ||
echo "Running tests" | ||
conda activate fenicsx-env | ||
cd test && pytest -v . || echo "Tests failed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ authors = ["Your Name <[email protected]>"] | |
|
||
# Optional dependencies are specified in this section | ||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
python = "^3.9" | ||
pandas = "^1.2" | ||
sympy = "^1.8" | ||
pytest = "^6.0" | ||
|
@@ -26,3 +26,17 @@ dolfinx_support = [] | |
|
||
[tool.poetry.scripts] | ||
irrevolutions = 'irrevolutions:main' | ||
|
||
# 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"] | ||
|
||
# Additional files to include (e.g., readme, licenses, configs) | ||
include = [ | ||
"README.md", | ||
"LICENSE", | ||
"src/irrevolutions/models/default_parameters.yml" | ||
] | ||
|
||
[tool.poetry.packages] | ||
irrevolutions = { from = "src/irrevolutions" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,14 @@ | |
package_dir={"": "src"}, # The root package is under the 'src' directory | ||
packages=find_packages("src"), # Find packages under the 'src' directory | ||
include_package_data=True, | ||
description="A Python package for solving nonlinear and nonconvex evolutionary problems using a general energetic notion of stability and dolfinx.", | ||
author="Andrés A León Baldelli", | ||
author_email="[email protected]", | ||
url="https://github.com/kumiori3/irrevolutions", # Replace with your repo | ||
|
||
package_data={ | ||
"irrevolutions.models": ["default_parameters.yml"], | ||
}, | ||
python_requires=">=3.9", | ||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters