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

BUILD: Release facet 1.2.0 #293

Merged
merged 53 commits into from
Sep 8, 2021
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
406146c
BUILD: pin Jinja2 version to <3.0 to prevent breaking the sphinx buil…
j-ittner Jun 21, 2021
e0d9245
Merge branch '1.1.x' into 1.2.x
j-ittner Jun 21, 2021
d42ffb7
Update version number to 1.2.0
j-ittner Jun 22, 2021
d3e00bb
Update version to 1.0.4
j-ittner Jun 22, 2021
149b9da
DEV: pin scipy to 1.5 in environment.yml (#287)
j-ittner Jun 22, 2021
94e73d1
API: remove FACET 1.0 legacy inspections (#288)
j-ittner Jun 22, 2021
2479328
BUILD: pin jinja2 to ~=2.11 to prevent incompatibility with sphinx (#…
j-ittner Jun 22, 2021
d1b6241
Merge branch 'develop' into 1.1.x
j-ittner Jun 22, 2021
5dd20d9
Merge branch '1.1.x' into 1.2.x
j-ittner Jun 22, 2021
11682f2
DOC: update RELEASE_NOTES.rst
j-ittner Jun 25, 2021
94004c9
BUILD: require pytools ~=1.2 and sklearndf ~= 1.2
j-ittner Jun 25, 2021
190d2db
Merge remote-tracking branch 'origin/release/1.2.0' into dev/1.2.0
j-ittner Jun 25, 2021
dea4c2c
BUILD: require numpy 1.17
j-ittner Jun 25, 2021
29c1020
BUILD: remove dev/* from azure pipeline triggers
j-ittner Jun 25, 2021
e49e7c5
FIX: rephrase max numpy requirement due to possible bug in conda-build
j-ittner Jun 25, 2021
27da609
FIX: build sklearndf 1.2.x in azure-pipelines.yml
j-ittner Jun 25, 2021
d008c86
BUILD: use python 3.8 in host requirements
j-ittner Jun 25, 2021
c9c733f
BUILD: remove unneeded trailing .* from pyproject.toml
j-ittner Jun 25, 2021
8c5e060
BUILD: add missing version requirements to conda run config
j-ittner Jun 25, 2021
247d473
BUILD: set matplotlib to 3.4 in max test
j-ittner Jun 25, 2021
9581ddd
BUILD: change matplotlib==3 back to matplotlib==3.* for tox
j-ittner Jun 25, 2021
1428bec
BUILD: add inherited requirements so we can use them for testing
j-ittner Jun 25, 2021
f65fd7c
FIX: change boruta into boruta_py
j-ittner Jun 25, 2021
9bd518a
FIX: change boruta_py back into boruta for tox builds (but not conda)
j-ittner Jun 25, 2021
2090223
BUILD: make min requirements more specific to speed up build time
j-ittner Jun 28, 2021
26b8c53
BUILD: standardize azure pipeline across BCG Gamma repos (#292)
j-ittner Jul 6, 2021
d58cc7c
Merge branch 'develop' into 1.1.x
j-ittner Jul 13, 2021
8ac4b38
FIX: re-remove _balancer.py
j-ittner Jul 14, 2021
45adcc4
BUILD: fix pytools minimum versions in pyproject.toml
j-ittner Jul 14, 2021
644cefc
Merge remote-tracking branch 'origin/1.1.x' into 1.1.x
j-ittner Jul 15, 2021
ebda248
FIX: joblib version in min matrix build
j-ittner Jul 16, 2021
454ac6a
Merge branch '1.1.x' into 1.2.x
j-ittner Jul 19, 2021
5a9e828
BUILD: disable nightly builds on 1.1.x branch
j-ittner Jul 19, 2021
1c854d5
Merge branch '1.1.x' into 1.2.x
j-ittner Jul 19, 2021
7eda1a9
Merge branch '1.2.x' into dev/1.2.0
j-ittner Jul 19, 2021
02bc3ba
BUILD: remove conda dependencies with boruta
j-ittner Jul 20, 2021
b5a53b0
BUILD: tweaks for 1.2.0 release (#295)
j-ittner Jul 20, 2021
ba5dede
BUILD: relax upper bounds of package requirements (#296)
j-ittner Jul 23, 2021
eb1ab17
API: improve parameter checking for StratifiedBootstrapCV
j-ittner Jul 27, 2021
0e69781
TEST: add unit test for StratifiedBootstrapCV
j-ittner Jul 27, 2021
e988bb5
FIX: don't require arg y in non-stratified bootstraps
j-ittner Jul 27, 2021
545ade5
DEV: update package requirements for facet-develop conda environment
j-ittner Jul 28, 2021
43c7136
API: implement full sample simulation as experimental feature (#297)
j-ittner Sep 7, 2021
cd31e04
Update __init__.py
j-ittner Sep 7, 2021
8f41196
BUILD: release FACET 1.2.0rc1 (#298)
j-ittner Sep 8, 2021
6c37c4a
Merge remote-tracking branch 'origin/release/1.2.0rc1' into 1.2.x
j-ittner Sep 8, 2021
adfae18
Merge branch '1.2.x' into dev/1.2.0
j-ittner Sep 8, 2021
fe170f0
BUILD: change version number back to 1.2.0
j-ittner Sep 8, 2021
faa6361
DOC: add reference to FACET research paper on the project landing pag…
j-ittner Sep 8, 2021
4b19ad5
FIX: add back facet/data/__init__.py
j-ittner Sep 8, 2021
26e3c01
BUILD: relax max requirement for packaging package
j-ittner Sep 8, 2021
bd43dba
Merge branch '1.1.x' into 1.2.x
j-ittner Sep 8, 2021
33eabfe
Merge branch '1.2.x' into dev/1.2.0
j-ittner Sep 8, 2021
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
4 changes: 3 additions & 1 deletion RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ Release Notes
FACET 1.2
---------

FACET 1.2 introduces the ability to run simulations on a subsample of the data used to
FACET 1.2 adds support for *sklearndf* 1.2 and *scikit-learn* 0.24.
It also introduces the ability to run simulations on a subsample of the data used to
fit the underlying crossfit.
One example where this can be useful is to use only a recent period of a time series as
the baseline of a simulation.

1.2.0
~~~~~

- BUILD: added support for *sklearndf* 1.2 and *scikit-learn* 0.24
- API: new optional parameter `subsample` in method
:meth:`.BaseUnivariateSimulator.simulate_feature` can be used to specify a subsample
to be used in the simulation (but simulating using a crossfit based on the full
Expand Down
141 changes: 56 additions & 85 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
trigger:
- 1.2.x
- dev/*
- release/*

pr:
- 1.2.x
- dev/*
- release/*

# set the build name
Expand All @@ -21,11 +19,6 @@ schedules:

resources:
repositories:
- repository: sklearndf
type: github
endpoint: BCG-Gamma
name: BCG-Gamma/sklearndf
ref: 1.1.x
- repository: pytools
type: github
endpoint: BCG-Gamma
Expand All @@ -40,6 +33,10 @@ variables:
source_is_release_branch: $[ startsWith(variables['branchName'], 'release') ]
source_is_develop_branch: $[ or(startsWith(variables['branchName'], 'develop'), startsWith(variables['branchName'], 'dev/')) ]
is_scheduled: $[ eq(variables['Build.Reason'], 'Schedule') ]
project_name: facet
project_root: $(project_name)
package_name: gamma-facet
sshPublicKey: $(sshPublicKey_facet)

stages:
# check code quality first to fail fast (isort, flake8, black)
Expand Down Expand Up @@ -96,6 +93,7 @@ stages:
inputs:
targetType: 'inline'
script: |
echo Repo: $(Build.DefinitionName)
cd $(System.DefaultWorkingDirectory)
files_changed=$(git diff $(Build.SourceVersion)^! --name-only)
echo "Files changed since last commit: ${files_changed}"
Expand Down Expand Up @@ -132,8 +130,6 @@ stages:
displayName: 'use Python 3.7'

- checkout: self
- checkout: sklearndf
- checkout: pytools

- script: dir $(Build.SourcesDirectory)

Expand All @@ -143,21 +139,12 @@ stages:
script: |
set -eux
eval "$(conda shell.bash hook)"
cd $(System.DefaultWorkingDirectory)/facet/
export PYTHONPATH=$(System.DefaultWorkingDirectory)/facet/src/
export RUN_PACKAGE_VERSION_TEST=facet
ENV_YML=$(Agent.TempDirectory)/environment-stripped.yml
grep -vE 'gamma-pytools|sklearndf' environment.yml > "$ENV_YML"
conda env create -f "$ENV_YML"
conda activate facet-develop
pip install flit
cd $(System.DefaultWorkingDirectory)/pytools/
flit install -s
cd $(System.DefaultWorkingDirectory)/sklearndf/
flit install -s
cd $(System.DefaultWorkingDirectory)/facet/
export PYTHONPATH=$(System.DefaultWorkingDirectory)/src/
export RUN_PACKAGE_VERSION_TEST=$(project_name)
conda env create
conda activate $(project_name)-develop
pytest \
--cov facet \
--cov $(project_name) \
--cov-config "tox.ini" \
--cov-report=xml:coverage.xml --cov-report=html:htmlcov \
--junitxml pytest.xml \
Expand All @@ -167,15 +154,15 @@ stages:
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '$(System.DefaultWorkingDirectory)/facet/*.xml'
searchFolder: '$(System.DefaultWorkingDirectory)/facet/'
testResultsFiles: '$(System.DefaultWorkingDirectory)/*.xml'
searchFolder: '$(System.DefaultWorkingDirectory)/'
testRunTitle: 'Publish test results'

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/facet/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/facet/htmlcov'
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/htmlcov'

# conda env & tox build test
# testing matrix of python & sklearn versions
Expand Down Expand Up @@ -217,14 +204,13 @@ stages:
versionSpec: '$(FACET_V_PYTHON_BUILD)'
displayName: 'Use Python $(FACET_V_PYTHON_BUILD)'

- checkout: self
- checkout: sklearndf
- checkout: pytools
- checkout: self

- script: dir $(Build.SourcesDirectory)

- script: |
conda install -y -c anaconda conda-build=3.20.5 conda-verify toml=0.10.* flit=3.0.*
conda install -y -c anaconda conda-build~=3.20.5 conda-verify toml=0.10.* flit=3.0.*
displayName: 'Install conda-build, flit, toml'
condition: eq(variables['BUILD_SYSTEM'], 'conda')

Expand All @@ -241,21 +227,17 @@ stages:
inputs:
targetType: 'inline'
script: |
set -eux
if [ "$BUILD_SYSTEM" = "conda" ] ; then eval "$(conda shell.bash hook)" ; fi
export RUN_PACKAGE_VERSION_TEST=facet
cd $(Build.SourcesDirectory)/pytools
./make.py pytools $(BUILD_SYSTEM) $(PKG_DEPENDENCIES)
export RUN_PACKAGE_VERSION_TEST=$(project_name)

cd $(Build.SourcesDirectory)/sklearndf
./make.py sklearndf $(BUILD_SYSTEM) $(PKG_DEPENDENCIES)

cd $(Build.SourcesDirectory)/facet
./make.py facet $(BUILD_SYSTEM) $(PKG_DEPENDENCIES)
displayName: "build & test conda/pip packages"
cd $(Build.SourcesDirectory)/$(project_root)
./make.py $(project_name) $(BUILD_SYSTEM) $(PKG_DEPENDENCIES)
displayName: "build & test"

- task: CopyFiles@2
inputs:
sourceFolder: $(System.DefaultWorkingDirectory)/facet/dist
sourceFolder: $(System.DefaultWorkingDirectory)/$(project_root)/dist
targetFolder: $(Build.ArtifactStagingDirectory)

- task: PublishBuildArtifacts@1
Expand Down Expand Up @@ -309,14 +291,13 @@ stages:
versionSpec: '$(FACET_V_PYTHON_BUILD)'
displayName: 'Use Python $(FACET_V_PYTHON_BUILD)'

- checkout: self
- checkout: sklearndf
- checkout: pytools
- checkout: self

- script: dir $(Build.SourcesDirectory)

- script: |
conda install -y -c anaconda conda-build=3.20.5 conda-verify toml=0.10.* flit=3.0.*
conda install -y -c anaconda conda-build~=3.20.5 conda-verify toml=0.10.* flit=3.0.*
displayName: 'Install conda-build, flit, toml'
condition: eq(variables['BUILD_SYSTEM'], 'conda')

Expand All @@ -335,18 +316,15 @@ stages:
script: |
set -eux
if [ "$BUILD_SYSTEM" = "conda" ] ; then eval "$(conda shell.bash hook)" ; fi
export RUN_PACKAGE_VERSION_TEST=facet
cd $(Build.SourcesDirectory)/pytools
./make.py pytools $(BUILD_SYSTEM) $(PKG_DEPENDENCIES)
cd $(Build.SourcesDirectory)/sklearndf
./make.py sklearndf $(BUILD_SYSTEM) $(PKG_DEPENDENCIES)
cd $(Build.SourcesDirectory)/facet
./make.py facet $(BUILD_SYSTEM) $(PKG_DEPENDENCIES)
displayName: "build & test conda/pip packages"
export RUN_PACKAGE_VERSION_TEST=$(project_name)

cd $(Build.SourcesDirectory)/$(project_root)
./make.py $(project_name) $(BUILD_SYSTEM) $(PKG_DEPENDENCIES)
displayName: "build & test"

- task: CopyFiles@2
inputs:
sourceFolder: $(System.DefaultWorkingDirectory)/facet/dist
sourceFolder: $(System.DefaultWorkingDirectory)/$(project_root)/dist
targetFolder: $(Build.ArtifactStagingDirectory)

- task: PublishBuildArtifacts@1
Expand Down Expand Up @@ -382,7 +360,7 @@ stages:
veracodeAppProfile: 'FACET'
version: '$(Build.BuildID)'
filepath: '$(System.DefaultWorkingDirectory)/static_scan'
sandboxName: 'facet'
sandboxName: '$(project_name)'
createSandBox: false
createProfile: false
failTheBuildIfVeracodeScanDidNotInitiate: false
Expand All @@ -409,8 +387,8 @@ stages:
versionSpec: '3.7.*'
displayName: 'use Python 3.7'

- checkout: self
- checkout: pytools
- checkout: self

- task: Bash@3
env:
Expand All @@ -436,7 +414,7 @@ stages:
), "This check should only run on versioned branches – check pipeline."

branch_version = branch.split("/", maxsplit=1)[1]
package_version = ToxBuilder("facet", "default").package_version
package_version = ToxBuilder("$(project_name)", "default").package_version

assert (
package_version == branch_version
Expand Down Expand Up @@ -474,9 +452,8 @@ stages:
versionSpec: '3.7.*'
displayName: 'use Python 3.7'

- checkout: self

- checkout: pytools
- checkout: self

- task: Bash@3
inputs:
Expand All @@ -485,7 +462,7 @@ stages:
set -eux
echo "Getting version"
pip install packaging
cd $(System.DefaultWorkingDirectory)/facet/src
cd $(System.DefaultWorkingDirectory)/$(project_root)/src
export PYTHONPATH=$(System.DefaultWorkingDirectory)/pytools/sphinx/base
version=$(python -c "import make_base; print(make_base.get_package_version())")
echo "Current version: $version"
Expand All @@ -510,7 +487,7 @@ stages:
eval "$(conda shell.bash hook)"
conda install -y anaconda-client
anaconda login --username "${CONDA_USERNAME}" --password "${CONDA_PASSWORD}"
anaconda upload --user BCG_Gamma --force $(System.ArtifactsDirectory)/conda_default/conda/noarch/gamma-facet-*.tar.bz2
anaconda upload --user BCG_Gamma --force $(System.ArtifactsDirectory)/conda_default/conda/noarch/$(package_name)-*.tar.bz2
anaconda logout
echo "##vso[task.setvariable variable=conda_published]True"
displayName: 'Publish to Anaconda'
Expand All @@ -522,7 +499,7 @@ stages:

- script: |
set -eux
cd $(System.DefaultWorkingDirectory)/facet
cd $(System.DefaultWorkingDirectory)/$(project_root)
pip install flit
flit install -s
flit publish
Expand Down Expand Up @@ -550,24 +527,24 @@ stages:
target: $(Build.SourceVersion)
tagSource: userSpecifiedTag
tag: $(current_version)
title: facet $(current_version)
title: $(project_name) $(current_version)
releaseNotesSource: inline
releaseNotesInline: |
This is the $(current_version) release of facet.
This is the $(current_version) release of $(package_name).

You can upgrade your current pip installation via

pip install --upgrade gamma-facet
pip install --upgrade $(package_name)

Your conda package can be upgraded by running

conda install -c conda-forge -c bcg_gamma gamma-facet
conda install -c conda-forge -c bcg_gamma $(package_name)

isDraft: false
isPreRelease: $(is_prerelease)
assets: |
$(System.ArtifactsDirectory)/tox_default/tox/gamma-facet-*.tar.gz
$(System.ArtifactsDirectory)/conda_default/conda/noarch/gamma-facet-*.tar.bz2
$(System.ArtifactsDirectory)/tox_default/tox/$(package_name)-*.tar.gz
$(System.ArtifactsDirectory)/conda_default/conda/noarch/$(package_name)-*.tar.bz2

# render docs and publish to GitHub Pages
- stage:
Expand Down Expand Up @@ -598,13 +575,12 @@ stages:
- task: InstallSSHKey@0
inputs:
knownHostsEntry: $(knownHostsEntry)
sshPublicKey: $(sshPublicKey_facet)
sshKeySecureFile: 'deploy_docs_facet'
sshPublicKey: $(sshPublicKey)
sshKeySecureFile: 'deploy_docs_$(project_name)'
displayName: 'Install the deploy SSH key'

- checkout: self
- checkout: sklearndf
- checkout: pytools
- checkout: self

- script: dir $(Build.SourcesDirectory)

Expand All @@ -613,7 +589,7 @@ stages:
targetType: 'inline'
script: |
set -eux
cd $(System.DefaultWorkingDirectory)/facet
cd $(System.DefaultWorkingDirectory)/$(project_root)
git checkout --track origin/github-pages
mkdir -p docs
sudo apt-get install tree
Expand All @@ -629,19 +605,14 @@ stages:
script: |
set -eux
eval "$(conda shell.bash hook)"
cd $(System.DefaultWorkingDirectory)/facet
cd $(System.DefaultWorkingDirectory)/$(project_root)
echo "Checking out $(branchName)"
git checkout $(branchName)
git status
export PYTHONPATH=$(System.DefaultWorkingDirectory)/facet/src/
export PYTHONPATH=$(System.DefaultWorkingDirectory)/$(project_root)/src/
conda env create -f environment.yml
conda activate facet-develop
pip install flit
cd $(System.DefaultWorkingDirectory)/pytools/
flit install -s
cd $(System.DefaultWorkingDirectory)/sklearndf/
flit install -s
cd $(System.DefaultWorkingDirectory)/facet/
conda activate $(project_name)-develop
cd $(System.DefaultWorkingDirectory)/$(project_root)/
python sphinx/make.py html
echo "Current docs contents:"
tree docs
Expand All @@ -656,11 +627,11 @@ stages:
cp -r $(Build.ArtifactStagingDirectory)/old_docs/docs .
echo "Current docs contents:"
tree docs
mkdir -p $(System.DefaultWorkingDirectory)/facet/sphinx/build/
cp -R docs/docs-version $(System.DefaultWorkingDirectory)/facet/sphinx/build/
mkdir -p $(System.DefaultWorkingDirectory)/$(project_root)/sphinx/build/
cp -R docs/docs-version $(System.DefaultWorkingDirectory)/$(project_root)/sphinx/build/
echo "Building sphinx docs"
conda activate facet-develop
cd $(System.DefaultWorkingDirectory)/facet
conda activate $(project_name)-develop
cd $(System.DefaultWorkingDirectory)/$(project_root)
python sphinx/make.py prepare_docs_deployment
echo "Current docs contents:"
tree docs
Expand All @@ -674,7 +645,7 @@ stages:
targetType: 'inline'
script: |
set -eux
cd $(System.DefaultWorkingDirectory)/facet
cd $(System.DefaultWorkingDirectory)/$(project_root)
echo "Adjusting git credentials"
git config --global user.name "Azure Pipelines"
git config --global user.email "azuredevops@microsoft.com"
Expand Down
Loading