Skip to content

Conversation

@coopernetes
Copy link
Contributor

@coopernetes coopernetes commented Oct 27, 2023

  • shorten the README to include minimal instructions. Link to doc site
    for detailed documentation.
  • remove boilerplate from README for contributing steps. Moved those
    guidelines to CONTRIBUTING doc
  • use simplified npx commands for executing git-proxy
  • using github.com/coveooss/json-schema-for-humans to generate a
    readable document in Markdown form to display in doc site
  • include a config used by json-schema-for-humans (jhsf.config.json)
    so that doc can be generated repeatably
  • add npm script to execute the CLI with the included config and format
    into a proper MDX doc for Docusaurus to serve

Testing npx with the new release:

$ npx -- @finos/git-proxy@1.1.0
Need to install the following packages:
  @finos/git-proxy@1.1.0
Ok to proceed? (y) 
npm WARN deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated @material-ui/styles@4.11.5: Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.
npm WARN deprecated @material-ui/core@4.12.4: Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5.
creating user
        user=admin,
        gitAccount=none
        email=admin@place.com,
        admin=true
Service Listening on 8080
Listening on 8000

$ npx -- @finos/git-proxy --help
Usage: git-proxy [options]

Options:
      --help      Show help                                            [boolean]
      --version   Show version number                                  [boolean]
  -v, --validate  Check the proxy.config.json file in the current working
                  directory for validation errors.
  -c, --config    Path to custom git-proxy configuration file.
                                                  [default: "proxy.config.json"]
$ npx -- @finos/git-proxy --version
1.1.0
$ npx -- @finos/git-proxy
Service Listening on 8080
Listening on 8000

Running the new script:

$ npm run gen-schema-doc

> @finos/git-proxy@1.1.0 gen-schema-doc
> node ./scripts/doc-schema.js

== Generating schema.md ==
== Generated schema.md in 0:00:00.057090 ==

Wrote schema reference to ./website/docs/configuration/reference.mdx

@netlify
Copy link

netlify bot commented Oct 27, 2023

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit 3fe9b2b
🔍 Latest deploy log https://app.netlify.com/sites/endearing-brigadeiros-63f9d0/deploys/6578623b29bda10008576bec

@coopernetes coopernetes changed the title chore/docs npx docs: generated JSON schema reference, tidy up README and contrib docs Oct 27, 2023
@coopernetes
Copy link
Contributor Author

@maoo @JamieSlome I'm assuming the netlify preview won't deploy until #325 is merged?

@JamieSlome
Copy link
Member

@coopernetes - these deployments are being weird. I'm getting some PRs that are deploying, some that aren't.

@maoo
Copy link
Member

maoo commented Oct 27, 2023

I manually re-triggered the Netlify build, preview is available on https://deploy-preview-327--endearing-brigadeiros-63f9d0.netlify.app/ and looks great, TY @coopernetes !

Also left a comment on #325 , right now netlify behaves a bit randomly and would be great to solve it.

@JamieSlome JamieSlome self-assigned this Oct 27, 2023
Copy link
Member

@JamieSlome JamieSlome left a comment

Choose a reason for hiding this comment

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

Couple a of questions there for ya @coopernetes. Beautiful PR though ❤️

Copy link
Member

@JamieSlome JamieSlome left a comment

Choose a reason for hiding this comment

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

Updated some of my comments; once addressed, this PR is ready to go 👍

@coopernetes
Copy link
Contributor Author

@JamieSlome all the review comments should now be resolved and we have a lean README with minimal instructions. Leaving the full e2e working example to the docs. Let me know if any further changes are required.

@coopernetes
Copy link
Contributor Author

Hmm... @maoo know why this is failing? I swear, this was deploying fine on a previous commit. And I can see in the MDX doc that we have matching closing tags so I don't know why the doc build is failing.

https://app.netlify.com/sites/endearing-brigadeiros-63f9d0/deploys/655f767daa9c240008ef812e

10:58:28 AM: [ERROR] Client bundle compiled with errors therefore further build is impossible.
10:58:28 AM: Error: MDX compilation failed for file "/opt/build/repo/website/docs/configuration/reference.mdx"
10:58:28 AM: Cause: Expected a closing tag for `</strong>` (19:1-19:10) before the end of `paragraph`

I can try rendering a different template using the new generator tooling for the JSON schema.

@coopernetes
Copy link
Contributor Author

coopernetes commented Dec 10, 2023

The build error is related to compliance with MDX that the json-schema-for-humans tool doesn't account for at the moment in its plain Markdown template. Related coveooss/json-schema-for-humans#223 and discussion on mdxjs https://github.com/orgs/mdx-js/discussions/2260

I'll push up a fix in the schema doc generation script to account for this.

coopernetes and others added 9 commits December 10, 2023 15:39
- shorten the README to include minimal instructions. Link to doc site
  for detailed documentation.
- remove boilerplate from README for contributing steps. Moved those
  guidelines to CONTRIBUTING doc
- use simplified npx commands for executing git-proxy
- using github.com/coveooss/json-schema-for-humans to generate a
  readable document in Markdown form to display in doc site
- include a config used by json-schema-for-humans (jhsf.config.json)
  so that doc can be generated repeatably
- add npm script to execute the CLI with the included config and format
  into a proper MDX doc for Docusaurus to serve
* add rationale for forking and explaining the use of GitHub CLI in the
  introductory README
* make the output smaller
* mention that the authorisedList is a configured list of repos
  permitted through the proxy
JamieSlome and others added 2 commits December 10, 2023 15:39
- generate doc now complies with MDX and compiles correctly with
  docusaurus
- replace the title as per PR comments via script

Signed-off-by: Thomas Cooper <thomas.cooper@rbc.com>
@coopernetes
Copy link
Contributor Author

@JamieSlome @maoo the new docs are now fixed and rebased with all the updates from main. The site is built successfully with the generated schema reference doc. Preview is available here:

https://deploy-preview-327--endearing-brigadeiros-63f9d0.netlify.app/docs/configuration/reference

Copy link
Member

@maoo maoo left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@JamieSlome JamieSlome left a comment

Choose a reason for hiding this comment

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

LGTM! 🍰

@JamieSlome JamieSlome merged commit 9957131 into finos:main Dec 12, 2023
Psingle20 pushed a commit to Psingle20/git-proxy that referenced this pull request Nov 27, 2024
docs: generated JSON schema reference, tidy up README and contrib docs
@coopernetes coopernetes deleted the chore/docs-npx branch February 23, 2025 20:41
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