forked from uibcdf/OPocket
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding first version of .github directory
Workflows and templeates were added.
- Loading branch information
Showing
5 changed files
with
235 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 projectname. | ||
|
||
## 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 projectname 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 projectname 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: CI | ||
|
||
on: | ||
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming | ||
# Existing codes likely still have "master" as the primary branch | ||
# Both are tracked here to keep legacy and new codes working | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
branches: | ||
- "main" | ||
schedule: | ||
# Nightly tests run on master 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 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macOS-latest, ubuntu-latest] # [macOS-latest, ubuntu-latest, windows-latest] | ||
python-version: [3.7] # [3.7, 3.8, 3.9] | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Additional info about the build | ||
shell: bash | ||
run: | | ||
uname -a | ||
- name: Symlink gfortran (macOS) | ||
if: runner.os == 'macOS' | ||
run: | | ||
sudo ln -s /usr/local/bin/gfortran-10 /usr/local/bin/gfortran | ||
sudo mkdir /usr/local/gfortran | ||
sudo ln -s /usr/local/Cellar/gcc@10/*/lib/gcc/10 /usr/local/gfortran/lib | ||
gfortran --version | ||
- name: Checking gfortran version | ||
run: | | ||
gfortran --version | ||
# More info on options: https://github.com/conda-incubator/setup-miniconda | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
environment-file: devtools/conda-envs/test_env.yaml | ||
|
||
#channels: conda-forge,defaults | ||
|
||
activate-environment: test | ||
auto-update-conda: false | ||
auto-activate-base: false | ||
show-channel-urls: true | ||
|
||
|
||
- name: Install package | ||
|
||
shell: bash -l {0} | ||
run: | | ||
python setup.py develop | ||
conda list | ||
- name: Checking version | ||
|
||
shell: bash -l {0} | ||
run: | | ||
echo 'import molsysmt ; print(molsysmt.__version__)' | python | ||
- name: Run tests | ||
|
||
shell: bash -l {0} | ||
run: | | ||
pytest -v --cov=molsysmt --cov-report=xml --color=yes molsysmt/tests/ | ||
- name: CodeCov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.xml | ||
flags: unittests | ||
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Build and upload conda packages | ||
|
||
on: | ||
release: | ||
types: ['released', 'prereleased'] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
conda_deployment_with_new_tag: | ||
name: Conda deployment of package to platform ${{ matrix.platform }} with Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Conda environment creation and activation | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
environment-file: devtools/conda-envs/build_env.yaml | ||
auto-activate-base: false | ||
auto-update-conda: false | ||
show-channel-urls: true | ||
- name: Build and upload the conda packages | ||
uses: uibcdf/[email protected] | ||
with: | ||
meta_yaml_dir: devtools/conda-build | ||
python-version: ${{ matrix.python-version }} | ||
platform_linux-64: true | ||
platform_osx-64: true | ||
platform_win-64: true | ||
user: uibcdf | ||
label: auto | ||
token: ${{ secrets.ANACONDA_UIBCDF_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Sphinx docs to gh-pages | ||
|
||
on: | ||
release: | ||
types: ['released'] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
sphinx_docs_to_gh-pages: | ||
runs-on: ubuntu-latest | ||
name: Sphinx docs to gh-pages | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Additional info about the build | ||
shell: bash | ||
run: | | ||
uname -a | ||
- name: Make conda environment | ||
uses: conda-incubator/setup-miniconda@v2 # https://github.com/conda-incubator/setup-miniconda | ||
with: | ||
python-version: 3.7 | ||
environment-file: devtools/conda-envs/docs_env.yaml | ||
auto-update-conda: false | ||
auto-activate-base: false | ||
show-channel-urls: true | ||
activate-environment: test | ||
|
||
- name: Checking gfortran version | ||
run: | | ||
gfortran --version | ||
- name: Install package | ||
# conda setup requires this special shell | ||
shell: bash -l {0} | ||
run: | | ||
python setup.py develop | ||
conda list | ||
- name: Checking version | ||
shell: bash -l {0} | ||
run: | | ||
echo 'import openpocket; print(openpocket.__version__)' | python | ||
- name: Running the Sphinx to gh-pages Action | ||
uses: uibcdf/[email protected] | ||
|