Skip to content

Update examples to support latest Psydac and Python 3.12 #9

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

Merged
merged 40 commits into from
Mar 5, 2025

Conversation

kvrigor
Copy link
Member

@kvrigor kvrigor commented Nov 27, 2024

It might be a good idea to externally link the IGA Python docs from the Psydac API docs. As a first step I'm making sure that all examples in this repository work with the latest version of Psydac.

@kvrigor
Copy link
Member Author

kvrigor commented Dec 4, 2024

This PR is ready for review! Here are the summary of changes:

  • Updates to deploy-book.yml:
    • Use the latest version of Psydac (devel branch).
    • Simplified Psydac installation.
    • Added macOS test.
  • Removed duplicate keywords field in references.bib since jupyter-book complains about them.
  • Removed author info on the .ipynb and .md files.
  • Using nb-clean, all Jupyter notebooks in this repo have been scrubbed free of data (e.g. cell execution count, cell result, path to Python environment, etc.) which shouldn't be tracked in git. The Build Jupyter Book step already handles the execution and rendering of these notebooks online.
  • Updated the Installation guide.

@kvrigor kvrigor marked this pull request as ready for review December 4, 2024 15:47
@kvrigor
Copy link
Member Author

kvrigor commented Feb 12, 2025

Tagging @ratnania and @yguclu --- I hope you can take a look at this PR.. thanks!

@yguclu yguclu self-requested a review February 12, 2025 11:22
Copy link
Member

@yguclu yguclu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I have just a couple of comments

@campospinto
Copy link

campospinto commented Feb 12, 2025

Thanks @kvrigor ! I have a few questions:

  • With these changes are all the notebooks tested in the CI ?

  • should one use nb-clean before every commit of a notebook ?

  • I tried to follow the installation instructions from install.md and I get an error (see below): is this because I am using a mac (for which the installation is not tested), or because the CI and the install.md do not agree ?

INFO: pip is looking at multiple versions of psydac to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement sympde==0.19.0 (from psydac) (from versions: 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 0.9.10, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.10.6, 0.10.7, 0.10.8, 0.10.9, 0.10.10, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.17.0, 0.17.1)
ERROR: No matching distribution found for sympde==0.19.0

@yguclu
Copy link
Member

yguclu commented Feb 12, 2025

  • I tried to follow the installation instructions from install.md and I get an error (see below): is this because I am using a mac (for which the installation is not tested), or because the CI and the install.md do not agree ?
INFO: pip is looking at multiple versions of psydac to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement sympde==0.19.0 (from psydac) (from versions: 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 0.9.10, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.10.6, 0.10.7, 0.10.8, 0.10.9, 0.10.10, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.17.0, 0.17.1)
ERROR: No matching distribution found for sympde==0.19.0

Good point @campospinto, the build of the Jupyter book should probably be tested on multiple platforms.

As for the error, I do not see a substantial difference between the instructions in deploy-book.yml and those in install.md. They both use a virtual environment (one provided automatically by GitHub, the other manually created by the user) and install Psydac as a dependency through our requirements.txt file. The CI updates pip before installing, though...

@campospinto
Copy link

Good point @campospinto, the build of the Jupyter book should probably be tested on multiple platforms.

As for the error, I do not see a substantial difference between the instructions in deploy-book.yml and those in install.md. They both use a virtual environment (one provided automatically by GitHub, the other manually created by the user) and install Psydac as a dependency through our requirements.txt file. The CI updates pip before installing, though...

alright, then can you add a macos test @kvrigor ? If it passes, I'll try again to install on my mac.

@kvrigor
Copy link
Member Author

kvrigor commented Feb 25, 2025

I've also updated the README file and can be viewed here: https://github.com/kvrigor/IGA-Python/tree/build-ci-update?tab=readme-ov-file

@kvrigor kvrigor requested a review from yguclu February 25, 2025 15:20
@yguclu
Copy link
Member

yguclu commented Feb 25, 2025

I've also updated the README file and can be viewed here: https://github.com/kvrigor/IGA-Python/tree/build-ci-update?tab=readme-ov-file

Looks good!

@kvrigor kvrigor requested a review from yguclu February 26, 2025 11:23
@campospinto
Copy link

I've also updated the README file and can be viewed here: https://github.com/kvrigor/IGA-Python/tree/build-ci-update?tab=readme-ov-file

Thanks Paul!

I have another question: when installing the dependencies, do you know if psydac is (re)installed ?

In particular, Is there a simple way to be sure that you will be using your psydac version, if you previously had one installed?

@kvrigor
Copy link
Member Author

kvrigor commented Feb 26, 2025

I have another question: when installing the dependencies, do you know if psydac is (re)installed ?

@campospinto Since psydac is declared as a git repo in requirements.txt, I'd assume that it could be re-installed whenever psydac devel gets updated.

In particular, Is there a simple way to be sure that you will be using your psydac version, if you previously had one installed?

Yes--by editing requirements.txt and then pointing psydac to a git commit hash, e.g.:

psydac @ git+https://github.com/pyccel/psydac.git@5ff388417225f5fb7a6e1ec1c4490d2fb48233f5

@campospinto
Copy link

I have another question: when installing the dependencies, do you know if psydac is (re)installed ?

@campospinto Since psydac is declared as a git repo in requirements.txt, I'd assume that it could be re-installed whenever psydac devel gets updated.

In particular, Is there a simple way to be sure that you will be using your psydac version, if you previously had one installed?

Yes--by editing requirements.txt and then pointing psydac to a git commit hash, e.g.:

psydac @ git+https://github.com/pyccel/psydac.git@5ff388417225f5fb7a6e1ec1c4490d2fb48233f5

I see. And would it also work if one simply removes this line in his requirements.txt file ?

@kvrigor
Copy link
Member Author

kvrigor commented Feb 27, 2025

Yes--by editing requirements.txt and then pointing psydac to a git commit hash, e.g.:

psydac @ git+https://github.com/pyccel/psydac.git@5ff388417225f5fb7a6e1ec1c4490d2fb48233f5

I see. And would it also work if one simply removes this line in his requirements.txt file ?

Yes, that would be the simplest solution! In this case psydac has to be manually installed.

@kvrigor kvrigor requested a review from campospinto February 27, 2025 09:02
Copy link

@campospinto campospinto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Paul ! This looks good, I have a few questions -- essentially on the README for now.

@kvrigor kvrigor requested a review from campospinto March 4, 2025 13:08
@campospinto
Copy link

Thanks Paul for the changes!

@yguclu yguclu changed the title Update examples to support latest Psydac and python3.12 Update examples to support latest Psydac and Python 3.12 Mar 5, 2025
@yguclu yguclu merged commit 7d61941 into pyccel:master Mar 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants