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

[wiki] Move update utils into main repo #831

Merged
merged 11 commits into from
Aug 11, 2020

Conversation

j0yu
Copy link
Contributor

@j0yu j0yu commented Jan 8, 2020

  • Wiki CI to build and generate artefact for wiki repository markdown pages
  • Sidebar, Footer, Home and Notes from wiki repository
  • rez/cli/_main.py:setup_parser() function to return rez CLI's LazyArgumentParser
    • Split from rez/cli/_main.py:run() function
    • rez/cli/_main.py:run() uses/calls this new rez/cli/_main.py:setup_parser()
  • update.py combines wiki/update.sh and wiki repository's utils/* scripts

update.py

In addition to combining the many update scripts into 1, these changes were also added:

  • Generate Command-Line-Tools.md from rez CLI's LazyArgumentParser

  • New arguments parser:

    python wiki/update-wiki.py --help

    usage: update-wiki [-h] [--no-push] [--keep-temp] [--github-repo REPO]
                       [--github-branch BRANCH] [--github-workflow WORKFLOW]
                       [--wiki-url URL] [--wiki-dir DIR]
    
    Update GitHub Wiki
    
    optional arguments:
      -h, --help            show this help message and exit
      --no-push             Don't git commit and push new changes. (default: True)
      --keep-temp           Don't remove temporary wiki repository directory.
                            (default: False)
      --github-repo REPO    Url to GitHub repository without leading github.com/.
                            Overrides environment variable GITHUB_REPOSITORY.
                            (default: nerdvegas/rez)
      --github-branch BRANCH
                            Name of git branch that is generating the Wiki.
                            Overrides environment variable GITHUB_BRANCH.
                            (default: master)
      --github-workflow WORKFLOW
                            Name of GitHub workflow that is generating the Wiki.
                            Overrides environment variable GITHUB_WORKFLOW.
                            (default: Wiki)
      --wiki-url URL        Use this url to git clone wiki from. Overrides
                            environment variable CLONE_URL. (default:
                            git@github.com:nerdvegas/rez.wiki.git)
      --wiki-dir DIR        Use this EMPTY directory to temporarily store cloned
                            wiki. Overrides environment variable TEMP_WIKI_DIR.
                            (default: /home/joseph/repos/rez/wiki/.rez-gen-wiki-
                            tmp)
    
  • Optimised create_contributors_md()

  • Switched to use from __future__ statements

  • process_markdown_files(), now performs substitutions for Footer, Sidebar and Command-Line-Tools. These are also added to no_toc list.

    • Was process.py:if __name__ == '__main__' from wiki repository
  • process_markdown_files.do_raplace() function now takes a mapping of substitutions rather than a single substitution pair

  • Minor variable names, formatting cleanup

Wiki Changes

Mostly visual, see https://github.com/wwfxuk/rez/wiki

wiki-sidebar-footer

  • Sidebar
    • Icons and named sections
    • Moved unwritten pages into collapsible section
    • Added Wiki CI status
    • Added missing but written pages
  • Footer
    • Using shields.io
    • Added slack group link

Here is also a quick look at the new auto-generated command line tools page.

It's not fully in markdown but it's a passable start.

wiki-cli

@nerdvegas
Copy link
Contributor

Nice one Joe, will be getting to this soon and have been looking over it recently.

@j0yu j0yu force-pushed the wiki-merge-utils branch 3 times, most recently from 308981d to 43a0229 Compare January 21, 2020 16:41
@j0yu j0yu force-pushed the wiki-merge-utils branch 2 times, most recently from 5a4d592 to af76811 Compare April 20, 2020 16:02
@j0yu j0yu force-pushed the wiki-merge-utils branch 2 times, most recently from 27764fd to 336fb05 Compare July 14, 2020 12:37
@davidlatwe
Copy link
Contributor

This Wiki update is awesome ! What's the status of this PR ?

@j0yu j0yu force-pushed the wiki-merge-utils branch from 336fb05 to fed456b Compare August 5, 2020 15:31
Joseph Yu and others added 11 commits August 5, 2020 17:24
- Removed old Command Line Tools and update-wiki.sh
- Split cli._main.run into new setup_parser function
- New update-wiki.py that deprecates wiki repo's utils/*, generates Command-Line-Tools automatically
@j0yu j0yu force-pushed the wiki-merge-utils branch from fed456b to 049ba9f Compare August 5, 2020 16:24
@nerdvegas
Copy link
Contributor

nerdvegas commented Aug 5, 2020 via email

@nerdvegas nerdvegas merged commit 8c256aa into AcademySoftwareFoundation:master Aug 11, 2020
@nerdvegas
Copy link
Contributor

Merged, but @j0yu please be aware that the Command Line Tools section isn't working properly :(

https://github.com/wwfxuk/rez/wiki/Command-Line-Tools

@j0yu j0yu deleted the wiki-merge-utils branch August 11, 2020 10:42
@j0yu
Copy link
Contributor Author

j0yu commented Aug 11, 2020

Thanks for the merge! I'll open up a separate issue and PR for it 👨‍💻

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.

3 participants