Skip to content

Commit

Permalink
Merge pull request #6 from EricaCMitchell/dipoles
Browse files Browse the repository at this point in the history
v0.2.0
  • Loading branch information
EricaCMitchell authored Aug 21, 2024
2 parents 8a4fe60 + 2846db8 commit b734cd6
Show file tree
Hide file tree
Showing 47 changed files with 6,095 additions and 3,531 deletions.
14 changes: 14 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Codecov configuration to make it a bit less noisy
coverage:
status:
patch: false
project:
default:
threshold: 50%
comment:
layout: "header"
require_changes: false
branches: null
behavior: default
flags: null
paths: null
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
quax/_version.py export-subst
42 changes: 42 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# How to contribute

We welcome contributions from external contributors, and this document
describes how to merge code changes into this Quax.

## Getting Started

* Make sure you have a [GitHub account](https://github.com/signup/free).
* [Fork](https://help.github.com/articles/fork-a-repo/) this repository on GitHub.
* On your local machine,
[clone](https://help.github.com/articles/cloning-a-repository/) your fork of
the repository.

## Making Changes

* Add some really awesome code to your local fork. It's usually a [good
idea](http://blog.jasonmeridth.com/posts/do-not-issue-pull-requests-from-your-master-branch/)
to make changes on a
[branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/)
with the branch name relating to the feature you are going to add.
* When you are ready for others to examine and comment on your new feature,
navigate to your fork of {{cookiecutter.repo_name}} on GitHub and open a [pull
request](https://help.github.com/articles/using-pull-requests/) (PR). Note that
after you launch a PR from one of your fork's branches, all
subsequent commits to that branch will be added to the open pull request
automatically. Each commit added to the PR will be validated for
mergability, compilation and test suite compliance; the results of these tests
will be visible on the PR page.
* If you're providing a new feature, you must add test cases and documentation.
* When the code is ready to go, make sure you run the test suite using pytest.
* When you're ready to be considered for merging, check the "Ready to go"
box on the PR page to let the Quax devs know that the changes are complete.
The code will not be merged until this box is checked, the continuous
integration returns checkmarks,
and multiple core developers give "Approved" reviews.

# Additional Resources

* [General GitHub documentation](https://help.github.com/)
* [PR best practices](http://codeinthehole.com/writing/pull-requests-and-other-good-practices-for-teams-using-github/)
* [A guide to contributing to software packages](http://www.contribution-guide.org)
* [Thinkful PR example](http://www.thinkful.com/learn/github-pull-request-tutorial/#Time-to-Submit-Your-First-PR)
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Description
Provide a brief description of the PR's purpose here.

## Todos
Notable points that this PR has either accomplished or will accomplish.
- [ ] TODO 1

## Questions
- [ ] Question1

## Status
- [ ] Ready to go
85 changes: 61 additions & 24 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,67 @@ on:
pull_request:
branches:
- master
schedule:
# Weekly tests run on main by default:
# Scheduled workflows run on the latest commit on the default or base branch.
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
- cron: "0 0 * * 0"
# Scheduled workflows are automatically disabled when no repository activity has occurred in 60 day.

jobs:
build-linux:
runs-on: ubuntu-latest
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
shell: bash -l {0}
run: |
conda install python=3.7
conda install -c psi4 psi4
conda install -c conda-forge jax
conda install -c conda-forge jaxlib
conda install -c conda-forge h5py
pip install -e .
- name: Test with pytest
run: |
conda install pytest
pytest
- uses: actions/checkout@v4

- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Create Environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-name: test
condarc: |
channels:
- conda-forge
create-args: >-
python=${{ matrix.python-version }}
- name: Build integrals
shell: bash -l {0}
run: |
cd $GITHUB_WORKSPACE/quax/integrals
make
cd $GITHUB_WORKSPACE
- name: Install package
# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install .
micromamba list
- name: Run tests
# conda setup requires this special shell
shell: bash -l {0}
run: |
pytest -v --cov=quax --cov-report=xml --color=yes tests/
- name: CodeCov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}

34 changes: 24 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
localtests/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -8,11 +6,6 @@ __pycache__/
# C extensions
*.so

# Psi4, HdF5, molecule file disk junk
*.dat
*.h5
*.xyz

# Distribution / packaging
.Python
env/
Expand All @@ -22,6 +15,7 @@ dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
Expand All @@ -30,7 +24,6 @@ wheels/
*.egg-info/
.installed.cfg
*.egg
benchmarks/

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -48,6 +41,7 @@ htmlcov/
.coverage
.coverage.*
.cache
.pytest_cache
nosetests.xml
coverage.xml
*.cover
Expand Down Expand Up @@ -101,11 +95,31 @@ ENV/
# Rope project settings
.ropeproject

# Pycharm settings
.idea
*.iml
*.iws
*.ipr

# Ignore devcontainer
/.devcontainer

# Ignore VSCode settings
/.vscode

# Ignore Sublime Text settings
*.sublime-workspace
*.sublime-project

# vim swap
*.swp

# mkdocs documentation
/site

# mypy
.mypy_cache/

#misc files
project_notes.txt
# profraw files from LLVM? Unclear exactly what triggers this
# There are reports this comes from LLVM profiling, but also Xcode 9.
*profraw
77 changes: 77 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age,
body size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual
identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

Moreover, project maintainers will strive to offer feedback and advice to
ensure quality and consistency of contributions to the code. Contributions
from outside the group of project maintainers are strongly welcomed but the
final decision as to whether commits are merged into the codebase rests with
the team of project maintainers.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an
appointed representative at an online or offline event. Representation of a
project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at '{{cookiecutter.author_email}}'. The project team will
review and investigate all complaints, and will respond in a way that it deems
appropriate to the circumstances. The project team is obligated to maintain
confidentiality with regard to the reporter of an incident. Further details of
specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
[http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include CODE_OF_CONDUCT.md
include MANIFEST.in
include LICENSE

graft quax
global-exclude *.py[cod] __pycache__ *.so
Loading

0 comments on commit b734cd6

Please sign in to comment.