-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
invert npmignore to include what we want #4605
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4605 +/- ##
==========================================
- Coverage 50.16% 50.15% -0.02%
==========================================
Files 513 513
Lines 18830 18830
Branches 1664 1664
==========================================
- Hits 9447 9444 -3
- Misses 8965 8969 +4
+ Partials 418 417 -1
Continue to review full report at Codecov.
|
How is it that this increases test coverage? |
@trusktr looks good to me. Let's wait until we get the stray .spec.js file removed, update this pr, and then merge. PRs have a habit of getting merged out of order sometimes. |
@shefalijoshi please take a look at this with @trusktr . This pattern seems to be far more sustainable. |
I believe this PR can be merged separately from fixing that test. The pull request that fixes that test would have to remove the line with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Needs Shefali's approval and the two lines removed
@shefalijoshi @unlikelyzero I removed the no-longer-needed line, and also added a |
/src/**/*Spec.js | ||
/src/**/test/ | ||
# TODO move test utils into test/ folders | ||
/src/utils/testing.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wdyt think about this TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/src/utils/testing.js
was previously being published to npm.
I added a /src/**/test/
rule ignore anything in test/
folders. It would make sense to put all test files (apart from the specs files that may be co-located with the thing they test) in test/
folders, to make it easier to ignore them without having to modify npmignore
.
We can add one-off rules for specific test files to ignore as we go, but I think it would be better to have the test/
folder convention, otherwise it's the same problem this PR aimed to eliminate (but in reverse).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trusktr maybe we could file an issue for that chance and include a link to that issue in this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a naming convention of Spec. why can't we use that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shefalijoshi Yes, true that, but multiple spec files like to import test-specific utilities from src/utils/testing.js
so I had to specifically ignore that file because it isn't following a catch-all convention. So what I meant above is that instead we could move that file to src/test/utils.js
instead, and that way it will fall under the src/**/test/*
catch-all instead of having a one-off entry in npmignore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do go with this approach, we should add example
to this too. It has eventGenerator
and generator
which a lot of people use to demo OpenMCT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do go with this approach, we should add
example
to this too. It haseventGenerator
andgenerator
which a lot of people use to demo OpenMCT
@trusktr Please include the example, docs folders and Contributing.md, API.md, app.js as well.
What is the procfile used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to publish all those things in the package on NPM? I figured people can go to the repo for that stuff. People don't normally look for that stuff in node_modules
. EDIT: Oh I see @scottbell, so some people will want to import from examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do people consume app.js
from node_modules
? My understanding is we want to obliterate app.js ( @akhenry) and I think it is a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the procfile used for?
Not sure why we need that. Are we using it on some service? If some downstream project needs it, they should have that in their repo instead.
To test, use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I had one suggested change that won't block the merge. Shefali is the release manager so she should give the final 👍
/src/**/*Spec.js | ||
/src/**/test/ | ||
# TODO move test utils into test/ folders | ||
/src/utils/testing.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trusktr maybe we could file an issue for that chance and include a link to that issue in this comment?
@unlikelyzero made a new issue #4972 |
@shefalijoshi wrote:
Do we need to includes all those? Looking for thoughts. Will put a checkbox next to the ones to include
|
App.js has a removal ticket here: #4922 if something needs to be removed, we could also remove at that time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I'm not sure as I don't have data to say one way or another, but the Sin Wave, State, and Event generator seem to get a lot of use in openmct deployments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Closes #4641
re: #4511 (comment)
Describe your changes:
instead of excluding a set of files that is more likely to change over time (f.e. ops files, build scripts, ci configs, etc)
All Submissions:
Author Checklist
To test, use
npm pack
to create a tar file, then verify the contents.Reviewer Checklist