Is it possible to skip codeclimate analysis for changes to certain files - code-climate

Codeclimate analysis runs for every pull request that is raised. However, I would like it to skip the analysis when changes are done to files under the excluded folders.
Is it possible to configure such behaviour? The aim is to reduce the time taken for a change/fix to be merged. And for fixes that don't involve the code that needs to be analyzed, I would like the changes to be merged without waiting for the analysis to be over.

Yes, you can exclude files or folders using exclude_paths in a .codeclimate.yml file.
Some samples:
exclude_paths:
- "**/build"
- "**/node_modules/"
- "**/generated/"
- config/
- db/
- dist/
- features/
- "**/spec/"
- "**/vendor/"
- "**/*_test.go"
- "**/*.d.ts"
- "**/*.min.js"
- "**/*.min.css"
- "**/__tests__/"
- "**/__mocks__/"
For details you can check Excluding Files and Folders

Related

rclone - How do I list which directory has the latest files in AWS S3 bucket?

I am currently using rclone accessing AWS S3 data, and since I don't use either one much I am not an expert.
I am accessing the public bucket unidata-nexrad-level2-chunks and there are 1000 folders I am looking at. To see these, I am using the windows command prompt and entering :
rclone lsf chunks:unidata-nexrad-level2-chunks/KEWX
Only one folder has realtime data being written to it at any time and that is the one I need to find. How do I determine which one is the one I need? I could run a check to see which folder has the newest data. But how can I do that?
The output from my command looks like this :
1/
10/
11/
12/
13/
14/
15/
16/
17/
18/
19/
2/
20/
21/
22/
23/
... ... ... (to 1000)
What can I do to find where the latest data is being written to? Since it is only one folder at a time, I hope it would be simple.
Edit : I realized I need a way to list the latest file (along with it's folder #) without listing every single file and timestamp possible in all 999 directories. I am starting a bounty and the correct answer that allows me to do this without slogging through all of them will be awarded the bounty. If it takes 20 minutes to list all contents from all 999 folders, it's useless as the next folder will be active by that time.
If you wanted to know the specific folder with the very latest file, you should write your own script that retrieves a list of ALL objects, then figures out which one is the latest and which bucket it is in. Here's a Python script that does it:
import boto3
s3_resource = boto3.resource('s3')
objects = s3_resource.Bucket('unidata-nexrad-level2-chunks').objects.filter(Prefix='KEWX/')
date_key_list = [(object.last_modified, object.key) for object in objects]
print(len(date_key_list)) # How many objects?
date_key_list.sort(reverse=True)
print(date_key_list[0][1])
Output:
43727
KEWX/125/20200912-071306-065-I
It takes a while to go through those 43,700 objects!

Integrate SASS/SCSS on Ember Project with POD structure

I just want to ask what is the best approach to integrate sass/scss on ember project?
Currently my project is in pod structure and I just import style.scss on main app.scss under styles folder.
Is it fine or there is a better approach?
--- app
---- pods
------- home
---------- template.hbs
---------- controller.js
---------- style.scss
---- styles
------- app.scss
Then in app.scss styles imported look like this
#import "./app/pods/home/style.scss";
I haven't used pods in years - because (like expecting controllers to be removed) - I was told that there was going to be a new file layout system. Since hearing that / I've heard bits and pieces of conversation that lead me to believe that pods aren't really a go-to for new projects.
That being said, I share your desire to have a nice file structure. I'd love to 'drag' a folder from one project to another / and just have all the parts of the component copy over.
Since we have the app.scss - (you said you're using sass) - / that kinda acts as the index.
I include resets and mixins and a bunch of stuff for setup. - so, that's not really podish... and maybe there are 'page' level kinda layout... which doesn't really fit either... - so, what it comes down to is really 'components', right?
ember-component-css is pretty cool - but it also has some opinions that could clash.
There's this - https://github.com/justtal/ember-cli-sass-pods - but it's 4 years old / (but so are pods) - so, it might still work great.
Because there isn't a really clear path here... I just create a component folder in styles/components/component-name.styl - and then in my styles/components.styl I #import 'component-name.styl - and then in my app.styl I import the components...
In my case / I actually like to use the cascade - and I need the files to all to be combined - in order. I can't have some of it in the vendor file.
It's not ideal (just because I have to create each file explicitly and register it) - but I can't afford to just keep wishing there was a better file layout.
Instead of fuzzy searching component-name > template
I just search template > component-name
¯\_(ツ)_/¯
I wonder which style will cause me less pain in future transitions. They'll offer codemods to help / but they can't account for unique configurations.
I'd suggest asking this in the official discuss forum. You'll get the real answers there. : )
https://discuss.emberjs.com/
app/styles directory, is the home for stylesheets like CSS, SASS, or LESS.
Folders like vendor and public that can also hold many other files of the developer's choice.
So in your case if you wish to have separate scss file for each pod,
you can put it in the place as you mentioned. (else)
have it under app/styles/pod1.scss and import it under .ember-cli-build.js -> app.import('app/styles/pod1.scss')
[References]
You can get the detailed view of Project layouts, Stylesheet compilation, Assets and dependencies below
Project layouts
Stylesheet compilation
Assets and dependencies
Besides ember-component-css there is ember-css-modules.
Both addons try to achieve about the same goal, however I really prefer ember-css-modules.
That addon has an addon called ember-css-modules-sass. Both together will easily allow you to write one sass file per component.
You just place a styles.scss file in your component pod (app/components/my-component/styles.scss and then use local-class="my-class" instead of class="my-class" in your template.
Your classes in your scss will be automatically namespaces.

Is it possible to comment/mark out certain folders in a collection while running via postman runner

I am working on a collection arranged in different folders w.r.t. different business component scenarios. Now some of the scenario folders might be alternative/redundant paths for the same workflow. Is it possible to somehow unmark/comment and mark/uncomment some of these alternate path folders in postman runner to get varying runs easily.
Ok, so one way is to arrange the collection folders in following way to facilitate the same:
- Main Collection
- Workflow1_Folder
- Workflow2_Folder
- Workflow3_Folder
- Workflow4_Folder
- UnmarkedWorkflows Collection
- Workflow2_Alternate_Folder - this will contain the steps that are alternate to ones on Main>Workflow2_Folder
- Workflow3_Alternate_Folder - this will contain the steps that are alternate to ones on Main>Workflow3_Folder
Only the Main folder needs to be run.
If/when required Workflow2_Alternate_Folder could be moved into Main folder from the UnmarkedWorkflows Collection followed by moving Workflow2_Folder to UnmarkedWorkflows Collection. Then Main collection could be run to test an alternate path for the same Use Case.

How to maintain the page folder structure in pelican?

I've copied several folders inside the path content/pages. After running the pelican content command, I get the html files converted under the output folder where all the html files are copied under output/pages as a whole.
For ex:
If I have the folder structure:
content
- pages
- hello
- hello.html
- world
- world.html
I get the output as:
output
- pages
- hello.html
- world.html
I need to retain the original folder structure in the output folder.
The USE_FOLDER_AS_CATEGORY = True option didn't work. Apparently, it works only for Articles not for pages.
Is there any other way to build the folder structure?
I believe the following plugin was designed for the exact use case you described: https://github.com/akhayyat/pelican-page-hierarchy

What kind of files I can use in GitHub Pages?

I put yaml file on GitHub Pages, but I don't find that yaml file. I'll change file's extension (to txt), and I want to know what kind of files I can use? Any white list or document exist?
This is my trial and errors.
OK
txt - http://tachikoma.io/i18n-step.txt
html - http://tachikoma.io/index.html
js - http://tachikoma.io/js/init.js
css - http://tachikoma.io/css/prism.css
json - http://tachikoma.io/locales/en/translation.json
NG(404)
yml - http://tachikoma.io/example/bundler/.tachikoma.yml
pot - http://tachikoma.io/_build/translation.pot
repository: https://github.com/tachikomaio/maguro.tachikoma.io
Edited: 2014-11-12
GitHub pages does not show a file which name starts with period e.g. .example.yml.
This is due to the fact that GH pages tries to manage your site as a Jekyll site. Then ignoring some file name patterns.
If you want all your files to be copied just add an empty file named .nojekyll at the root of your site.