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

Add README.md As Primary Documentation File #42689

Merged

Conversation

khadijahazward
Copy link
Contributor

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues.

Fixes #

Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@khadijahazward khadijahazward force-pushed the feature-readme.md branch 4 times, most recently from 6728e23 to 998b97c Compare May 7, 2024 04:13
// Checks if Package.md is present and issues a warning
Path packageMd = project.sourceRoot().resolve(ProjectConstants.PACKAGE_MD_FILE_NAME);
if (packageMd.toFile().exists()) {
String warning = """
Copy link
Contributor

@azinneera azinneera May 7, 2024

Choose a reason for hiding this comment

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

Let's use the below API to create the diagnostic

public static Diagnostic createDiagnostic(DiagnosticInfo diagnosticInfo,

Copy link
Contributor

@azinneera azinneera May 7, 2024

Choose a reason for hiding this comment

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

Let's introduce DEPRECATED_DOC_FILE("BCE5601", "deprecated.doc.file") code for this

Copy link
Contributor

Choose a reason for hiding this comment

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

So far, we haven't added any diagnostics in the Command classes. If it's an error we either throw a ProjectException. If it's a warning we just print them.

I think printing the warning is fine. Otherwise we'll have to introduce diagnostics to PackCommand, move all the current error/warning printing to diagnostics instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

Discussed this offline with @azinneera and decided to add the warning in the format of a diagnostic.

Copy link
Contributor

@azinneera azinneera May 10, 2024

Choose a reason for hiding this comment

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

@khadijahazward Let's remove the space before and after the warning message. It can be a simple string declaration.
i.e String warning = "The use of Package.md and Module.md is deprecated. Update the package to add a README.md file."

@khadijahazward khadijahazward force-pushed the feature-readme.md branch 3 times, most recently from 2077c72 to 751fffe Compare May 8, 2024 11:35
Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 91.83673% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 77.19%. Comparing base (148286d) to head (322d2cf).
Report is 124 commits behind head on master.

Files Patch % Lines
...rc/main/java/io/ballerina/cli/cmd/PushCommand.java 33.33% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #42689      +/-   ##
============================================
+ Coverage     76.80%   77.19%   +0.39%     
+ Complexity    53972    51288    -2684     
============================================
  Files          2924     2929       +5     
  Lines        203952   204429     +477     
  Branches      26597    26669      +72     
============================================
+ Hits         156638   157812    +1174     
+ Misses        38777    38054     -723     
- Partials       8537     8563      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@azinneera azinneera merged commit 42d7509 into ballerina-platform:master May 13, 2024
18 checks passed
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.

None yet

4 participants