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

Fix/docs errors #95

Merged
merged 4 commits into from
Nov 7, 2023
Merged

Fix/docs errors #95

merged 4 commits into from
Nov 7, 2023

Conversation

FLomb
Copy link
Contributor

@FLomb FLomb commented Nov 6, 2023

I have been fixing some things in the documentation and the GitHub homepage. First of all, some broken links to images pointing to the outdated master branch (now substituted by main). Second, some typos or other minor stylistic issues in the .rst files and jupyter notebooks of the docs.

I also wonder why we have the jupyter notebooks replicating the docs exactly. Are they necessary? I had to copy-and-paste any changes to the docs there, but I am not sure these notebooks are used anywhere.

@FLomb FLomb changed the base branch from main to development November 6, 2023 13:33
@FLomb FLomb added enhancement New feature or request documentation labels Nov 6, 2023
@FLomb FLomb changed the title Fix/docs erros Fix/docs errors Nov 6, 2023
@mohammadamint
Copy link
Collaborator

mohammadamint commented Nov 6, 2023

I have been fixing some things in the documentation and the GitHub homepage. First of all, some broken links to images pointing to the outdated master branch (now substituted by main). Second, some typos or other minor stylistic issues in the .rst files and jupyter notebooks of the docs.

I also wonder why we have the jupyter notebooks replicating the docs exactly. Are they necessary? I had to copy-and-paste any changes to the docs there, but I am not sure these notebooks are used anywhere.

As .rst files are more compatible with Sphinx, it seems better to have the rst format of the Jupyter examples in the documentation, and having the jupyter files in the repo, could be also beneficial for the users as they can directly download them and run them. If something is fixed in the Jupyter files, the rst version can be downloaded without the need to replicate all the changes all over both Jupyter and .rsts.

Copy link
Collaborator

@mohammadamint mohammadamint left a comment

Choose a reason for hiding this comment

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

In case that we are not sure, the changes are implemented both in notebooks and rst files, we can generate the rst files from Jupyter Notebook. Otherwise, we can continue already merge the PR!

@@ -153,7 +153,7 @@ Generating a profile for the ith day of the year
.. image:: output_13_1.png


whole year profile can be generated
Whole year profile functionality
Copy link
Collaborator

Choose a reason for hiding this comment

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

The ~ underneath the title should in principle, match the number of characters of the title

Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think of having a github action to review the synatx issues in rst?

I found this library https://github.com/rstcheck/rstcheck that might be used to do so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just fixed this issue; thanks for noticing. It'd be cool to have automated .rst syntax checks, I agree! But that's for a future PR

Copy link
Collaborator

@Bachibouzouk Bachibouzouk left a comment

Choose a reason for hiding this comment

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

Apart the title I have no other comments :)

Fixed the mismatch between a title length and the underlying line of "~" symbols, as requested by the reviewers
@FLomb
Copy link
Contributor Author

FLomb commented Nov 7, 2023

@Bachibouzouk I am not quite sure how this is possible since I only touched the docs, but now we have some failing tests about the code. Namely:

FAILED tests/test_calc_peak_time_range.py::test_peak_time_range_values - assert 0.03103792853653431 > 0.05
FAILED tests/test_switch_on.py::TestRandSwitchOnWindow::test_coincidence_normality_on_peak - AssertionError: The 'coincidence' values are not normally distributed.

Could it be that the 'randomness' embedded in these tests makes them occasionally not pass?

@mohammadamint
Copy link
Collaborator

@Bachibouzouk I am not quite sure how this is possible since I only touched the docs, but now we have some failing tests about the code. Namely:

FAILED tests/test_calc_peak_time_range.py::test_peak_time_range_values - assert 0.03103792853653431 > 0.05
FAILED tests/test_switch_on.py::TestRandSwitchOnWindow::test_coincidence_normality_on_peak - AssertionError: The 'coincidence' values are not normally distributed.

Could it be that the 'randomness' embedded in these tests makes them occasionally not pass?

To me this should be the case, as in PR #97, I am successfully passing the tests.

This fixes the problem currently blocking PR #96
@FLomb FLomb merged commit 70368f7 into development Nov 7, 2023
2 checks passed
@FLomb FLomb deleted the fix/docs-erros branch November 7, 2023 14:59
@FLomb
Copy link
Contributor Author

FLomb commented Nov 7, 2023

I updated the PR with the fix that was preventing PR #97 from passing the tests. After updating, the issue with the failed tests above disappeared, reinforcing the idea that this is perhaps due to the randomness occasionally ending up out of the test bounds. Something to double-check!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants