-
Notifications
You must be signed in to change notification settings - Fork 12
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
DM-15465: Clean up utils usage with a view to supporting test running in pull requests #323
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
98aea76
Allow ButlerURI to be created from another ButlerURI
timj af8e0cc
Switch ButlerConfig.configDir to be a ButlerURI
timj 65ebfc8
Switch config discovery from getPackageDir to pkg_resources
timj afdaef9
Remove lsst.utils from test_dbAuth
timj ad4a12b
Add the __init__.py back at top level
timj 1753bda
Create a setup.py to enable test builds with pip
timj 7ecd59e
Ignore files left over from python setup.py build
timj 0210c4f
Allow longer lines in YAML files
timj d76b6ca
Add an action to build the package and run tests
timj 9ab2646
Explicitly preinstall sphgeom dependencies
timj acd40da
Fall back to standard safe loader if C yaml library is not found
timj 9d381c6
Add psutil, needed by lsst.utils.tests
timj e52d6bf
Force installation of sqlite and libyaml-dev
timj f6c4058
Use ubuntu 20.04 for modern sqlite
timj 9f1d205
Adjust tests for missing arguments to account for click 7.1 change
timj 8a2be95
Install pytest-xdist in workflow to speed up tests
timj 278eb13
Enable doc build in action
timj cd7a94f
Fix documentation references to DAF_BUTLER_DIR
timj e80f40f
Change sphgeom URLs to point to master
timj e098c6d
Fix flake8 problem with blank line
timj bfefe54
Update setup.py
timj e3ac45b
Update doc/lsst.daf.butler/configuring.rst
timj 08a12f7
Configure test repo to properly use in-memory registry
timj d9af50c
Remove support email and license field from setup.cfg
timj 3541962
Add comment on usage of posixpath
timj de83b86
Expand on S3 not supporting includeConfigs
timj 5ccfb63
Simplify includeConfig search path by using ButlerURI
timj f2afab2
Enable pytest openfiles checking
timj File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: build_and_test | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
build_and_test: | ||
# runs-on: ubuntu-latest | ||
# Need >= 20.04 for modern sqlite. Can switch to latest when | ||
# github change | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install sqlite | ||
run: sudo apt-get install sqlite libyaml-dev | ||
|
||
# It seems like pip install of requirements for a URL package | ||
# does not install those dependencies | ||
- name: Install sphgeom dependencies | ||
run: pip install -r https://raw.githubusercontent.com/lsst/sphgeom/master/requirements.txt | ||
|
||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
|
||
# We have two cores so we can speed up the testing with xdist | ||
- name: Install xdist and openfiles | ||
run: pip install pytest-xdist pytest-openfiles | ||
|
||
- name: Build and install | ||
run: pip install -v . | ||
|
||
- name: Run tests | ||
run: pytest -r a -v -n 3 --open-files | ||
|
||
- name: Install documenteer | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note for the future: Should package the install and build as an action that others can reuse. |
||
run: pip install documenteer[pipelines] | ||
|
||
- name: Build documentation | ||
working-directory: ./doc | ||
run: package-docs build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,6 @@ bin/* | |
.idea/ | ||
.vscode/ | ||
mypy.log | ||
build/* | ||
dist/* | ||
python/lsst/utils/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import pkgutil | ||
__path__ = pkgutil.extend_path(__path__, __name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for the future: these four steps (deps, xdist, install ., pytest) could be packaged as an action for others to reuse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An action can import another action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A workflow (which this is) uses actions. I'm saying to package up the
run
scripts as a reusable action.