-
-
Notifications
You must be signed in to change notification settings - Fork 546
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
Moving to src layout #4311
Moving to src layout #4311
Conversation
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @prady0t! Could you trigger the wheel builds from this branch on your fork and link the workflow run here? I shall merge this in 24 hours unless someone raises any objections. Note that if any other PR gets merged before this one does, there might be conflicts again, so it will be better to resolve them here (or learn how to).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @prady0t! Looks good to me. I am not sure why the tests are failing but I'll try taking a look soon.
The tests are failing because
is not found. To fix this, these lines have to be changed, which were missed: Lines 46 to 54 in 8983f43
|
Note: the paths in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A summary of the required changes:
- ✅ Path to
pybamm.root_dir()
- ✅ Changes in
scripts/update_version.py
, and its correspondingupdate_version.yml
file as needed - ✅ Paths to
CITATIONS.bib
inpyproject.toml
and elsewhere - ✅ Changes in
[tool.setuptools.package-data]
- ✅ Changes to paths in
conf.py
(bibtex_bibfiles
) - ✅
citations.py
- ✅ Paths to
version.py
- ✅ Changes in
CONTRIBUTING.md
- ✅ A link to passing wheel builds triggered from this branch on your fork
There is a chance I might have missed something, so please feel free to suggest more.
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
@agriyakhetarpal I've tried adding all the changes. Here's the workflow for wheels build : https://github.com/prady0t/PyBaMM/actions/runs/10228436876 |
Tests are still failing on the local branch so they will fail here too. Let me look into it further. |
Thanks, nice to see wheels passing – besides fixing the CI failures, don't forget the rest of the points! |
Let's focus on getting this PR merged before any of your other PRs. I posted about this PR in the #maintainers channel on Slack, and there seem to be no objections, so we will be good to go once the changes are addressed. |
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
…to src-layout-new Merging.
prady0t#4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep going, this is almost there! To fix the failing builds, these paths need to be fixed:
Lines 62 to 75 in 109b9c4
# IREE (MLIR expression evaluation) PyBaMM source files | |
set(IDAKLU_EXPR_IREE_SOURCE_FILES "") | |
if(${PYBAMM_IDAKLU_EXPR_IREE} STREQUAL "ON" ) | |
add_compile_definitions(IREE_ENABLE) | |
# Source file list | |
set(IDAKLU_EXPR_IREE_SOURCE_FILES | |
pybamm/solvers/c_solvers/idaklu/Expressions/IREE/iree_jit.cpp | |
pybamm/solvers/c_solvers/idaklu/Expressions/IREE/iree_jit.hpp | |
pybamm/solvers/c_solvers/idaklu/Expressions/IREE/IREEFunctions.cpp | |
pybamm/solvers/c_solvers/idaklu/Expressions/IREE/IREEFunctions.hpp | |
pybamm/solvers/c_solvers/idaklu/Expressions/IREE/ModuleParser.cpp | |
pybamm/solvers/c_solvers/idaklu/Expressions/IREE/ModuleParser.hpp | |
) | |
endif() |
Also, things like scripts/update_version.py
and pybamm.root_dir()
, etc., from the previous points are left to be updated; I checked off the items that have been addressed in #4311 (review).
Triggered it from the admin dashboard, let's see if it fails again |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4311 +/- ##
========================================
Coverage 99.46% 99.46%
========================================
Files 289 289
Lines 22146 22146
========================================
Hits 22027 22027
Misses 119 119 ☔ View full report in Codecov by Sentry. |
I think the SPM notebook's failure is related to |
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
…to src-layout-new Merging
Merging develop
@agriyakhetarpal RTD failure is now resolved. |
I don't think |
I see. Let me try something else |
We can do something like :
Do you think it's correct? We can also use : https://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory#:~:text=python3%20%2Dc%20%27import%20sysconfig%3B%20print(sysconfig.get_paths()%5B%22purelib%22%5D)%27 |
How about avoiding |
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
This should work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @prady0t, this LGTM now! As a note to other reviewers: the failing links are expected and will be resolved once this PR goes into develop
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @prady0t, looks good
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
The example notebook looks like it is still failing: https://github.com/pybamm-team/PyBaMM/actions/runs/10300421066/job/28509802852?pr=4311 |
Is it related to changes in this PR? |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Not sure what it was, but I removed the custom path because the PNGs are in the same directory as the notebook |
* Moving to src layout Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> * Applying require changes according to src path Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> * using src/pybamm Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> * changing path of pybamm.root_dir() Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> * style: pre-commit fixes * changing path to src/pybamm in CMakeLists.txt Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> * fixing RTD failure Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> * using pybamm.__path__[0] Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> * style: pre-commit fixes * Update noxfile.py Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> * Fix notebook paths --------- Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> Co-authored-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> Co-authored-by: Arjun Verma <arjunverma.oc@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Description
Related to #4205
Fixes # (issue)
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ pre-commit run
(or$ nox -s pre-commit
) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
(or$ nox -s tests
)$ python run-tests.py --doctest
(or$ nox -s doctests
)You can run integration tests, unit tests, and doctests together at once, using
$ python run-tests.py --quick
(or$ nox -s quick
).Further checks: