Skip to content

Commit

Permalink
Merge pull request #176 from HelgeGehring/update-poetry
Browse files Browse the repository at this point in the history
Use uv instead of poetry
  • Loading branch information
HelgeGehring authored Oct 10, 2024
2 parents 912d8e9 + 4cd998b commit 00076cb
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 55 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,21 @@ jobs:
miniforge-version: latest
activate-environment: env
use-mamba: true
python-version: "3.12"
python-version: "3.11"
- name: Add conda to system path
run: |
echo $CONDA/bin >> $GITHUB_PATH
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: false
installer-parallel: true
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install dependencies
env:
UV_SYSTEM_PYTHON: 1
run: |
sudo apt-get install -y libglu1-mesa
pip install git+https://github.com/kinnala/scikit-fem.git
poetry install --no-interaction --no-root
mamba install slepc4py=*=complex* -y
mamba install slepc4py=*=complex* uv -y
uv pip install -r pyproject.toml
- name: Build package
env:
UV_SYSTEM_PYTHON: 1
run: |
poetry build
uv build
21 changes: 9 additions & 12 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,20 @@ jobs:
- name: Add conda to system path
run: |
echo $CONDA/bin >> $GITHUB_PATH
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.1
virtualenvs-create: false
installer-parallel: true
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install dependencies
env:
UV_SYSTEM_PYTHON: 1
run: |
sudo apt-get install -y libglu1-mesa xvfb
poetry install --no-interaction
pip install --upgrade scipy
mamba install slepc4py=*=complex* -y
mamba install julia
pip install jupyter-book
pip install --upgrade jupytext
pip install gdsfactory gplugins
pip list
uv pip install .
uv pip install jupyter-book
uv pip install --upgrade jupytext
uv pip install gdsfactory gplugins
uv pip list
- uses: julia-actions/setup-julia@v2
with:
Expand Down
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ repos:
hooks:
- id: black

- repo: https://github.com/python-poetry/poetry
rev: 1.8.0
hooks:
- id: poetry-check

- repo: "https://github.com/domluna/JuliaFormatter.jl"
rev: "v1.0.54"
hooks:
Expand Down
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
Gridap = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e"
GridapGmsh = "3025c34a-b394-11e9-2a55-3fee550c04c8"
GridapMakie = "41f30b06-6382-4b60-a5f7-79d86b35bf5d"
GridapODEs = "55e38337-5b6e-4c7c-9cfc-e00dd49102e6"
GridapPETSc = "bcdc36c2-0c3e-11ea-095a-c9dadae499f1"
IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a"
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
Expand Down
59 changes: 32 additions & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[build-system]
requires = ["poetry-core>=1.6.0"]
build-backend = "poetry.core.masonry.api"
requires = ['setuptools>=73.0.0']
build-backend = 'setuptools.build_meta'

[tool.poetry]
[project]
name = "femwell"
version = "0.0.1"
authors = ["Helge Gehring"]
authors = [{name="Helge Gehring"}]
description = "Mode solver for photonic and electric waveguides based on FEM"
homepage = "https://github.com/HelgeGehring/femwell"
keywords = [
"integrated photonics",
"silicon photonics",
Expand All @@ -20,33 +19,39 @@ classifiers = [
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering"
]
license = "GPLv3"
license = {file = "LICENSE"}
readme = "README.md"

[tool.poetry.urls]
Documentation = "https://HelgeGehring.github.io/femwell/"
dependencies = [
"scikit-fem>=8.1.0",
"gmsh>=4.13.1",
"pygmsh",
"matplotlib",
"meshwell>=1.0.2"
]

[project.optional-dependencies]
test = [
"pytest",
"flake8"
]

[tool.poetry.dependencies]
python = ">=3.8"
scikit-fem = ">=8.1.0"
gmsh = "4.13.1"
pygmsh = "*"
matplotlib = "*"
meshwell = ">=1.0.2"
docs = [
"tqdm",
"enlighten",
"pint>0.20.1",
"sphinx-book-theme",
"jupytext",
"pandas"
]

[tool.poetry.group.test.dependencies]
pytest = "*"
flake8 = "*"
[tool.setuptools.packages.find]
where = ["."]
include = ["femwell*"]

[tool.poetry.group.docs.dependencies]
python = ">=3.10"
tqdm = "*"
enlighten = "*"
pint = ">0.20.1"
# sphinx-book-theme = "*"
jupytext = "*"
# myst-parser = "*"
pandas = "*"
[project.urls]
Homepage = "https://github.com/HelgeGehring/femwell"
Documentation = "https://HelgeGehring.github.io/femwell/"

[tool.black]
line-length = 100
2 changes: 2 additions & 0 deletions src/Thermal/Thermal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module Thermal

using Gridap
using Gridap.Algebra
using GridapODEs.ODETools
using GridapODEs.TransientFETools

export calculate_temperature, temperature, calculate_temperature_transient, heat_flux

Expand Down

0 comments on commit 00076cb

Please sign in to comment.