Skip to content

Commit

Permalink
Add docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shyue Ping Ong committed Aug 2, 2023
1 parent 23e297e commit f20e0c8
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 21 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ jobs:
- name: pytest
run: |
pytest --cov=package tests --color=yes
# - name: Coveralls
# uses: coverallsapp/github-action@v2
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

build:
needs: test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ setuptools*
.*_cache
# VS Code
.vscode/*
_site

# Environments
.env
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[![GitHub license](https://img.shields.io/github/license/materialsvirtuallab/python_template)](https://github.com/materialsvirtuallab/python_template/blob/main/LICENSE)
[![Linting](https://github.com/materialsvirtuallab/python_template/workflows/Linting/badge.svg)](https://github.com/materialsvirtuallab/python_template/workflows/Linting/badge.svg)
[![Testing](https://github.com/materialsvirtuallab/python_template/workflows/Testing/badge.svg)](https://github.com/materialsvirtuallab/python_template/workflows/Testing/badge.svg)
<!--
[![Downloads](https://pepy.tech/badge/python_template)](https://pepy.tech/project/python_template)
[![codecov](https://codecov.io/gh/materialsvirtuallab/python_template/branch/main/graph/badge.svg?token=3V3O79GODQ)]
(https://codecov.io/gh/materialsvirtuallab/python_template)
-->

# Introduction

This is a template for setting up Python packages in the Materials Virtual Lab. It comes with the standard Github
workflows, pyproject and linting.
This is a template for setting up Python packages in the Materials Virtual Lab. It comes with the standard Github
workflows, pyproject and linting.
35 changes: 35 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 4.3.2"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.12"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

gem "webrick", "~> 1.8"
21 changes: 21 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
title: MVL template
email: ongsp@ucsd.edu
description: >- # this means to ignore newlines until "baseurl:"
This is the template for MAVRL repos.
# twitter_username: jekyllrb
github_username: materialsvirtuallab

# Build settings
remote_theme: just-the-docs/just-the-docs
plugins:
- jekyll-feed

# favicon_ico: "/assets/favicon.ico"

nav_external_links:
- title: "GitHub"
url: "https://github.com/materialsvirtuallab/python_template"

aux_links:
"Materials Virtual Lab":
- "https://materialsvirtuallab.org"
1 change: 1 addition & 0 deletions docs/_includes/footer_custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<small>&copy; Copyright 2022, Materials Virtual Lab</small>
1 change: 1 addition & 0 deletions docs/_includes/nav_footer_custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<span class="site-footer">&copy; Copyright 2022, Materials Virtual Lab</span>
13 changes: 13 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[![GitHub license](https://img.shields.io/github/license/materialsvirtuallab/python_template)](https://github.com/materialsvirtuallab/python_template/blob/main/LICENSE)
[![Linting](https://github.com/materialsvirtuallab/python_template/workflows/Linting/badge.svg)](https://github.com/materialsvirtuallab/python_template/workflows/Linting/badge.svg)
[![Testing](https://github.com/materialsvirtuallab/python_template/workflows/Testing/badge.svg)](https://github.com/materialsvirtuallab/python_template/workflows/Testing/badge.svg)
<!--
[![Downloads](https://pepy.tech/badge/python_template)](https://pepy.tech/project/python_template)
[![codecov](https://codecov.io/gh/materialsvirtuallab/python_template/branch/main/graph/badge.svg?token=3V3O79GODQ)]
(https://codecov.io/gh/materialsvirtuallab/python_template)
-->

# Introduction

This is a template for setting up Python packages in the Materials Virtual Lab. It comes with the standard Github
workflows, pyproject.toml, docs, and linting.
36 changes: 19 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,6 @@ isort.split-on-trailing-comma = false
[tool.pytest.ini_options]
addopts = "--durations=30 --quiet -r xXs --color=yes -p no:warnings --import-mode=importlib"

[tool.coverage.run]
omit = ["pymatgen/cli"]
relative_files = true

[tool.coverage.report]
exclude_lines = [
"@deprecated",
"def __repr__",
"if 0:",
"if __name__ == .__main__.:",
"if self.debug:",
"if settings.DEBUG",
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
]

[tool.mypy]
ignore_missing_imports = true
namespace_packages = true
Expand All @@ -109,3 +92,22 @@ titel,alls,ans,nd,mater,nwo,te,hart,ontop,ist,ot,fo,nax,coo,coul,ser,leary,thre,
fase,rute,reson,titels,ges,scalr,strat,struc,hda,nin,ons,pres,kno,loos,lamda,lew
"""
check-filenames = true

[tool.coverage.run]
relative_files = true

[tool.coverage.report]
exclude_lines = [
"@deprecated",
"def __repr__",
"if 0:",
"if __name__ == .__main__.:",
"if self.debug:",
"if settings.DEBUG",
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"input",
"if TYPE_CHECKING:",
"except PackageNotFoundError:"
]

0 comments on commit f20e0c8

Please sign in to comment.