https://github.com/castelao/nrel-pypackage-template
A template for NREL's Python packages
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.1%) to scientific vocabulary
Repository
A template for NREL's Python packages
Basic Info
- Host: GitHub
- Owner: castelao
- Language: Jinja
- Default Branch: main
- Size: 83 KB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 6
- Releases: 0
Metadata Files
README.md
Template for NREL's Python packages
This is an opinionated template for creating Python packages at NREL, intended for a wide range of users. If you are new to NREL or don't have much experience building Python packages, this template is a good option to provide you a scaffolding to get started quickly. It also sets up several support tools for you, such as automated checks on your code, automatic documentation generation, and tests validation on every pull request. If you're an experienced Python developer, you still have some control by answering a few questions during the initialization process, which helps avoid a plain copy and paste from your other projects. We use this template ourselves.
Quickstart
1) Install Copier
This template is based on Copier, a tool to
copy files and directories from a template repository to a destination
directory, while allowing you to answer questions to customize the
destination. You can install copier in several ways, depending on your
environment and preferences. Here are some common methods, please choose one
that suits you best:
Homebrew (OSX)
If you are on OSX and have Homebrew, you can install
copier globally with the following command:
bash
brew install copier
Pixi (contributors)
Install Pixi and:
Clone this repository and activate it's environment:
bash git clone https://github.com/castelao/NREL-pypackage-template.git cd NREL-pypackage-template pixi shellOr create your own environment:
bash pixi init my_project_creator pixi add copier pixi shell
We use pixi for development. If you would like to contribute to this repository or want to build your own template, we strongly recommend using Pixi.
uv
If you prefer using uv, you can install copier with the following command:
bash
uv tool install copier
Note: If you use poetry, you might want to consider moving to uv.
pipx
If you have pipx installed, you can install copier with the following command:
bash
pipx install copier
Nix flake
If you are using Nix flakes, you can install copier with the following command:
bash
nix profile install 'https://flakehub.com/f/copier-org/copier/*.tar.gz'
2) Build your package
bash
copier copy https://github.com/castelao/NREL-pypackage-template ../my_new_project
cd ../my_new_project
You should see several files and directories created from the information
that you gave. For instance, take a look at the pyproject.toml file.
Your package will probably depend on other libraries. Let's assume that
you'll use xarray, so you can run
bash
pixi add xarray
which will update the pyproject.toml and pixi.lock files with the new
dependency.
Owner
- Name: Guilherme Castelão
- Login: castelao
- Kind: user
- Location: CO
- Company: @NREL
- Website: www.castelao.net
- Repositories: 80
- Profile: https://github.com/castelao
multi-class: PhD in Physical Oceanography, offshore solo sailor, Rustacean and Pythonista.
GitHub Events
Total
- Issues event: 4
- Delete event: 13
- Issue comment event: 8
- Push event: 27
- Pull request review comment event: 21
- Pull request review event: 27
- Pull request event: 28
- Fork event: 1
- Create event: 15
Last Year
- Issues event: 4
- Delete event: 13
- Issue comment event: 8
- Push event: 27
- Pull request review comment event: 21
- Pull request review event: 27
- Pull request event: 28
- Fork event: 1
- Create event: 15
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 1
- Total pull requests: 7
- Average time to close issues: N/A
- Average time to close pull requests: 2 days
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 7
- Average time to close issues: N/A
- Average time to close pull requests: 2 days
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- castelao (2)
- ppinchuk (1)
- iuryt (1)
Pull Request Authors
- castelao (22)
- ppinchuk (2)