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

API links updated to new model names #177

Merged
merged 30 commits into from
Feb 15, 2023
Merged

Conversation

vgro
Copy link
Collaborator

@vgro vgro commented Feb 13, 2023

Description

We recently updated the model names from model.py to {MODEL_NAME}_model.py. In the process, we missed updating the docs which I've done here.

Solves issue #178

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist

  • Make sure you've run the pre-commit checks: $ pre-commit run -a
  • All tests pass: $ poetry run pytest

Further checks

  • [NA] Code is commented, particularly in hard-to-understand areas
  • [NA] Tests added that prove fix is effective or that feature works

@davidorme
Copy link
Collaborator

davidorme commented Feb 13, 2023

@vgro Do you want to add the core/model.py rename and close #178 😄

Copy link
Collaborator

@jacobcook1995 jacobcook1995 left a comment

Choose a reason for hiding this comment

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

Noticed a few broken links, also as David mentioned model.py should be renamed to base_model.py as part of this pull request

docs/source/api/abiotic/abiotic_model.md Outdated Show resolved Hide resolved
docs/source/api/core.md Outdated Show resolved Hide resolved
docs/source/api/core/base_model.md Outdated Show resolved Hide resolved
docs/source/api/soil/soil_model.md Outdated Show resolved Hide resolved
@vgro
Copy link
Collaborator Author

vgro commented Feb 13, 2023

@vgro Do you want to add the core/model.py rename and close #178 😄

I've already done that, please let me know if I missed something.

@jacobcook1995
Copy link
Collaborator

The change from core/model.py to core/base_model.py doesn't show up in the file changes for some reason?

updated link
@jacobcook1995
Copy link
Collaborator

Also some of the links in the module docstrings for abiotic_model.py and soil_model.py will have to change as they currently refer to core/model

@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2023

Codecov Report

Merging #177 (4172747) into develop (444180c) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop     #177   +/-   ##
========================================
  Coverage    95.59%   95.59%           
========================================
  Files           18       18           
  Lines          909      909           
========================================
  Hits           869      869           
  Misses          40       40           
Impacted Files Coverage Δ
virtual_rainforest/core/__init__.py 100.00% <ø> (ø)
virtual_rainforest/core/axes.py 100.00% <ø> (ø)
virtual_rainforest/core/base_model.py 100.00% <ø> (ø)
virtual_rainforest/core/config.py 98.53% <ø> (ø)
virtual_rainforest/core/data.py 87.50% <ø> (ø)
virtual_rainforest/core/logger.py 100.00% <ø> (ø)
virtual_rainforest/core/readers.py 100.00% <ø> (ø)
virtual_rainforest/models/abiotic/__init__.py 100.00% <ø> (ø)
virtual_rainforest/models/soil/__init__.py 100.00% <ø> (ø)
virtual_rainforest/models/soil/constants.py 100.00% <ø> (ø)
... and 5 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@jacobcook1995 jacobcook1995 left a comment

Choose a reason for hiding this comment

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

All works now apart from a minor problem in one of the module docstrings

virtual_rainforest/core/base_model.py Outdated Show resolved Hide resolved
@davidorme
Copy link
Collaborator

@jacobcook1995 and I were just chatting about adding nitpicky = True to the conf.py file.
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-nitpicky

That should catch all of these issues when we run build html. @vgro Do you want to add that change to this PR? And possibly then the results of fixing broken links.

@davidorme
Copy link
Collaborator

Although - having just run that - it also traps all the xarray and numpy refs, so we'd probably want to also fix #147 in this PR! I think that would fix it! That should be a fairly short addition to docs/source/conf.py.

@davidorme
Copy link
Collaborator

I'm going to add a commit to this that turns on nitpicky and intersphinx - there are quite a few errors: sometimes a broken link, sometime e.g. a method using :class:.

@davidorme
Copy link
Collaborator

And @alexdewar suggested we set up a GitHub Action to test the doc builds too, but that seems like another PR to me.

@davidorme
Copy link
Collaborator

That's commit has given me a shortish list of fixes to make. Will whip through them.

@vgro
Copy link
Collaborator Author

vgro commented Feb 13, 2023

That's commit has given me a shortish list of fixes to make. Will whip through them.

Hello and sorry, the website didn't update properly and I didn't see all you comments before I fixed the missing space. Can I leave these change to you @davidorme ?

@davidorme
Copy link
Collaborator

That's fine - got your change. I think @jacobcook1995 is hunting some down too 😄

@vgro
Copy link
Collaborator Author

vgro commented Feb 13, 2023

That's fine - got your change. I think @jacobcook1995 is hunting some down too 😄

I hadn't though about all the links when I started, it's surely good to put some checks in place that we don't have to do that manually in the future :-)

@jacobcook1995
Copy link
Collaborator

jacobcook1995 commented Feb 14, 2023

All the build warnings should now be fixed, I had to turn off nitpick for a few (external) classes because it seemed impossible to get them to link properly.

Copy link
Collaborator

@davidorme davidorme left a comment

Choose a reason for hiding this comment

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

LGTM

@jacobcook1995 jacobcook1995 merged commit c311719 into develop Feb 15, 2023
@jacobcook1995 jacobcook1995 deleted the feature/update_api_links branch February 16, 2023 15:59
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.

Update core/model.py to core/base_model.py Update the sphinx configuration to use intersphinx
4 participants