Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean Up Build Environment #301

Merged
merged 61 commits into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
3051ba9
import good data from optimade module
shyamd Jun 10, 2020
a4805bc
parameterize test for more visibility
shyamd Jun 10, 2020
fe4ee68
update precommit
shyamd Jun 10, 2020
cd690eb
move openapi generation to invoke tasks
shyamd May 5, 2020
b76fac7
no need for package_root
shyamd May 5, 2020
cb3b27c
invoke task for JSON diff
shyamd May 5, 2020
1376041
update invoke task for openapi update
shyamd May 5, 2020
d88a336
replace with invoke in precommit
shyamd May 5, 2020
a703636
switch github action step to invoke
shyamd May 5, 2020
06df8c6
pre-commit everything
shyamd Jun 10, 2020
bb5f1ed
fix setup tests
shyamd Jun 10, 2020
25028e3
switch github workflow to new invoke task
shyamd Jun 10, 2020
fb4fa21
install invoke in openapi job
shyamd Jun 10, 2020
f994688
bad refactoring bug
shyamd Jun 10, 2020
b1a5ba6
move assert_version to tasks
shyamd Jun 10, 2020
f2d8e0c
move shield gen to tasks
shyamd Jun 10, 2020
1bf0e43
switch versioning to git_scm
shyamd Jun 10, 2020
44a7b73
remove unnecessary version settings
shyamd Jun 10, 2020
a5a7980
update task docstrings
shyamd Jun 10, 2020
9df1982
update publish workflow
shyamd Jun 10, 2020
cd9aac0
add test publishing and build dependencies into workflow
shyamd Jun 10, 2020
3f6e0ba
fix publish workflow
shyamd Jun 10, 2020
99bce68
fix shield
shyamd Jun 11, 2020
2fa748b
switch to dependabot for bumping requirements
shyamd Jun 11, 2020
0bbc2e9
add flake8 to precommit
shyamd Jun 11, 2020
44e0cf0
fix flake8 issues
shyamd Jun 11, 2020
23d14a9
fix workflows for new requirements locations
shyamd Jun 11, 2020
c32c119
try setup.py instead of pip
shyamd Jun 11, 2020
532a022
add testing reqs to deps job
shyamd Jun 11, 2020
34f25d2
break out more requirements
shyamd Jun 11, 2020
e72bc2a
keep forgetting to add in testing requirements
shyamd Jun 11, 2020
b29efc4
full fetch to get version info
shyamd Jun 11, 2020
db36a33
add dev to openapi test
shyamd Jun 11, 2020
9b03461
Add whole directory to Docker
shyamd Jun 11, 2020
f5524e5
switches back to traditional hardcoded version
shyamd Jun 11, 2020
9733706
Merge branch 'master' into clean-build-env
shyamd Jun 11, 2020
94b68a2
Merge branch 'master' into clean-build-env
CasperWA Jun 11, 2020
e5b5c4b
Update .pre-commit-config.yaml
shyamd Jun 11, 2020
3179ad9
remove setuptools_scm hacks
shyamd Jun 11, 2020
6f04e3a
set version before generating OpenAPI spec
shyamd Jun 11, 2020
39d3e52
Update tasks.py
shyamd Jun 11, 2020
8980632
update pre-commit versions
shyamd Jun 11, 2020
1690909
Add help info
shyamd Jun 11, 2020
72027e2
Merge branch 'clean-build-env' of github.com:shyamd/optimade-python-t…
shyamd Jun 11, 2020
233b499
fix invoke tasks
shyamd Jun 11, 2020
4249149
update requirements
shyamd Jun 11, 2020
4677852
run new shield only on updates to setup.py
shyamd Jun 11, 2020
701469d
revert Dockerfile
shyamd Jun 11, 2020
aecc5fc
Update optimade/__init__.py
shyamd Jun 11, 2020
ce09ae4
Run publish check only on main repo
shyamd Jun 11, 2020
d5c0e7a
remove unnecessary needs
shyamd Jun 11, 2020
29e7b65
Merge branch 'master' into clean-build-env
CasperWA Jun 11, 2020
3c503eb
Update .github/workflows/deps_lint.yml
shyamd Jun 11, 2020
7e2207e
Update .pre-commit-config.yaml
shyamd Jun 11, 2020
c254fbe
move config
shyamd Jun 11, 2020
969a893
remove upgrade
shyamd Jun 11, 2020
0446a51
Merge branch 'clean-build-env' of github.com:shyamd/optimade-python-t…
shyamd Jun 11, 2020
49c8db2
skip if not main repo
shyamd Jun 11, 2020
bef7ef6
Update tasks.py
shyamd Jun 11, 2020
e721e0c
check on push
shyamd Jun 11, 2020
b349e07
Merge branch 'clean-build-env' of github.com:shyamd/optimade-python-t…
shyamd Jun 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 0 additions & 25 deletions .ci/assert_version.py

