From 0afa8f960e9bb478832fdb0f07537f5ef75fb84c Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 5 Sep 2024 01:32:28 -0700 Subject: [PATCH 01/20] update poetry --- .github/workflows/build.yml | 2 +- .github/workflows/docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51f4e30b..75b1ca3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,7 +62,7 @@ jobs: - name: Install Poetry uses: snok/install-poetry@v1 with: - version: 1.3.2 + version: 1.8.3 virtualenvs-create: false installer-parallel: true - name: Install dependencies diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 33805c7d..2671a74c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -32,7 +32,7 @@ jobs: - name: Install Poetry uses: snok/install-poetry@v1 with: - version: 1.8.1 + version: 1.8.3 virtualenvs-create: false installer-parallel: true - name: Install dependencies From 7011a198d085322b7195fa3516f4e1e19344cdcb Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 5 Sep 2024 01:36:47 -0700 Subject: [PATCH 02/20] use setuptools as build backend --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6c6de116..6074ed52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["poetry-core>=1.6.0"] -build-backend = "poetry.core.masonry.api" +requires = ['setuptools>=74.0.0'] +build-backend = 'setuptools.build_meta' [tool.poetry] name = "femwell" From cc457b99d4cd6cbc9d4fb3b4c36e471ca15791d9 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 5 Sep 2024 01:50:39 -0700 Subject: [PATCH 03/20] accept older setuptools version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6074ed52..9d209bf1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ['setuptools>=74.0.0'] +requires = ['setuptools>=73.0.0'] build-backend = 'setuptools.build_meta' [tool.poetry] From 554d2745c57c59a1396bd9a550c819d7ef00a53d Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 5 Sep 2024 02:16:49 -0700 Subject: [PATCH 04/20] try without poetry install-parallel --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2671a74c..4df40996 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -34,7 +34,7 @@ jobs: with: version: 1.8.3 virtualenvs-create: false - installer-parallel: true + installer-parallel: false - name: Install dependencies run: | sudo apt-get install -y libglu1-mesa xvfb From 97ce853bea2d714fdb6e73b6bf9ab350852c1b84 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:27:22 -0700 Subject: [PATCH 05/20] try older python version --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 75b1ca3f..991d8d7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,7 @@ 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 From 37b39f2ca78d2e4fc617d0c4dc5f484cec9498ab Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:36:30 -0700 Subject: [PATCH 06/20] try uv --- .github/workflows/build.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 991d8d7b..dae1c859 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,18 +59,17 @@ 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.3 - 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 requirements.txt - name: Build package + env: + UV_SYSTEM_PYTHON: 1 run: | - poetry build + uv build From da99af56591b840c620007262e624f4cb7d6f679 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:38:31 -0700 Subject: [PATCH 07/20] try python 3.11 --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4df40996..6dfbcce2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,7 +25,7 @@ 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 From 40f0422cff812e34c85cecbf7bf6090d2f50a0dc Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:41:20 -0700 Subject: [PATCH 08/20] use uv instead of poetry in docs --- .github/workflows/docs.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6dfbcce2..080463fc 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,7 +25,7 @@ jobs: miniforge-version: latest activate-environment: env use-mamba: true - python-version: "3.11" + python-version: "3.12" - name: Add conda to system path run: | echo $CONDA/bin >> $GITHUB_PATH @@ -35,17 +35,20 @@ jobs: version: 1.8.3 virtualenvs-create: false installer-parallel: false + - 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: From 79fef8c41f9896a7df398842cea2a45733c0bb65 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:50:43 -0700 Subject: [PATCH 09/20] adjust for uv --- .pre-commit-config.yaml | 5 ----- pyproject.toml | 46 +++++++++++++++++++++-------------------- 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9aa65670..54141c37 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 9d209bf1..a81755d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ requires = ['setuptools>=73.0.0'] build-backend = 'setuptools.build_meta' -[tool.poetry] +[project] name = "femwell" version = "0.0.1" authors = ["Helge Gehring"] @@ -23,30 +23,32 @@ classifiers = [ license = "GPLv3" readme = "README.md" -[tool.poetry.urls] -Documentation = "https://HelgeGehring.github.io/femwell/" +dependencies = [ + "python >=3.8", + "scikit-fem >=8.1.0", + "gmsh = 4.13.1", + "pygmsh", + "matplotlib", + "meshwell>=1.0.2" +] -[tool.poetry.dependencies] -python = ">=3.8" -scikit-fem = ">=8.1.0" -gmsh = "4.13.1" -pygmsh = "*" -matplotlib = "*" -meshwell = ">=1.0.2" +[project.optional-dependencies] +test = [ + "pytest", + "flake8" +] -[tool.poetry.group.test.dependencies] -pytest = "*" -flake8 = "*" +[project.urls] +Documentation = "https://HelgeGehring.github.io/femwell/" -[tool.poetry.group.docs.dependencies] -python = ">=3.10" -tqdm = "*" -enlighten = "*" -pint = ">0.20.1" -# sphinx-book-theme = "*" -jupytext = "*" -# myst-parser = "*" -pandas = "*" +docs = [ + "tqdm", + "enlighten", + "pint>0.20.1", + "sphinx-book-theme", + "jupytext", + "pandas" +] [tool.black] line-length = 100 From 7a56f1049f80d94773811ed15cf15dae18aa7cb1 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:51:49 -0700 Subject: [PATCH 10/20] don't install poetry in docs workflow --- .github/workflows/docs.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 080463fc..19ddccab 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -29,12 +29,6 @@ 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.3 - virtualenvs-create: false - installer-parallel: false - name: Install uv uses: astral-sh/setup-uv@v3 - name: Install dependencies From fefbb01fd9d90cde092e982ecc7b1177a1d87e8e Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:53:29 -0700 Subject: [PATCH 11/20] fix pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a81755d5..5aa8f70b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering" ] -license = "GPLv3" +license = {file = "LICENSE"} readme = "README.md" dependencies = [ From 9e3d53edc96d8340d1ce94c87e54165f236ad34f Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:55:23 -0700 Subject: [PATCH 12/20] fix pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5aa8f70b..3c8204f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = 'setuptools.build_meta' [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 = [ From 092cbd553e201add62ede90dd69b4414f6c5a32a Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:57:56 -0700 Subject: [PATCH 13/20] fix pyproject.toml --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3c8204f8..919e5fdd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,9 +38,6 @@ test = [ "flake8" ] -[project.urls] -Documentation = "https://HelgeGehring.github.io/femwell/" - docs = [ "tqdm", "enlighten", @@ -50,5 +47,8 @@ docs = [ "pandas" ] +[project.urls] +Documentation = "https://HelgeGehring.github.io/femwell/" + [tool.black] line-length = 100 From fa9b3883dd73ebaf18a9a022e7d2ef8cf8e5b0a5 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 01:59:53 -0700 Subject: [PATCH 14/20] fix pyproject.toml --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 919e5fdd..e4f4b8ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,9 +24,9 @@ license = {file = "LICENSE"} readme = "README.md" dependencies = [ - "python >=3.8", - "scikit-fem >=8.1.0", - "gmsh = 4.13.1", + "python>=3.8", + "scikit-fem>=8.1.0", + "gmsh>=4.13.1", "pygmsh", "matplotlib", "meshwell>=1.0.2" From cc3456fc479bab463ef94a0361f0d5c57d35adc8 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 02:02:14 -0700 Subject: [PATCH 15/20] fix pyproject.toml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e4f4b8ea..bee303ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,6 @@ license = {file = "LICENSE"} readme = "README.md" dependencies = [ - "python>=3.8", "scikit-fem>=8.1.0", "gmsh>=4.13.1", "pygmsh", From 33f764aaa996f9ddc0374ac63257de5e51a1710c Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 02:03:56 -0700 Subject: [PATCH 16/20] fix pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bee303ea..670a7a3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,6 @@ name = "femwell" version = "0.0.1" 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", @@ -47,6 +46,7 @@ docs = [ ] [project.urls] +Homepage = "https://github.com/HelgeGehring/femwell" Documentation = "https://HelgeGehring.github.io/femwell/" [tool.black] From 716c2f3123d4380a5937bc6a9ae9541dca06b921 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 02:32:07 -0700 Subject: [PATCH 17/20] add GridapODEs --- Project.toml | 1 + src/Thermal/Thermal.jl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Project.toml b/Project.toml index 2016bdc2..f95d9d19 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/Thermal/Thermal.jl b/src/Thermal/Thermal.jl index 7eee9e4c..4686ebd2 100644 --- a/src/Thermal/Thermal.jl +++ b/src/Thermal/Thermal.jl @@ -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 From 898722bb1398212095512c7202d7346d57c85ce5 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 02:48:05 -0700 Subject: [PATCH 18/20] fix location of python package --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 670a7a3f..124a99bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,10 @@ docs = [ "pandas" ] +[tool.setuptools.packages.find] +where = ["."] +include = ["femwell*] + [project.urls] Homepage = "https://github.com/HelgeGehring/femwell" Documentation = "https://HelgeGehring.github.io/femwell/" From fffec9cd814e6a8278019c4556870e42ab054a17 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 02:51:16 -0700 Subject: [PATCH 19/20] fix pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 124a99bd..f39785c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ docs = [ [tool.setuptools.packages.find] where = ["."] -include = ["femwell*] +include = ["femwell*"] [project.urls] Homepage = "https://github.com/HelgeGehring/femwell" From 4cd998bb95de6f1ed3483ad798650922b6e71677 Mon Sep 17 00:00:00 2001 From: Helge Gehring <42973196+HelgeGehring@users.noreply.github.com> Date: Thu, 3 Oct 2024 03:11:43 -0700 Subject: [PATCH 20/20] fix build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dae1c859..959d81a0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,7 +67,7 @@ jobs: run: | sudo apt-get install -y libglu1-mesa mamba install slepc4py=*=complex* uv -y - uv pip install -r requirements.txt + uv pip install -r pyproject.toml - name: Build package env: UV_SYSTEM_PYTHON: 1