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 file extension for SnakeMake #3953

Merged
merged 2 commits into from Jan 14, 2020
Merged

Conversation

nh13
Copy link
Contributor

@nh13 nh13 commented Dec 17, 2017

Previously a file name was defined for SnakeMake: #1834

Currently, the canonical extension is smk (see this discussion with the author (@johanneskoester) of SnakeMake, and the FAQ).

Previously a file name was defined for [SnakeMake[(snakemake-wrappers.readthedocs.io): github-linguist#1834

Currently, the canonical extension is `smk` (see [this discussion](https://groups.google.com/forum/#!topic/Snakemake/segLE-RlV_s) with the author (@johanneskoester) of SnakeMake, and the [FAQ](http://snakemake.readthedocs.io/en/stable/project_info/faq.html#how-do-i-enable-syntax-highlighting-in-vim-for-snakefiles)).
@lildude
Copy link
Member

lildude commented Mar 28, 2018

Sorry about the delay in getting to this PR. Unfortunately, this extension isn't popular enough on GitHub for this PR to be merged. At the moment, the stats are:

Total files found: 911
Unique public user/repos: 113
Unique owners: 95

As per the contributing guidelines at https://github.com/github/linguist/blob/master/CONTRIBUTING.md#adding-an-extension-to-a-language "we prefer that extensions be in use in hundreds of repositories before supporting them in Linguist." This is close, but no cigar.

Accordingly, I'll added the "Pending popularity" label.

@johanneskoester
Copy link

To clarify, it should be both, Snakefile and .smk be considered the official way to detect Snakemake related files.
Maybe this is a misunderstanding, but it seems like it already works for .smk: https://github.com/snakemake-workflows/rna-seq-star-deseq2/blob/master/rules/align.smk

@lildude
Copy link
Member

lildude commented Mar 29, 2018

Maybe this is a misunderstanding, but it seems like it already works for .smk: https://github.com/snakemake-workflows/rna-seq-star-deseq2/blob/master/rules/align.smk

That file is currently being detected as Python because you've asked for it to be detected as Python - https://github.com/snakemake-workflows/rna-seq-star-deseq2/blob/master/.gitattributes 😄

@johanneskoester
Copy link

Ah, I forgot about that. Thanks for the clarification!

@johanneskoester
Copy link

Ok, but still, you already do this automatically for files called "Snakefile". So, basically it is already in. What stands against also doing it for .smk?

@lildude
Copy link
Member

lildude commented Mar 30, 2018

Ok, but still, you already do this automatically for files called "Snakefile". So, basically it is already in. What stands against also doing it for .smk?

As I mentioned before, popularity. Snakefile is a defined file that is waaaay more popular than the .smk extension and easily satisfies the "hundreds of repositories" requirement. .smk barely tips over 100 at the moment.

@johanneskoester
Copy link

Ok, I see, given that criterion, this is of course clear. However, both are for the same tool though (Snakemake). While many people just need a single Snakefile, they add these .smk files for modularization within the same repo. Shouldn't popularity rather be measured via the tool, hence taking the sum of Snakefile and .smk occurrences?

@lildude
Copy link
Member

lildude commented Mar 30, 2018

Shouldn't popularity rather be measured via the tool, hence taking the sum of Snakefile and .smk occurrences?

Unfortunately not. Peeps can use whatever extension they like with most languages. Just because Python is popular, doesn’t mean we should accept .foobar23 as a Python extension when a few peeps use it.

@johanneskoester
Copy link

Ok, I understand. We can wait then ;-).

hobrien added a commit to hobrien/GENEX-FB2 that referenced this pull request May 29, 2018
‘smk’ appears to be the accepted file extension for these things. See
github-linguist/linguist#3953
@pchaigno
Copy link
Contributor

pchaigno commented Aug 4, 2018

Closing in favor of #4219. We'll monitor the popularity of the extension there.

If you have an improved search query compared to the one used in #4219, please post it here and I'll update #4219.

@pchaigno pchaigno closed this Aug 4, 2018
@pchaigno
Copy link
Contributor

The .smk file extension is now popular enough for inclusion (see #4219). @nh13 Do you want me to reopen this pull request or would you prefer to resubmit as a new pull request?

@nh13
Copy link
Contributor Author

nh13 commented Sep 19, 2019

Let’s reopen!

@pchaigno
Copy link
Contributor

Ok! You'll need to add and fill in our template for pull requests.

@pchaigno pchaigno reopened this Sep 19, 2019
@stale
Copy link

stale bot commented Oct 19, 2019

This pull request has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this pull request was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

@stale stale bot added the Stale label Oct 19, 2019
@nh13
Copy link
Contributor Author

nh13 commented Oct 19, 2019

I’ll update the pr

@stale stale bot removed the Stale label Oct 19, 2019
@stale
Copy link

stale bot commented Nov 18, 2019

This pull request has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this pull request was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

@stale stale bot added the Stale label Nov 18, 2019
@nh13
Copy link
Contributor Author

nh13 commented Nov 18, 2019

@johanneskoester do you want to take this one over (in particular the checklist?)

@stale stale bot removed the Stale label Nov 18, 2019
@stale
Copy link

stale bot commented Dec 18, 2019

This pull request has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this pull request was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

@stale stale bot added the Stale label Dec 18, 2019
@johanneskoester
Copy link

johanneskoester commented Dec 28, 2019

Description

Checklist:

@stale stale bot removed the Stale label Dec 28, 2019
@johanneskoester
Copy link

@nh13 here we go. Do you need anything else?

@pchaigno
Copy link
Contributor

pchaigno commented Jan 3, 2020

I have included a real-world usage sample for all extensions added in this PR:
Sample source(s):
https://github.com/snakemake-workflows/rna-seq-kallisto-sleuth
https://github.com/snakemake-workflows/dna-seq-gatk-variant-calling

@johanneskoester @nh13 Could you add one or two files from these repositories to the pull request, under samples/Python/?

@johanneskoester
Copy link

@nh13 I don't think that I have access to your branch. Can you add one of the smk files from dna-seq-gatk-variant-calling?

@nh13
Copy link
Contributor Author

nh13 commented Jan 6, 2020

Will do when I’m back from vacation in a week or so.

@nh13
Copy link
Contributor Author

nh13 commented Jan 10, 2020

@johanneskoester added:

samples/Python/snakemake-calling.smk
samples/Python/snakemake-mapping.smk

I also added you as a collaborator :)

@johanneskoester
Copy link

Thanks a lot! I am looking forward to see this automatic highlighting Github and Atom.

Copy link
Contributor

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

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

Thanks!

@lildude lildude merged commit 53379ce into github-linguist:master Jan 14, 2020
ayoubserti pushed a commit to ayoubserti/linguist that referenced this pull request Jan 22, 2020
* Add file extension for SnakeMake

Previously a file name was defined for [SnakeMake[(snakemake-wrappers.readthedocs.io): github-linguist#1834

Currently, the canonical extension is `smk` (see [this discussion](https://groups.google.com/forum/#!topic/Snakemake/segLE-RlV_s) with the author (@johanneskoester) of SnakeMake, and the [FAQ](http://snakemake.readthedocs.io/en/stable/project_info/faq.html#how-do-i-enable-syntax-highlighting-in-vim-for-snakefiles)).

* Adding two Snakemake (smk) example files
lildude pushed a commit that referenced this pull request Jan 28, 2020
* add .4dm extensons

* no language for the moment

* change the source of syntax highlighting for Agda (#4768)

* Add interpreters 'csh' and 'tcsh' for language 'Tcsh' (#4760)

* Update languages.yml

* Create regtest_nmmnest.csh

Source: https://github.com/barlage/WRF-kill/blob/master/tools/regtest_nmmnest.csh

* Register `.bibtex` as a BibTeX file-extension (#4764)

* Register `.dof` as an INI file-extension (#4766)

* Register `.epsi` as a PostScript file-extension (#4763)

* Add common extensions to Motorola 68k Assembly (#4637)

* Add common extensions to Motorola 68k

* Revert ACE mode for m68k assembly

* Add heuristics for Motorola 68K Assembly

* Add SWIG language and `.i` Assembly extension

Co-authored-by: John Gardner <gardnerjohng@gmail.com>

* Add file extension for SnakeMake (#3953)

* Add file extension for SnakeMake

Previously a file name was defined for [SnakeMake[(snakemake-wrappers.readthedocs.io): #1834

Currently, the canonical extension is `smk` (see [this discussion](https://groups.google.com/forum/#!topic/Snakemake/segLE-RlV_s) with the author (@johanneskoester) of SnakeMake, and the [FAQ](http://snakemake.readthedocs.io/en/stable/project_info/faq.html#how-do-i-enable-syntax-highlighting-in-vim-for-snakefiles)).

* Adding two Snakemake (smk) example files

* add .4dm extensons

* no language for the moment

* add lang-4d tmLanguage

* link syntax highliting

* typo

Co-authored-by: Guillaume Brunerie <guillaume.brunerie+github@gmail.com>
Co-authored-by: friedc <52925889+friedc@users.noreply.github.com>
Co-authored-by: John Gardner <gardnerjohng@gmail.com>
Co-authored-by: Iggy Drougge <idrougge@mac.com>
Co-authored-by: Nils Homer <nh13@users.noreply.github.com>
@SilasK SilasK mentioned this pull request Feb 1, 2023
6 tasks
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