diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..907897ef6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: +- package-ecosystem: pip + directory: "/" + schedule: + interval: daily + target-branch: master + labels: + - dependency_updates +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + target-branch: master + labels: + - CI diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..4a2ea1b89 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: Building GitHub pages (CI) + +on: [pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + # Cancel running workflows when additional changes are pushed + # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value + concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.11 + + - name: Install OPTIMADE + run: | + python -m pip install --upgrade pip + pip install -r make_ghpages/requirements.txt + + - name: Make pages + run: cd make_ghpages && python make_pages.py diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml new file mode 100644 index 000000000..9e593c42a --- /dev/null +++ b/.github/workflows/github-pages.yml @@ -0,0 +1,47 @@ +name: Building and deploying GitHub pages + +on: + # schedule runs _only_ for the default branch (for a repository) and the base branch (for a PR). + # See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule for more info. + schedule: + # See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule + # run every day at 05:20 UTC + - cron: "20 5 * * *" + + # also update pages on pushes to master + push: + branches: + - master + +jobs: + daily_build: + runs-on: ubuntu-latest + env: + COMMIT_AUTHOR: Daily Deploy Action + COMMIT_AUTHOR_EMAIL: action@github.com + steps: + - uses: actions/checkout@v3 + + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install OPTIMADE + run: | + python -m pip install --upgrade pip + pip install -r make_ghpages/requirements.txt + + - name: Make pages + run: cd make_ghpages && python make_pages.py + timeout-minutes: 120 + + - name: Commit to gh-pages + run: ./make_ghpages/commit.sh + + - name: Push changes + uses: ad-m/github-push-action@v0.8.0 + with: + branch: gh-pages + force: true + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..0de2e5e31 --- /dev/null +++ b/.gitignore @@ -0,0 +1,122 @@ +### Python template +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +*~ +.DS_Store + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +.static_storage/ +.media/ +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# VSCode project settings +.vscode + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + +# pytest +.pytest_cache/ + +.DS_Store +.idea/ + +Untitled.ipynb +local_openapi.json +local_index_openapi.json +server.cfg diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..5721034c3 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: trailing-whitespace + exclude: README.md + - id: check-yaml + - id: check-json + +- repo: https://github.com/ambv/black + rev: 22.3.0 + hooks: + - id: black + name: Blacken + +- repo: https://gitlab.com/pycqa/flake8 + rev: '3.9.2' + hooks: + - id: flake8 diff --git a/index.html b/index.html new file mode 100644 index 000000000..a51f5e4a5 --- /dev/null +++ b/index.html @@ -0,0 +1,651 @@ + + + + +
+ + +