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

[DOC] Add doc string to upgrade.py #1792

Closed
kcpevey opened this issue May 8, 2023 · 6 comments · Fixed by #2512
Closed

[DOC] Add doc string to upgrade.py #1792

kcpevey opened this issue May 8, 2023 · 6 comments · Fixed by #2512
Labels
area:developer-experience 👩🏻‍💻 area: documentation 📖 Improvements or additions to documentation good first issue Good for newcomers

Comments

@kcpevey
Copy link
Contributor

kcpevey commented May 8, 2023

Context

A file level documentation string summarizing how the upgrade sequence works would be highly beneficial.

Value and/or benefit

There are some doc strings on individual methods, but devs have to do quite a bit of reading and digging around the different methods included before they can understand how it all works. A high level doc string would go a long way in helping out.

Anything else?

No response

@arjxn-py
Copy link
Contributor

arjxn-py commented Jun 9, 2024

Hi there, I can try working on this one upon confirmation.
Here's one sample docstring for do_upgrade method:

def do_upgrade(config_filename, attempt_fixes=False):
    """
    Perform an upgrade of the Nebari configuration file.

    This function loads the YAML configuration file, checks for deprecated keys,
    validates the current version, and if necessary, upgrades the configuration
    to the latest version of Nebari.

    Parameters:
    config_filename (str): The path to the configuration file.
    attempt_fixes (bool): Whether to attempt automatic fixes for validation errors.

    Returns:
    None
    """

Happy to have feedback on it. Thanks 💐

@Adam-D-Lewis
Copy link
Member

Adam-D-Lewis commented Jun 11, 2024

Hi @arjxn-py, thanks for contributing! That doc string looks good and I'd be happy to merge a PR with that. Maybe also add something like the following at the top of the file.

"""This file contains the upgrade logic for Nebari.

This file contains the upgrade logic for Nebari.  Each release of Nebari requires an upgrade step class (which is a child class of UpgradeStep) to be created.  
When a user runs `nebari upgrade  -c nebari-config.yaml`, then the do_upgrade function will then run through all required upgrade steps to bring the config file up to date with the current version of Nebari.
"""

@Adam-D-Lewis
Copy link
Member

Pinging @viniciusdc in case he has any thoughts here.

@arjxn-py
Copy link
Contributor

Thanks so much for the input @Adam-D-Lewis 💐 , I'd be happy to open a PR soon with the docstrings along with the suggested one too.

arjxn-py added a commit to arjxn-py/nebari that referenced this issue Jun 14, 2024
arjxn-py added a commit to arjxn-py/nebari that referenced this issue Jun 14, 2024
arjxn-py added a commit to arjxn-py/nebari that referenced this issue Jun 14, 2024
arjxn-py added a commit to arjxn-py/nebari that referenced this issue Jun 15, 2024
arjxn-py added a commit to arjxn-py/nebari that referenced this issue Jun 15, 2024
@viniciusdc
Copy link
Contributor

I just saw your PR @arjxn-py, fantastic work! thanks for the contribution.

@arjxn-py
Copy link
Contributor

Thanks for the kind words @viniciusdc, will look forward to contribute more & add value :) 🚀

arjxn-py added a commit to arjxn-py/nebari that referenced this issue Jun 19, 2024
arjxn-py added a commit to arjxn-py/nebari that referenced this issue Jun 19, 2024
arjxn-py added a commit to arjxn-py/nebari that referenced this issue Jun 19, 2024
@github-project-automation github-project-automation bot moved this from New 🚦 to Done 💪🏾 in 🪴 Nebari Project Management Jun 19, 2024
@github-project-automation github-project-automation bot moved this from Todo 📬 to Done 💪🏾 in 📖 - Documentation Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:developer-experience 👩🏻‍💻 area: documentation 📖 Improvements or additions to documentation good first issue Good for newcomers
Projects
Status: Done 💪🏾
Development

Successfully merging a pull request may close this issue.

4 participants