Skip to content

Commit

Permalink
Merge conda-forge/master into jakirkham/lic_hint
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Oct 11, 2019
2 parents 0b21f6d + f146d56 commit ebf7ad7
Show file tree
Hide file tree
Showing 44 changed files with 1,457 additions and 420 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ install:
- rm -rf ${CONDA_INSTALL_LOCN}/pkgs && ln -s ${HOME}/cache/pkgs ${CONDA_INSTALL_LOCN}/pkgs

# Now do the things we need to do to install it.
- conda install --file requirements.txt coverage coveralls mock pytest pytest-cov ${CONDA_PKGS} --yes --quiet ${CHANNEL}
- conda install --file requirements.txt black coverage coveralls mock pytest pytest-cov ${CONDA_PKGS} --yes --quiet ${CHANNEL}
- python -m pip install -e .

script:
- py.test tests --cov conda_smithy
- black --check --verbose --config=pyproject.toml .

after_success:
- coverage combine
Expand Down
170 changes: 170 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,176 @@ conda-smithy Change Log

.. current developments
v3.6.0
====================

**Added:**

* Ignore Drone CI files in GitHub diffs
* Run ``black --check`` on CI to verify code is formatted correctly

**Changed:**

* Platform independent files like `run_docker_build.sh` are moved to `.scripts` folder
* Standardize and test support for multiple docker images.
* refactored ``conda_smithy.lint_recipe.NEEDED_FAMILIES`` to top level so external projects can access
* Rerun ``black`` on the codebase.

**Fixed:**

* fix crash when host section was present but empty
* fix build-locally.py in skip_render by not attempting to chmod +x it
* ship conf file for black so everyone uses the same settings



v3.5.0
====================

**Added:**

* conda-smithy will remove the ``.github/CODEOWNERS`` file in case the recipe
maintainers list is empty

**Changed:**

* Default windows provider was changed to azure.



v3.4.8
====================

**Fixed:**

* Don't make assumptions in ``conda_smithy/variant_algebra.py`` about the metadata



v3.4.7
====================

**Added:**

* Added a method to sync user in drone

**Changed:**

* Check that a project is registered if registering fails on drone
* Check that a project has the secret if adding secret fails on drone



v3.4.6
====================

**Added:**

* conda-smithy can now register packages on drone.io. We plan on using this to help out with the aarch64
architecture builds.

**Changed:**

* drone.io is now the default platform for aarch64 builds
* migrations folder changed from <feedstock_root>/migrations to <feedstock_root>/.ci_support/migrations

**Fixed:**

* Fix render_README crash when azure api returns 404



v3.4.5
====================

**Fixed:**

* YAML ``dump()`` now used ``pathlib.Path`` object.



v3.4.4
====================

**Fixed:**

* Updated conda-smithy to work with ruamel.yaml v0.16+.



v3.4.3
====================

**Changed:**

* In linting pins allow more than one space

**Fixed:**

* Don't lint setting build number



v3.4.2
====================

**Added:**

* Generating feedstocks with support for the linux-armv7l platform.
* test of the downgrade functionality of the new pinning system
* Mark generated files as generated so that github collapses them by deafult in diffs.
* The linter will now recomend fixes for malformed pins,
suggesting a single space is inserted. For instance, both ``python>=3`` and
``python >= 3`` will ought to be ``python >=3``.
* New key ``upload_on_branch`` added to conda-forge.yml the value of which is checked
against the current git branch and upload will be skipped if they are not equal.
This is optional and an empty key skips the test.
* Added `CONDA_SMITHY_LOGLEVEL` environment variable to change verbosity
of rendering. This can be either `debug` or `info`.

**Changed:**

* Add skip_render option to conda-forge.yaml. One could specify one or more filenames telling conda-smithy to skip making change on them. Files that could skip rendering include .gitignore, .gitattributes, README.md and LICENCE.txt.
* Reduced verbosity of rendering

**Fixed:**

* recipe-lint compatibility with ruamel.yaml 0.16
* Mock PY_VER in recipe check
* Fixed badge rendering in readme template.
* yum_requirements will now work on Travis based linux builds.
* requirements: update to conda-build>=3.18.3
* fix non-public conda import, use conda.exports
* requirements: replace pycrypto with pycryptodome



v3.4.1
====================

**Added:**

* license_file is required for GPL, MIT, BSD, APACHE, PSF

**Changed:**

* ``build-locally.py`` now uses ``python3`` even if ``python`` is ``python2`` (Python 3.6+ was already required)

**Removed:**

* Github issue, PR and contributing files are removed as they are in https://github.com/conda-forge/.github
* Support for python 2 Removed

**Fixed:**

* Fix configuring appveyor on repos starting with an underscore
* Fixed an issue where conda system variants could be used after rendering migrations.
* Fixed issue where only the last maintainer is review requested
* Unlicense is allowed
* Support newer ``shyaml`` versions by checking whether ``shyaml -h`` succeeds.



v3.4.0
====================

Expand Down
8 changes: 3 additions & 5 deletions bootstrap-obvious-ci-and-miniconda.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
"""
Installs Miniconda with the latest version of Obvious-CI.
This script supports Python 2 and 3 (>=2.6 and >=3.2+ respectively) and is
This script supports Python 3 (>=3.2+) and is
designed to run on OSX, Linux and Windows.
"""
from __future__ import print_function

