Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rkingsbury committed Aug 7, 2023
2 parents a799b94 + 7c70c1a commit 9466d3d
Show file tree
Hide file tree
Showing 2,942 changed files with 1,301,510 additions and 424,395 deletions.
8 changes: 5 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
test_files/* linguist-vendored
# declare HTML, rST and test files as vendored/docs to exclude them when calculating repo languages on GitHub
tests/files/**/* linguist-vendored
cmd_line/* linguist-vendored
docs/* linguist-documentation
docs_rst/* linguist-documentation
docs/**/* linguist-generated
docs_rst/**/* linguist-documentation
dev_scripts/**/* linguist-vendored
39 changes: 21 additions & 18 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.
#### Description

A clear and concise bug description.

#### Repro

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
1. Click on '....'
1. Scroll down to '....'
1. See error

Provide any example files that are needed to reproduce the error, especially if the bug pertains to parsing a file. If the file format is not supported by GitHub, zip it into an archive and upload that.

#### Expected behavior

What do you expect to happen?

Provide any example files that are needed to reproduce the error,
especially if the bug pertains to parsing of a file.
#### Environment

**Expected behavior**
A clear and concise description of what you expected to happen.
Relevant versions and platform info:

**Screenshots**
If applicable, add screenshots to help explain your problem.
- OS: (e.g. Mac, Windows, Linux)
- Version (e.g. v2023.05.10)

**Desktop (please complete the following information):**
- OS: [e.g. Mac,Windows,Linux]
- Version [e.g. 2019.9.16]
#### Additional context

**Additional context**
Add any other context about the problem here.
More context like related issues/PRs.
25 changes: 14 additions & 11 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project

name: Feature Request
about: Propose a new idea for this project
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
#### Problem

Briefly describe the problem you're experiencing.

#### Proposed Solution

Detail the feature or solution you'd like to see implemented.

#### Alternatives

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
List any alternative solutions or features you've considered.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
#### Additional Info

**Additional context**
Add any other context or screenshots about the feature request here.
Provide any further context or relevant screenshots.
54 changes: 17 additions & 37 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,27 @@
## Summary

Include a summary of major changes in bullet points:
Major changes:

* Feature 1
* Feature 2
* Fix 1
* Fix 2
- feature 1: ...
- fix 1: ...

## Additional dependencies introduced (if any)
## Todos

* List all new dependencies needed and justify why. While adding dependencies that bring
significantly useful functionality is perfectly fine, adding ones that
add trivial functionality, e.g., to use one single easily implementable
function, is frowned upon. Provide a justification why that dependency is needed.
Especially frowned upon are circular dependencies, e.g., depending on derivative
modules of pymatgen such as custodian or Fireworks.
If this is work in progress, what else needs to be done?

## TODO (if any)
- feature 2: ...
- fix 2:

If this is a work-in-progress, write something about what else needs
to be done
## Checklist

* Feature 1 supports A, but not B.
- [ ] Google format doc strings added. Check with `ruff`.
- [ ] Type annotations included. Check with `mypy`.
- [ ] Tests added for new features/fixes.
- [ ] If applicable, new classes/functions/modules have [`duecredit`](https://github.com/duecredit/duecredit) `@due.dcite` decorators to reference relevant papers by DOI ([example](https://github.com/materialsproject/pymatgen/blob/91dbe6ee9ed01d781a9388bf147648e20c6d58e0/pymatgen/core/lattice.py#L1168-L1172))

## Checklist
Tip: Install `pre-commit` hooks to auto-check types and linting before every commit:

Work-in-progress pull requests are encouraged, but please put [WIP]
in the pull request title.

Before a pull request can be merged, the following items must be checked:

- [ ] Code is in the [standard Python style](https://www.python.org/dev/peps/pep-0008/). The easiest way to handle this
is to run the following in the **correct sequence** on your local machine. Start with running
[black](https://black.readthedocs.io/en/stable/index.html) on your new code. This will automatically reformat
your code to PEP8 conventions and removes most issues. Then run
[pycodestyle](https://pycodestyle.readthedocs.io/en/latest/), followed by
[flake8](http://flake8.pycqa.org/en/latest/).
- [ ] Docstrings have been added in the [Google docstring format](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html).
Run [pydocstyle](http://www.pydocstyle.org/en/2.1.1/index.html) on your code.
- [ ] Type annotations are **highly** encouraged. Run [mypy](http://mypy-lang.org/) to type check your code.
- [ ] Tests have been added for any new functionality or bug fixes.
- [ ] All linting and tests pass.

Note that the CI system will run all the above checks. But it will be much more efficient if you already fix most
errors prior to submitting the PR. It is highly recommended that you use the pre-commit hook provided in the pymatgen
repository. Simply `cp pre-commit .git/hooks` and a check will be run prior to allowing commits.
```sh
pip install -U pre-commit
pre-commit install
```
17 changes: 11 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
# version: 2
# updates:
# - package-ecosystem: github-actions
# directory: /
# schedule:
# interval: monthly

# - package-ecosystem: pip
# directory: /
# schedule:
# interval: monthly
48 changes: 22 additions & 26 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,45 @@
name: Linting

on: [push, pull_request]
on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
build:
lint:
# prevent this action from running on forks
if: github.repository == 'materialsproject/pymatgen'
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: "3.11"
cache: pip
cache-dependency-path: requirements-dev.txt
cache-dependency-path: setup.py

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt --quiet
- name: mypy
run: |
mypy --version
rm -rf .mypy_cache
mypy pymatgen
- name: pydocstyle
run: |
pydocstyle --count pymatgen
- name: pylint
pip install -e '.[dev]'
- name: ruff
run: |
pylint pymatgen
ruff --version
ruff . --ignore D
- name: black
run: |
black --version
black --check --diff --color pymatgen
- name: flake8
- name: mypy
run: |
flake8 --version
flake8 --count --show-source --statistics pymatgen
# exit-zero treats all errors as warnings.
flake8 --count --exit-zero --max-complexity=20 --statistics pymatgen
mypy --version
rm -rf .mypy_cache
mypy pymatgen
88 changes: 0 additions & 88 deletions .github/workflows/release.yml

This file was deleted.

Loading

0 comments on commit 9466d3d

Please sign in to comment.