kopia lustrzana https://github.com/jupyterhub/repo2docker
				
				
				
			Bump Black version (20.8b1) and use --target-version=py36
							rodzic
							
								
									f45d84be1f
								
							
						
					
					
						commit
						fadb3c8dc8
					
				| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
repos:
 | 
			
		||||
- repo: https://github.com/ambv/black
 | 
			
		||||
  rev: 19.10b0
 | 
			
		||||
  rev: 20.8b1
 | 
			
		||||
  hooks:
 | 
			
		||||
  - id: black
 | 
			
		||||
    args: [--target-version=py35]
 | 
			
		||||
    args: [--target-version=py36]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -266,8 +266,7 @@ class CondaBuildPack(BaseImage):
 | 
			
		|||
        return assemble_files
 | 
			
		||||
 | 
			
		||||
    def get_env_scripts(self):
 | 
			
		||||
        """Return series of build-steps specific to this source repository.
 | 
			
		||||
        """
 | 
			
		||||
        """Return series of build-steps specific to this source repository."""
 | 
			
		||||
        scripts = []
 | 
			
		||||
        environment_yml = self.binder_path("environment.yml")
 | 
			
		||||
        env_prefix = "${KERNEL_PYTHON_PREFIX}" if self.py2 else "${NB_PYTHON_PREFIX}"
 | 
			
		||||
| 
						 | 
				
			
			@ -340,6 +339,5 @@ class CondaBuildPack(BaseImage):
 | 
			
		|||
        return scripts
 | 
			
		||||
 | 
			
		||||
    def detect(self):
 | 
			
		||||
        """Check if current repo should be built with the Conda BuildPack.
 | 
			
		||||
        """
 | 
			
		||||
        """Check if current repo should be built with the Conda BuildPack."""
 | 
			
		||||
        return os.path.exists(self.binder_path("environment.yml")) and super().detect()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -86,9 +86,9 @@ class JuliaProjectTomlBuildPack(PythonBuildPack):
 | 
			
		|||
    def get_path(self):
 | 
			
		||||
        """Adds path to Julia binaries to user's PATH.
 | 
			
		||||
 | 
			
		||||
         Returns:
 | 
			
		||||
             an ordered list of path strings. The path to the Julia
 | 
			
		||||
             executable is added to the list.
 | 
			
		||||
        Returns:
 | 
			
		||||
            an ordered list of path strings. The path to the Julia
 | 
			
		||||
            executable is added to the list.
 | 
			
		||||
 | 
			
		||||
        """
 | 
			
		||||
        return super().get_path() + ["${JULIA_PATH}/bin"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -88,9 +88,9 @@ class JuliaRequireBuildPack(PythonBuildPack):
 | 
			
		|||
    def get_path(self):
 | 
			
		||||
        """Adds path to Julia binaries to user's PATH.
 | 
			
		||||
 | 
			
		||||
         Returns:
 | 
			
		||||
             an ordered list of path strings. The path to the Julia
 | 
			
		||||
             executable is added to the list.
 | 
			
		||||
        Returns:
 | 
			
		||||
            an ordered list of path strings. The path to the Julia
 | 
			
		||||
            executable is added to the list.
 | 
			
		||||
 | 
			
		||||
        """
 | 
			
		||||
        return super().get_path() + ["${JULIA_HOME}"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,8 +8,7 @@ class NixBuildPack(BaseImage):
 | 
			
		|||
    """A nix Package Manager BuildPack"""
 | 
			
		||||
 | 
			
		||||
    def get_path(self):
 | 
			
		||||
        """Return paths to be added to PATH environemnt variable
 | 
			
		||||
        """
 | 
			
		||||
        """Return paths to be added to PATH environemnt variable"""
 | 
			
		||||
        return super().get_path() + ["/home/${NB_USER}/.nix-profile/bin"]
 | 
			
		||||
 | 
			
		||||
    def get_env(self):
 | 
			
		||||
| 
						 | 
				
			
			@ -47,16 +46,14 @@ class NixBuildPack(BaseImage):
 | 
			
		|||
        ]
 | 
			
		||||
 | 
			
		||||
    def get_build_script_files(self):
 | 
			
		||||
        """Dict of files to be copied to the container image for use in building
 | 
			
		||||
        """
 | 
			
		||||
        """Dict of files to be copied to the container image for use in building"""
 | 
			
		||||
        return {
 | 
			
		||||
            "nix/install-nix.bash": "/home/${NB_USER}/.local/bin/install-nix.bash",
 | 
			
		||||
            "nix/nix-shell-wrapper": "/usr/local/bin/nix-shell-wrapper",
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    def get_assemble_scripts(self):
 | 
			
		||||
        """Return series of build-steps specific to this source repository.
 | 
			
		||||
        """
 | 
			
		||||
        """Return series of build-steps specific to this source repository."""
 | 
			
		||||
        return super().get_assemble_scripts() + [
 | 
			
		||||
            (
 | 
			
		||||
                "${NB_USER}",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -93,8 +93,7 @@ class PipfileBuildPack(CondaBuildPack):
 | 
			
		|||
        return scripts
 | 
			
		||||
 | 
			
		||||
    def get_assemble_scripts(self):
 | 
			
		||||
        """Return series of build-steps specific to this repository.
 | 
			
		||||
        """
 | 
			
		||||
        """Return series of build-steps specific to this repository."""
 | 
			
		||||
        # If we have either Pipfile.lock, Pipfile, or runtime.txt declare the
 | 
			
		||||
        # use of Python 2, Python 2.7 will be made available in the *kernel*
 | 
			
		||||
        # environment. The notebook servers environment on the other hand
 | 
			
		||||
| 
						 | 
				
			
			@ -168,8 +167,7 @@ class PipfileBuildPack(CondaBuildPack):
 | 
			
		|||
        return assemble_scripts
 | 
			
		||||
 | 
			
		||||
    def detect(self):
 | 
			
		||||
        """Check if current repo should be built with the Pipfile buildpack.
 | 
			
		||||
        """
 | 
			
		||||
        """Check if current repo should be built with the Pipfile buildpack."""
 | 
			
		||||
        # first make sure python is not explicitly unwanted
 | 
			
		||||
        runtime_txt = self.binder_path("runtime.txt")
 | 
			
		||||
        if os.path.exists(runtime_txt):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -132,8 +132,7 @@ class PythonBuildPack(CondaBuildPack):
 | 
			
		|||
        return assemble_scripts
 | 
			
		||||
 | 
			
		||||
    def detect(self):
 | 
			
		||||
        """Check if current repo should be built with the Python buildpack.
 | 
			
		||||
        """
 | 
			
		||||
        """Check if current repo should be built with the Python buildpack."""
 | 
			
		||||
        requirements_txt = self.binder_path("requirements.txt")
 | 
			
		||||
        runtime_txt = self.binder_path("runtime.txt")
 | 
			
		||||
        setup_py = "setup.py"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,7 +12,7 @@ from ..utils import copytree, deep_get
 | 
			
		|||
class Dataverse(DoiProvider):
 | 
			
		||||
    """
 | 
			
		||||
    Provide contents of a Dataverse dataset.
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    This class loads a a list of existing Dataverse installations from the internal
 | 
			
		||||
    file dataverse.json. This file is manually updated with the following command:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,7 +15,7 @@ from ..utils import copytree, deep_get
 | 
			
		|||
 | 
			
		||||
class Figshare(DoiProvider):
 | 
			
		||||
    """Provide contents of a Figshare article.
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    See https://docs.figshare.com/#public_article for API docs.
 | 
			
		||||
 | 
			
		||||
    Examples:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue