Skip to content

Commit fddb2a4

Browse files
authored
Merge pull request #11 from molssi-seamm/conda-forge
Internal changes for conda forge
2 parents ef116a5 + 58601cc commit fddb2a4

24 files changed

+1158
-1146
lines changed

.github/workflows/BranchCI.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# GitHub Actions for CI on a branch.
2+
# This runs on only Linux, running lint checkers, testing and code coverage.
3+
4+
name: BranchCI
5+
6+
on:
7+
push:
8+
branches-ignore:
9+
- 'main'
10+
11+
jobs:
12+
light-ci:
13+
name: Lint ubuntu-latest Py3.8
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: Additional info about the build
18+
shell: bash
19+
run: |
20+
uname -a
21+
df -h
22+
ulimit -a
23+
# More info on options: https://github.com/conda-incubator/setup-miniconda
24+
- uses: conda-incubator/setup-miniconda@v2
25+
with:
26+
python-version: 3.8
27+
environment-file: devtools/conda-envs/test_env.yaml
28+
activate-environment: test
29+
auto-update-conda: false
30+
auto-activate-base: false
31+
show-channel-urls: true
32+
- name: Install package
33+
# conda setup requires this special shell
34+
shell: bash -l {0}
35+
run: |
36+
python -m pip install . --no-deps
37+
conda list
38+
- name: Run linters
39+
shell: bash -l {0}
40+
run: |
41+
black --check --diff seamm_widgets tests
42+
flake8 seamm_widgets tests
43+
- name: Run tests
44+
shell: bash -l {0}
45+
run: |
46+
pytest -v --cov=seamm_widgets --cov-report=xml --color=yes tests/
47+
- name: CodeCov
48+
uses: codecov/codecov-action@v1
49+
with:
50+
file: ./coverage.xml
51+
flags: unittests
52+
name: codecov-ubuntu-latest-py3.8

.github/workflows/CI.yaml

Lines changed: 9 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,54 @@
1+
# GitHub Actions for CI on the main branch and pull-requests.
2+
# This runs lint checkers on Linux, testing and code coverage on all platforms,
3+
# It also runs as scheduled on Sunday mornings just in case.
4+
15
name: CI
26

37
on:
4-
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming
5-
# Existing codes likely still have "master" as the primary branch
6-
# Both are tracked here to keep legacy and new codes working
78
push:
89
branches:
9-
- "master"
1010
- "main"
1111
pull_request:
1212
branches:
13-
- "master"
14-
- "main"
15-
release:
16-
types: [published]
17-
branches:
18-
- "master"
1913
- "main"
2014
schedule:
21-
# Run on master by default Sunday morning at 3:30:
15+
# Run by default Sunday morning at 3:30:
2216
# Scheduled workflows run on the latest commit on the default or base branch.
2317
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
2418
- cron: "30 3 * * 0"
2519