import argparse
import os
import platform
Expand Down Expand Up @@ -49,7 +47,7 @@ def miniconda_url(
miniconda_os_ext = {"Linux": "sh", "MacOSX": "sh", "Windows": "exe"}
template_values["ext"] = miniconda_os_ext[template_values["OS"]]

if major_py_version not in ["2", "3"]:
if major_py_version not in ["3"]:
raise ValueError(
"Unexpected major Python version {!r}.".format(major_py_version)
)
Expand Down Expand Up @@ -133,7 +131,7 @@ def main(
"major_py_version",
help="""The major Python version for the miniconda root env (may
still subsequently use another Python version).""",
choices=["2", "3"],
choices=["3"],
)
parser.add_argument(
"--without-obvci",
Expand Down
4 changes: 2 additions & 2 deletions conda_smithy.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ requirements:
run:
- python >=3.6
- conda >=4.2
- conda-build >=3.1.2
- conda-build >=3.18.3
- jinja2
- requests
- pycrypto
- pycryptodome
- gitpython
- pygithub <2
- ruamel.yaml
Expand Down
1 change: 0 additions & 1 deletion conda_smithy/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
Expand Down
40 changes: 30 additions & 10 deletions conda_smithy/azure_ci_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
SourceRepository,
)
from vsts.service_endpoint.v4_1.models import ServiceEndpoint
from vsts.service_endpoint.v4_1.service_endpoint_client import ServiceEndpointClient
from vsts.service_endpoint.v4_1.service_endpoint_client import (
ServiceEndpointClient,
)
from vsts.task_agent.v4_0.models import TaskAgentQueue
from vsts.task_agent.v4_0.task_agent_client import TaskAgentClient
from vsts.vss_connection import VssConnection
Expand All @@ -22,7 +24,9 @@ class AzureConfig:
_default_org = "conda-forge"
_default_project_name = "feedstock-builds"

def __init__(self, org_or_user=None, project_name=None, team_instance=None):
def __init__(
self, org_or_user=None, project_name=None, team_instance=None
):
self.org_or_user = org_or_user or os.getenv(
"AZURE_ORG_OR_USER", self._default_org
)
Expand All @@ -36,15 +40,19 @@ def __init__(self, org_or_user=None, project_name=None, team_instance=None):
)

try:
with open(os.path.expanduser("~/.conda-smithy/azure.token"), "r") as fh:
with open(
os.path.expanduser("~/.conda-smithy/azure.token"), "r"
) as fh:
self.token = fh.read().strip()
if not self.token:
raise ValueError()
except (IOError, ValueError):
self.token = None

# By default for now don't report on the build information back to github
self.azure_report_build_status = os.getenv("AZURE_REPORT_BUILD_STATUS", "true")
self.azure_report_build_status = os.getenv(
"AZURE_REPORT_BUILD_STATUS", "true"
)

@property
def connection(self):
Expand All @@ -58,7 +66,9 @@ def credentials(self):
if self.token:
return BasicAuthentication("", self.token)
else:
warnings.warn("No token available. No modifications will be possible!")
warnings.warn(
"No token available. No modifications will be possible!"
)
return Authentication()


Expand All @@ -81,7 +91,9 @@ def get_service_endpoint(config: AzureConfig = default_config):
raise KeyError("Service endpoint not found")


def get_queues(config: AzureConfig = default_config) -> typing.List[TaskAgentQueue]:
def get_queues(
config: AzureConfig = default_config
) -> typing.List[TaskAgentQueue]:
aclient = TaskAgentClient(config.instance_base_url, config.credentials)
return aclient.get_agent_queues(config.project_name)

Expand Down Expand Up @@ -198,7 +210,9 @@ def register_repo(github_org, repo_name, config: AzureConfig = default_config):
assert len(existing_definitions) == 1
ed = existing_definitions[0]
bclient.update_definition(
definition=build_definition, definition_id=ed.id, project=ed.project.name
definition=build_definition,
definition_id=ed.id,
project=ed.project.name,
)
else:
bclient.create_definition(
Expand All @@ -207,7 +221,9 @@ def register_repo(github_org, repo_name, config: AzureConfig = default_config):


def build_client(config: AzureConfig = default_config) -> BuildClient:
return config.connection.get_client("vsts.build.v4_1.build_client.BuildClient")
return config.connection.get_client(
"vsts.build.v4_1.build_client.BuildClient"
)


def repo_registered(
Expand All @@ -222,7 +238,9 @@ def repo_registered(

def enable_reporting(repo, config: AzureConfig = default_config) -> None:
bclient = build_client(config)
bdef_header = bclient.get_definitions(project=config.project_name, name=repo)[0]
bdef_header = bclient.get_definitions(
project=config.project_name, name=repo
)[0]
bdef = bclient.get_definition(bdef_header.id, bdef_header.project.name)
bdef.repository.properties["reportBuildStatus"] = "true"
bclient.update_definition(bdef, bdef.id, bdef.project.name)
Expand All @@ -233,7 +251,9 @@ def get_build_id(repo, config: AzureConfig = default_config) -> dict:
of badges.
This is needed by non-conda-forge use cases"""
bclient = build_client(config)
bdef_header = bclient.get_definitions(project=config.project_name, name=repo)[0]
bdef_header = bclient.get_definitions(
project=config.project_name, name=repo
)[0]
bdef: BuildDefinition = bclient.get_definition(
bdef_header.id, bdef_header.project.name
)
Expand Down
Loading

0 comments on commit ebf7ad7

Please sign in to comment.