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

Merge optics into main #2

Merged
merged 38 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8f1742e
add upgrade-dependencies action
tschaume Nov 9, 2022
a0f754a
delete old requirements files
tschaume Oct 27, 2022
3f742f3
setup.py: explicitly list dependencies
tschaume Oct 27, 2022
61c5f3e
add requirements files (pip-compile)
tschaume Oct 27, 2022
5d9c661
include dev dependencies
tschaume Oct 27, 2022
26b0e37
update github actions
tschaume Oct 27, 2022
10b3d9a
move jsonschema to mpds extra
tschaume Oct 28, 2022
b770dac
update all test actions
tschaume Nov 8, 2022
7f6a1c1
cache-dependency-path
tschaume Nov 9, 2022
fc5d9b8
dependabot not needed anymore
tschaume Nov 9, 2022
bf1d37c
cache-dependency-path 2
tschaume Nov 9, 2022
ff38fea
Automated dependency upgrades (#884)
tschaume Nov 9, 2022
ca7fa1e
no-deps
tschaume Nov 9, 2022
e59bb20
echo tests
tschaume Nov 9, 2022
cb8634d
add docs and release to github actions
tschaume Nov 10, 2022
08f1dae
fix action typo
tschaume Nov 10, 2022
c762580
only run tests on changes in matminer subdir
tschaume Nov 10, 2022
34c569e
skip tests for now
tschaume Nov 10, 2022
78ce6d6
merge docs build into release
tschaume Nov 10, 2022
a0ae13d
also pull tags for scm version
tschaume Nov 10, 2022
f4f450a
work on release through github actions (#885)
tschaume Nov 10, 2022
aabebc3
add sphinx dep
tschaume Nov 10, 2022
0d65adc
Automated dependency upgrades (#886)
tschaume Nov 10, 2022
d129826
add description (#887)
tschaume Nov 10, 2022
0c53b60
set git user
tschaume Nov 10, 2022
d639200
release workflow_dispatch
tschaume Nov 10, 2022
1fdd698
update docs
Nov 10, 2022
48e652d
minor description change (#888)
tschaume Nov 10, 2022
5ef7d3c
try explicitly checking out main
tschaume Nov 10, 2022
c67904f
yet another description change (#889)
tschaume Nov 10, 2022
2ef3a56
update docs
Nov 11, 2022
6a34b63
rm publishPackage workflow_dispatch
tschaume Nov 11, 2022
97a0bc6
trying again ... (#890)
tschaume Nov 11, 2022
4f1f778
update docs
Nov 11, 2022
2d0169f
rm tasks.py (now in actions)
tschaume Nov 11, 2022
1141c53
reenable tests
tschaume Nov 11, 2022
1cc01f1
Added script to create optical database from the refractiveinfo repo
gbrunin Nov 18, 2022
2ac092f
Rm requirements
gbrunin Nov 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions .github/dependabot.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/full_test.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/lint.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: release

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: '**/setup.py'

- name: Install dependencies
run: |
python${{ matrix.python-version }} -m pip install --upgrade pip pip-tools build setuptools setuptools_scm wheel
python${{ matrix.python-version }} -m piptools sync --user requirements/ubuntu-latest_py${{ matrix.python-version }}_extras.txt
# Using non-editable install for testing building of MANIFEST files
python${{ matrix.python-version }} -m pip install --no-deps .

- name: Build package and docs
run: |
git config --local user.email "feedback@materialsproject.org"
git config --local user.name "materialsproject"
git fetch --all --prune
git checkout main
python${{ matrix.python-version }} -m build
cd docs_rst
python${{ matrix.python-version }} featurizer_summary.py > featurizer_summary.rst
python${{ matrix.python-version }} dataset_summary.py > dataset_summary.rst
sphinx-apidoc -o . -f ../matminer
make html
cp _static/* ../docs/html/_static
cd ../docs
cp -r html/* .
rm -r html
rm -r doctrees
touch .nojekyll
git add .
git commit -a -m "update docs"
git push

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
89 changes: 76 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,33 @@
# The ext package is also only tested in this workflow. Coverage is also computed based on this platform.
name: Testing

on: [ push, pull_request ]
on:
push:
branches:
- main
paths:
- matminer/**

pull_request:
branches:
- main
paths:
- matminer/**

workflow_dispatch:
inputs:
fullTest:
description: "run full test"
required: true
default: false
type: boolean

jobs:

test:
strategy:
max-parallel: 4
matrix:
python-version: [3.8, 3.9]
python-version: ["3.8", "3.9"]
mongodb-version: ['4.0']

runs-on: ubuntu-latest
Expand All @@ -20,16 +38,41 @@ jobs:
PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }}
MPDS_KEY: ${{ secrets.MPDS_KEY }}
CITRINATION_API_KEY: ${{ secrets.CITRINATION_API_KEY }}
MATMINER_DATASET_FULL_TEST: False
RUNNING_ON_GHACTIONS: "True"
MPLBACKEND: "Agg"
MATMINER_DATASET_FULL_TEST: ${{ inputs.fullTest }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: '**/setup.py'

- name: Install Python dependencies
run: |
python${{ matrix.python-version }} -m pip install --upgrade pip pip-tools setuptools setuptools_scm
python${{ matrix.python-version }} -m piptools sync --user requirements/ubuntu-latest_py${{ matrix.python-version }}_extras.txt
# Using non-editable install for testing building of MANIFEST files
python${{ matrix.python-version }} -m pip install --no-deps .

- name: linting
run: |
black --version
black --check --diff --color matminer
flake8 --version
flake8 --count --show-source --statistics matminer
# exit-zero treats all errors as warnings.
flake8 --count --exit-zero --max-complexity=20 --statistics matminer
# mypy --version
# rm -rf .mypy_cache
# mypy matminer
# pydocstyle --count matminer
# pylint matminer

- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.6.0
Expand All @@ -41,10 +84,30 @@ jobs:
# Sleeping to allow mongo a bit more time to boot, avoiding connect errors
sleep 10
mongo localhost/admin --eval 'db.createUser({user: "admin",pwd: "password",roles: [ { role: "root", db: "admin" } ]})'
python3 -m venv test_env
. test_env/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt -r requirements-optional.txt
# Using non-editable install for testing building of MANIFEST files
pip install .
pytest --cov=matminer matminer
python${{ matrix.python-version }} -m pytest --cov=matminer matminer

- name: Build package
if: matrix.python-version == 3.9
run: |
python${{ matrix.python-version }} -m pip install --upgrade pip build setuptools setuptools_scm wheel
python${{ matrix.python-version }} -m build

- name: Publish distribution 📦s to Test PyPI
if: matrix.python-version == 3.9
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
skip_existing: true
repository_url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}

auto-gen-release:
needs:
- test
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
steps:
- uses: rymndhng/release-on-push-action@v0.25.0
with:
bump_version_scheme: norelease
Loading