2620
jobs:
2721
lint:
28-
name: Lint ${{ matrix.os }} Py${{ matrix.python-version }}
29-
runs-on: ${{ matrix.os }}
30-
strategy:
31-
matrix:
32-
os: [ubuntu-latest]
33-
python-version: [3.8]
34-
22+
name: Lint ubuntu-latest Py3.8
23+
runs-on: ubuntu-latest
3524
steps:
3625
- uses: actions/checkout@v1
37-
3826
- name: Additional info about the build
3927
shell: bash
4028
run: |
4129
uname -a
4230
df -h
4331
ulimit -a
44-
4532
# More info on options: https://github.com/conda-incubator/setup-miniconda
4633
- uses: conda-incubator/setup-miniconda@v2
4734
with:
48-
python-version: ${{ matrix.python-version }}
35+
python-version: 3.8
4936
environment-file: devtools/conda-envs/test_env.yaml
50-
51-
# channels: conda-forge,defaults
52-
5337
activate-environment: test
5438
auto-update-conda: false
5539
auto-activate-base: false
5640
show-channel-urls: true
57-
5841
- name: Install package
59-
6042
# conda setup requires this special shell
6143
shell: bash -l {0}
6244
run: |
6345
python -m pip install . --no-deps
6446
conda list
65-
6647
- name: Run linters
67-
68-
# conda setup requires this special shell
6948
shell: bash -l {0}
70-
7149
run: |
50+
black --check --diff seamm_widgets tests
7251
flake8 seamm_widgets tests
73-
yapf --diff --recursive seamm_widgets tests
7452
7553
test:
7654
name: Test ${{ matrix.os }} Py${{ matrix.python-version }}
@@ -80,19 +58,14 @@ jobs:
8058
matrix:
8159
os: [macOS-latest, ubuntu-latest, windows-latest]
8260
python-version: [3.7, 3.8]
83-
8461
steps:
8562
- uses: actions/checkout@v1
86-
8763
- name: Additional info about the build
8864
shell: bash
8965
run: |
9066
uname -a
9167
df -h
9268
ulimit -a
93-
94-
95-
# More info on options: https://github.com/conda-incubator/setup-miniconda
9669
- uses: conda-incubator/setup-miniconda@v2
9770
with:
9871
python-version: ${{ matrix.python-version }}
@@ -101,21 +74,13 @@ jobs:
10174
auto-update-conda: false
10275
auto-activate-base: false
10376
show-channel-urls: true
104-
10577
- name: Install package
106-
107-
# conda setup requires this special shell
10878
shell: bash -l {0}
10979
run: |
11080
python -m pip install . --no-deps
11181
conda list
112-
113-
11482
- name: Run tests
115-
116-
# conda setup requires this special shell
11783
shell: bash -l {0}
118-
11984
run: |
12085
pytest -v --cov=seamm_widgets --cov-report=xml --color=yes tests/
12186
@@ -125,51 +90,3 @@ jobs:
12590
file: ./coverage.xml
12691
flags: unittests
12792
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
128-
129-
deploy:
130-
name: PyPi ${{ matrix.os }} Py${{ matrix.python-version }}
131-
# Run only for tagged releases.
132-
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
133-
runs-on: ${{ matrix.os }}
134-
needs: [lint, test]
135-
strategy:
136-
matrix:
137-
os: [ubuntu-latest]
138-
python-version: [3.8]
139-
140-
steps:
141-
- uses: actions/checkout@v1
142-
143-
- name: Set up Python ${{ matrix.python-version }}
144-
uses: actions/setup-python@v1
145-
with:
146-
python-version: ${{ matrix.python-version }}
147-
148-
- name: Install package
149-
150-
# conda setup requires this special shell
151-
shell: bash -l {0}
152-
run: |
153-
python -m pip install . --no-deps
154-
conda list
155-
156-
- name: Install pypa/build
157-
run: |
158-
python -m pip install build --user
159-
160-
- name: Build a binary wheel and a source tarball
161-
run: |
162-
python -m build --sdist --wheel --outdir dist/
163-
ls -l dist/
164-
165-
- name: Publish distribution 📦 to Test PyPI
166-
uses: pypa/gh-action-pypi-publish@master
167-
with:
168-
password: ${{ secrets.test_pypi_password }}
169-
repository_url: https://test.pypi.org/legacy/
170-
skip_existing: true
171-
172-
- name: Publish distribution 📦 to PyPI
173-
uses: pypa/gh-action-pypi-publish@master
174-
with:
175-
password: ${{ secrets.pypi_password }}

.github/workflows/Docs.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# GitHub Actions for creating the documentation.
2+
# Thus runs on Linux only.
3+
14
name: Documentation
25

36
on: push
@@ -37,4 +40,4 @@ jobs:
3740
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3841
shell: bash -l {0}
3942
run: |
40-
docs/buildDocs.sh
43+
devtools/scripts/buildDocs.sh

.github/workflows/Release.yaml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# GitHub Actions for CI on the main branch when a release is published.
2+
# This runs lint checkers on Linux, testing and code coverage on all platforms,
3+
# and then deploys to PyPi, running on Linux.
4+
5+
name: Release
6+
7+
on:
8+
release:
9+
types: [published]
10+
branches:
11+
- "main"
12+
13+
jobs:
14+
lint:
15+
name: Lint ubuntu-latest Py3.8
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Additional info about the build
20+
shell: bash
21+
run: |
22+
uname -a
23+
df -h
24+
ulimit -a
25+
# More info on options: https://github.com/conda-incubator/setup-miniconda
26+
- uses: conda-incubator/setup-miniconda@v2
27+
with:
28+
python-version: 3.8
29+
environment-file: devtools/conda-envs/release.yaml
30+
activate-environment: release
31+
auto-update-conda: false
32+
auto-activate-base: false
33+
show-channel-urls: true
34+
- name: Install package
35+
# conda setup requires this special shell
36+
shell: bash -l {0}
37+
run: |
38+
python -m pip install . --no-deps
39+
conda list
40+
- name: Run linters
41+
shell: bash -l {0}
42+
run: |
43+
black --check --diff seamm_widgets tests
44+
flake8 seamm_widgets tests
45+
46+
test:
47+
name: Test ${{ matrix.os }} Py${{ matrix.python-version }}
48+
runs-on: ${{ matrix.os }}
49+
needs: lint
50+
strategy:
51+
matrix:
52+
os: [macOS-latest, ubuntu-latest, windows-latest]
53+
python-version: [3.7, 3.8]
54+
steps:
55+
- uses: actions/checkout@v1
56+
- name: Additional info about the build
57+
shell: bash
58+
run: |
59+
uname -a
60+
df -h
61+
ulimit -a
62+
- uses: conda-incubator/setup-miniconda@v2
63+
with:
64+
python-version: ${{ matrix.python-version }}
65+
environment-file: devtools/conda-envs/release.yaml
66+
activate-environment: release
67+
auto-update-conda: false
68+
auto-activate-base: false
69+
show-channel-urls: true
70+
- name: Install package
71+
shell: bash -l {0}
72+
run: |
73+
python -m pip install . --no-deps
74+
conda list
75+
- name: Run tests
76+
shell: bash -l {0}
77+
run: |
78+
pytest -v --cov=seamm_widgets --cov-report=xml --color=yes tests/
79+
- name: CodeCov
80+
uses: codecov/codecov-action@v1
81+
with:
82+
file: ./coverage.xml
83+
flags: unittests
84+
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
85+
86+
deploy:
87+
name: PyPi ubuntu-latest Py3.8
88+
# Run only for tagged releases publishing development or release candidates
89+
# only to test.pypi, otherwise to both it and the main pypi.
90+
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
91+
runs-on: ubuntu-latest
92+
needs: [lint, test]
93+
steps:
94+
- uses: actions/checkout@v1
95+
- name: Set up Python 3.8
96+
uses: actions/setup-python@v1
97+
with:
98+
python-version: 3.8
99+
- name: Install package
100+
shell: bash -l {0}
101+
run: |
102+
python -m pip install . --no-deps
103+
conda list
104+
- name: Install pypa/build
105+
run: |
106+
python -m pip install build --user
107+
- name: Build a binary wheel and a source tarball
108+
run: |
109+
python -m build --sdist --wheel --outdir dist/
110+
ls -l dist/
111+
- name: Publish distribution 📦 to Test PyPI
112+
uses: pypa/gh-action-pypi-publish@master
113+
with:
114+
password: ${{ secrets.test_pypi_password }}
115+
repository_url: https://test.pypi.org/legacy/
116+
skip_existing: true
117+
- name: Publish distribution 📦 to PyPI
118+
if: contains(github.ref, 'dev') == false && contains(github.ref, 'rc') == false
119+
uses: pypa/gh-action-pypi-publish@master
120+
with:
121+
password: ${{ secrets.pypi_password }}

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ include CONTRIBUTING.rst
33
include HISTORY.rst
44
include LICENSE
55
include README.rst
6+
include requirements*
7+
include versioneer.py
68

79
recursive-include tests *
810
recursive-exclude * __pycache__

0 commit comments

Comments
 (0)