Skip to content

Commit

Permalink
Merge pull request #835 from ktbyers/poetry_test
Browse files Browse the repository at this point in the history
Upgrade poetry and readthedocs to use dependency groups
  • Loading branch information
dbarrosop committed Feb 13, 2023
2 parents 2a2248d + c34c220 commit 44103f2
Show file tree
Hide file tree
Showing 5 changed files with 1,885 additions and 1,674 deletions.
134 changes: 67 additions & 67 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
## For most projects, this workflow file will not need changing; you simply need
## to commit it to your repository.
##
## You may wish to alter this file to override the set of languages analyzed,
## or to provide custom queries or build logic.
##
## ******** NOTE ********
## We have attempted to detect the languages in your repository. Please check
## the `language` matrix defined below to confirm you have the correct set of
## supported CodeQL languages.
##
#name: "CodeQL"
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#on:
# push:
# branches: [ develop ]
# pull_request:
# # The branches below must be a subset of the branches above
# branches: [ develop ]
# schedule:
# - cron: '45 5 * * 3'
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#jobs:
# analyze:
# name: Analyze
# runs-on: ubuntu-latest
# permissions:
# actions: read
# contents: read
# security-events: write
#
name: "CodeQL"

on:
push:
branches: [ develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
schedule:
- cron: '45 5 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
# strategy:
# fail-fast: false
# matrix:
# language: [ 'python' ]
# # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# # Learn more about CodeQL language support at https://git.io/codeql-language-support
#
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
#
# # Initializes the CodeQL tools for scanning.
# - name: Initialize CodeQL
# uses: github/codeql-action/init@v1
# with:
# languages: ${{ matrix.language }}
# # If you wish to specify custom queries, you can do so here or in a config file.
# # By default, queries listed here will override any specified in a config file.
# # Prefix the list here with "+" to use these queries and those in the config file.
# # queries: ./path/to/local/query, your-org/your-repo/queries@main
#
# # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# # If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v1
#
# # ℹ️ Command-line programs to run using the OS shell.
# # 📚 https://git.io/JvXDl
#
# # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# # and modify them (or add more) to build your code if your project
# # uses a compiled language
#
# #- run: |
# # make bootstrap
# # make release
#
# - name: Perform CodeQL Analysis
# uses: github/codeql-action/analyze@v1
38 changes: 20 additions & 18 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true

Expand Down Expand Up @@ -67,6 +68,7 @@ jobs:
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true

Expand Down Expand Up @@ -94,21 +96,21 @@ jobs:
run: make nbval
if: ${{ matrix.platform != 'windows-latest' }}

release:
name: Releasing to pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build
uses: abatilo/actions-poetry@v1.5.0
with:
python_version: 3.8.0
poetry_version: 1.0
working_directory: .
args: build
- name: Publish package
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
# release:
# name: Releasing to pypi
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: Build
# uses: abatilo/actions-poetry@v1.5.0
# with:
# python_version: 3.8.0
# poetry_version: 1.3.2
# working_directory: .
# args: build
# - name: Publish package
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@master
# with:
# user: __token__
# password: ${{ secrets.pypi_password }}
23 changes: 15 additions & 8 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
---
version: 2
formats: []
build:
image: latest

python:
version: 3.7
pip_install: true
extra_requirements:
- docs
os: "ubuntu-22.04"
tools:
python: "3.11"
jobs:
post_create_environment:
- pip install poetry
- poetry config virtualenvs.create false
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- poetry install --with docs

formats: []
sphinx:
configuration: docs/conf.py

0 comments on commit 44103f2

Please sign in to comment.