This file was deleted.

3 changes: 0 additions & 3 deletions .ci/index_openapi_diff.sh

This file was deleted.

16 changes: 0 additions & 16 deletions .ci/json_diff.sh

This file was deleted.

3 changes: 0 additions & 3 deletions .ci/openapi_diff.sh

This file was deleted.

54 changes: 0 additions & 54 deletions .ci/optimade_version_update.py

This file was deleted.

14 changes: 14 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
shyamd marked this conversation as resolved.
Show resolved Hide resolved
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
target-branch: master
reviewers:
- CasperWA
- ml-evs
- shyamd
labels:
- dependency_updates
2 changes: 1 addition & 1 deletion .github/aiida/profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ db_port: 5432
db_name: PLACEHOLDER_DATABASE_NAME
db_username: postgres
db_password: test
repository: PLACEHOLDER_REPOSITORY
repository: PLACEHOLDER_REPOSITORY
76 changes: 0 additions & 76 deletions .github/workflows/deps_eager.yml

This file was deleted.

64 changes: 43 additions & 21 deletions .github/workflows/deps_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --statistics


pre-commit:
runs-on: ubuntu-latest

Expand All @@ -54,7 +53,6 @@ jobs:
run: |
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )


openapi:
runs-on: ubuntu-latest

Expand All @@ -69,26 +67,19 @@ jobs:
- name: Install tools
run: |
python -m pip install --upgrade pip
python -m pip install -U setuptools
python -m pip install -r .github/workflows/requirements.txt
python -m pip install -e .[testing]
pip install -U setuptools
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
docker pull quen2404/openapi-diff

- name: Validate OpenAPI specifications
run: |
openapi-spec-validator openapi/openapi.json
openapi-spec-validator openapi/index_openapi.json

- name: Update OpenAPI schemes
run: |
python -c "from optimade.server.main import app, update_schema; update_schema(app)"
python -c "from optimade.server.main_index import app, update_schema; update_schema(app)"

- name: Check if OpenAPI schemes match
run: |
.ci/openapi_diff.sh
.ci/index_openapi_diff.sh

- name: Check OpenAPI Schemas have not changed
run: invoke check-openapi-diff

docker-image:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -167,9 +158,9 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -U setuptools
# Install static dependencies followed by "normal" install
python -m pip install -r .github/workflows/requirements.txt
pip install -e .[testing]
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .

- name: Run all tests (using a real MongoDB)
run: pytest -rs --cov=./optimade/ --cov-report=xml
Expand All @@ -183,7 +174,7 @@ jobs:

- name: Install adapter conversion dependencies
run: |
pip install -e .[all]
pip install -r requirements-client.txt
# AiiDA-specific
reentry scan

Expand All @@ -203,7 +194,6 @@ jobs:
flags: unittests
yml: ./.codecov.yml


docs:
runs-on: ubuntu-latest

Expand All @@ -218,8 +208,40 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -e .[all]
pip install -r .github/workflows/requirements-docs.txt --upgrade
pip install -r requirements-docs.txt --upgrade
shyamd marked this conversation as resolved.
Show resolved Hide resolved


- name: Build
run: mkdocs build

publish:
shyamd marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools requests

- name: Install package
run: pip install -e .

- name: Build source distribution
run: python ./setup.py sdist

# This tests that publication to PyPI is possible
- name: Publish package to TestPyPI
if: github.repository == 'Materials-Consortia/optimade-python-tools'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/