https://github.com/centrefornetzero/python-template
Centre for Net Zero's template for Python projects.
Science Score: 13.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
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.5%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Centre for Net Zero's template for Python projects.
Basic Info
Statistics
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 1
- Releases: 0
Created almost 5 years ago
· Last pushed about 1 year ago
Metadata Files
Readme
License
README.md
python-template
Centre for Net Zero's template for Python projects.
Tools:
- Pipenv for dependency management
- Pytest for testing
- Mypy for type checking
- Flake8 for linting
- isort and black for formatting
There are two Github Actions workflows:
test_and_lint.yamlruns checks on a Ubuntu Github-hosted runner.container.yamlruns the same checks but inside a Docker container and pushes images to Google Cloud Platform Artifact Registry.
Secrets configuration
If you want to use the Docker workflow, you need to set the following secrets:
GCP_ARTIFACT_REGISTRY, e.g.LOCATION-docker.pkg.dev/PROJECT-IDGCP_ARTIFACT_REGISTRY_SA_KEY, the key for a service account with the roles to push and pull images.
Python Setup
You need to set up your Python environment first.
- Clone this repo.
- Run
make setupin your terminal.
In step 2 this will:
- Run
pipenv sync --devto install dependencies. cp .env.template .envto create your local.envfile - make sure you fill in any blanks.- Install your local pre-commit environment which will be used to maintain code standards
- Check the tests work by running
pipenv run pytest
Owner
- Name: Centre for Net Zero
- Login: centrefornetzero
- Kind: organization
- Website: https://www.centrefornetzero.org/
- Repositories: 4
- Profile: https://github.com/centrefornetzero
GitHub Events
Total
- Watch event: 1
- Delete event: 2
- Push event: 2
- Create event: 3
Last Year
- Watch event: 1
- Delete event: 2
- Push event: 2
- Create event: 3
Dependencies
Pipfile
pypi
- black * develop
- flake8 * develop
- isort * develop
- mypy * develop
- pre-commit * develop
- pytest * develop
Pipfile.lock
pypi
- attrs ==21.4.0 develop
- black ==22.3.0 develop
- click ==8.1.3 develop
- flake8 ==4.0.1 develop
- iniconfig ==1.1.1 develop
- isort ==5.10.1 develop
- mccabe ==0.6.1 develop
- mypy ==0.961 develop
- mypy-extensions ==0.4.3 develop
- packaging ==21.3 develop
- pathspec ==0.9.0 develop
- platformdirs ==2.5.2 develop
- pluggy ==1.0.0 develop
- py ==1.11.0 develop
- pycodestyle ==2.8.0 develop
- pyflakes ==2.4.0 develop
- pyparsing ==3.0.9 develop
- pytest ==7.1.2 develop
- tomli ==2.0.1 develop
- typing-extensions ==4.2.0 develop
- cfgv ==3.3.1
- distlib ==0.3.4
- filelock ==3.7.1
- identify ==2.5.1
- nodeenv ==1.6.0
- platformdirs ==2.5.2
- pre-commit ==2.19.0
- pyyaml ==6.0
- six ==1.16.0
- toml ==0.10.2
- virtualenv ==20.14.1
.github/workflows/container.yaml
actions
- actions/checkout v2 composite
- google-github-actions/setup-gcloud v0.2.0 composite
.github/workflows/test_and_lint.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
Dockerfile
docker
- dependencies latest build
- python 3.9.6-slim-buster build