How should I reference a repository of data and resources created to accompany my publication? I'm writing a research paper and there's a large amount of code and data related to the study which may be of use to those who would read the study. They can confirm the correctness of the techniques, modify it for their own purposes, perform new analysis on the data, etc.

All these relevant files exist in a public repo, but I'm uncertain what's the best way to reference these. Would it be a citation? Just drop the URL directly into the paper? Other ideas?
Short Recommendation: Include the URL in-text followed by a full citation and end of text reference. If using someone else's repository, do the same, and probably also include a citation to the accompanying paper, unless the authors request otherwise. Place this citation in a prominent position in the method. If the open repository is a big part of the contribution of the paper, consider also including the URL in the abstract.
Longer Answer
Researchers in my field of psychology are starting to use the Open Science Framework as a repository for archiving data, code, and other materials. These repositories include a short URL that is meant to be stable (e.g., https://osf.io/5krfq/ ).
When referencing these repositories, I have read papers that just include the URL, and others that include a full citation. For example, the full citation for the above using APA style might be:

Wynton, S. K. A., &amp; Anglim, J. (2017). Abrupt Strategy
Change Underlies Gradual Performance Change: Bayesian Hierarchical
Models of Component and Aggregate Strategy Use. Retrieved from
https://osf.io/5krfq

So in summary, I don't think the standards for data and repository citation have been formalised sufficiently yet.
I think there are a few considerations:

If there are any questions about the stability of the repository URL, then you need to provide more information. For example, if the repository is hosted on a standard university website, then it is quite likely that the URL might change over time. Even in the case of something like the OSF, it might still be safer to include additional information. References work well because there is redundancy.
In general, providing a URL in the main text makes it easier for the reader to see that the repository is readily accessible.
In many performance evaluation systems, citations of papers are counted, whereas citations of other resources may not be. This may be changing, but it is worth thinking about.

Referencing existing repositories by other authors
If you are referencing an existing repository that other authors created, then you should look to see what requests these authors made. For example, they may want you to cite a particular paper that is linked to the repository. More generally, there is a arguably an ethical and professional obligation to acknowledge those providing the repository by using a full citation.
Referencing your own repository that accompanies a paper
If you are creating your own repository that is linked to the paper you are writing, I quite like the idea of including the  URL in text as well as the end of text reference. E.g.,

Data and code is available at https://osf.io/5krfq (Wynton &amp; Anglim, 2017).

And then you include the end of text reference as above.
This has the benefit of making the URL very clear to the reader (e.g., encourages the reader to click the link) but it also has the benefits of full citations (e.g., the reference is more robust, creates a practice of citing data and code as equal to citing papers).
Note about blind review: If you are submitting your manuscript to a place that does blind review, you need to do another step during the review process to prevent disclosure of author identities. One approach is to put a black mark over the author names in the in-text citation and end-of-text reference. OSF also has the benefit that you can create a custom-URL that provides a read-only view of the repository with author names removed. When such a feature is not provided by your repository service, you might need to instead attach anonymised versions of the materials and black out the link.
Where to put this citation/reference? There is another issue of where to put this reference. E.g., Abstract, author note, first sentence of the method, some other section of the method, etc. There are several considerations:

More people will see it if you put it in the abstract. The author note is another relatively prominent location. Thus, if you see the repository as fundamental to the contribution of your paper, then you may want to include the url in your abstract, and then include the full citation somewhere in the method.
Some journals have conventions regarding this. e.g., some journals have badges for open data or open materials, some journals ask for a section in the method with a label like &quot;Open Practices&quot;. If so, then it makes sense to follow these conventions.
If you want to draw some attention to your open data and materials (but putting the url in the abstract feels excessive), then I think the first sentence of the method possibly under a section heading like &quot;Open Practices&quot; is a good option. Thus, it will be clear to any reader that gets to the method that these materials are available.
If you think the repository is not that important, then it could be placed in whatever section seems most content relevant (e.g., end of the participants/data description section or somewhere in the section discussing the data analytic approach).

Personally, I like the idea of &quot;Open Practices&quot; (or something similar) becoming a  standardized section in manuscripts where the authors explain what materials have been made open or are made to justify why they are not open.
What name to give to repository reference: Another issue, which I have not yet resolved, is what is the best title for repositories that accompany a paper. Possible titles:

Identical title as accompanying paper
Related title to accompanying paper: e.g., &quot;Data and code for [insert paper title here]&quot; or &quot;Supplementary materials for [insert paper here]&quot;
Something very descriptive: e.g., &quot;Data and code examining ...&quot;

If you use the identical title as the accompanying paper, this creates the potential for ambiguity when people cite the paper or the repository. However, it might make it easier for people to find. And if getting citations to your original paper rather than the repository is particularly important, then it may be the case that citations to the repository will get counted towards the paper depending on how the citation engine (e.g., Google Scholar, Scopus, etc.) matches articles. Such repositories can also often host a pre-print of the article. In that sense the repository becomes almost a landing page for the actual publication that is not behind a publisher's paywall.
From a descriptive perspective, I think that something like &quot;Data and code for [insert title]&quot; seems better. It makes the link with the accompanying paper very clear, but also makes it clear that it is a distinct academic artefact.