Skip to content
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

Tutorial in the documentation fails when run #107

Closed
akshaysubr opened this issue Jun 1, 2023 · 4 comments
Closed

Tutorial in the documentation fails when run #107

akshaysubr opened this issue Jun 1, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@akshaysubr
Copy link

Describe the bug
The first tutorial example fails because the Condition arguments are wrong
https://mathlab.github.io/PINA/_rst/tutorial1/tutorial.html

To Reproduce
The code in https://mathlab.github.io/PINA/_rst/tutorial1/tutorial.html

Expected behavior
The example should run fine

Output

Traceback (most recent call last):
  File "example.py", line 8, in <module>
    class SimpleODE(SpatialProblem):
  File "example.py", line 39, in SimpleODE
    'x0': Condition(Span({'x': 0.}), initial_condition),
  File "/code/pina/condition.py", line 69, in __init__
    raise ValueError('Condition takes only the following keyword arguments: {`input_points`, `output_points`, `location`, `function`, `data_weight`}.')
ValueError: Condition takes only the following keyword arguments: {`input_points`, `output_points`, `location`, `function`, `data_weight`}.

Additional context
openjournals/joss-reviews#5352

@akshaysubr akshaysubr added the bug Something isn't working label Jun 1, 2023
@dario-coscia
Copy link
Collaborator

dario-coscia commented Jun 2, 2023

👋🏻 @akshaysubr and thanks for the feedback. I checked the tutorial in .pynb, .py in here, and the .rst file which is used when building the docs in here and they are all correctly updated.

The problem you are encountering is due to the doc page update. Indeed, we update automatically the documentation page once a month, so if we make changes they are not immediately updated on the documentation page but only once a month. This avoids to refresh the doc page after every commit. Recently commit #91, we made a modification in the tutorial due to a modification in the Conditioning class, so this is not yet visible in the doc page.

Hope this helps :)

@akshaysubr
Copy link
Author

Thanks, that helps. Confirming that the .rst file has the right updated documentation:

    conditions = {
        'x0': Condition(location=Span({'x': 0.}), function=initial_condition),
        'D': Condition(location=Span({'x': [0, 1]}), function=ode_equation),
    }

Would be good to have the readthedocs page also updated or maybe mention this one month lag in the readme so in case something doesn't work, people can check out the native docs in the repo.

@dario-coscia
Copy link
Collaborator

dario-coscia commented Jun 3, 2023

Hello! We updated the documentation page, now also there the tutorial is updated.
Thanks for the feedback, we will discuss how to put this small note into the README😊

@akshaysubr
Copy link
Author

Perfect! I see the updated instructions. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants