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

Create template repositories for packages #8

Open
3 tasks
apulsipher opened this issue Sep 30, 2024 · 6 comments
Open
3 tasks

Create template repositories for packages #8

apulsipher opened this issue Sep 30, 2024 · 6 comments

Comments

@apulsipher
Copy link
Collaborator

apulsipher commented Sep 30, 2024

Templates to Create (see comments for language-specific details)

  • Template for R packages
  • Template for Python packages
  • Template for C++ packages

Things to Include in General (not exhaustive)

  • README.md
  • Code of Conduct
  • Best Practices (some general like Semantic Versioning, some language-specific like package naming conventions for that langauge)
  • .gitignore
  • Consistent file structures (e.g., docs/, build/, src/, etc.)
  • GitHub Actions for building a website and running tests
  • Github Action workflow (likely to trigger on creation of a new release, but maybe manually) to publish package to PyPI/CRAN/etc.
    • The trigger for manually running a workflow is on: workflow_dispatch

On using Existing Templates/Templating Tools

There exist many templates and templating tools. These can be used directly or taken as inspiration. If we want to use one directly, instead of forking it, create a new project under EpiForeSITE so contributions are tracked properly and so we aren't constantly asked to merge with the original repo. See Detaching a fork.

One tool of particular note is Cookiecutter, which is primarily used for Python projects but also supports C projects. It takes a fill-in-the-blank approach to project creation, asking the user to fill in information like "Project Title" and so on. We could create our own cookiecutter (see comments below for examples) to help the researcher/developer set up their template.

Insight Net Support

These templates will likely be useful beyond just EpiForeSITE. As such, it may be worthwhile to get input from other developers in the Insight Net.

@apulsipher apulsipher changed the title Create template repositories for R and Python packages Create template repositories for packages Sep 30, 2024
@apulsipher apulsipher assigned apulsipher and unassigned apulsipher Sep 30, 2024
@apulsipher
Copy link
Collaborator Author

R-Specific Details

Things to Include in the EpiForeSITE Template Repo

  • roxygen2 and instructions for running it
  • .Rbuildignore

Resources

Templating Packages

@apulsipher
Copy link
Collaborator Author

Python-Specific Details

Things to Include in the EpiForeSITE Template Repo

  • pyproject.toml
  • Poetry (including poetry files, structures, and details on running it)

Resources

  • PEP 8 Style Guide especially PEP 8 Naming Conventions.
    • Naming conventions for packages and modules are a nightmare in Python, but the most common for a package name on PyPI is all-lowercase with hyphens, while the most common for module names within a package are all-lowercase with underscores.

Templating Packages

  • python-package-template
    • This one includes key information that is often used in a Python project (good for inspiration)
  • cookiecutter-pypackage
    • This cookiecutter also links to other relevant cookiecutters that might be a better fit

@apulsipher
Copy link
Collaborator Author

apulsipher commented Oct 1, 2024

C++-Specific Details

Things to Include in the EpiForeSITE Template Repo

  • Makefile

Resources

Templating Packages

@apulsipher
Copy link
Collaborator Author

apulsipher commented Oct 1, 2024

@WillyRay @gvegayon Here's the issue for the template repo task. I've included comments with the results of my research and brainstorm on how to do this for each of R, Python, C++. They are definitely not exhaustive and I'm sure you will know more than I do about them, but they might be a good starting point. Especially the example templates. I don't know all of what we will want to include in our templates, but they give some good ideas of the kinds of files that are commonly used.

@gvegayon
Copy link
Collaborator

gvegayon commented Oct 1, 2024

This is awesome, @apulsipher! Did you join the Slack channel I invited you to? I will reach out to folks across Insight Net so they can chip in!

@apulsipher
Copy link
Collaborator Author

This is awesome, @apulsipher! Did you join the Slack channel I invited you to? I will reach out to folks across Insight Net so they can chip in!

Thanks for the reminder! I've now joined on Slack

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

No branches or pull requests

2 participants