Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 8 additions & 8 deletions anaconda_project/internal/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@


def _parse_args_and_run_subcommand(argv):
parser = ArgumentParser(prog="anaconda-project", description="Actions on projects (runnable projects).")
parser = ArgumentParser(prog="conda-project", description="Actions on projects (runnable projects).")

subparsers = parser.add_subparsers(help="Sub-commands")

Expand All @@ -57,7 +57,7 @@ def add_env_spec_arg(preset):
metavar='ENVIRONMENT_SPEC_NAME',
default=None,
action='store',
help="An environment spec name from anaconda-project.yml")
help="An environment spec name from conda-project.yml")

def add_prepare_args(preset, include_command=True):
add_directory_arg(preset)
Expand All @@ -77,15 +77,15 @@ def add_prepare_args(preset, include_command=True):
metavar='COMMAND_NAME',
default=None,
action='store',
help="A command name from anaconda-project.yml (env spec for this command will be used)")
help="A command name from conda-project.yml (env spec for this command will be used)")

def add_env_spec_name_arg(preset, required):
preset.add_argument('-n',
'--name',
metavar='ENVIRONMENT_SPEC_NAME',
required=required,
action='store',
help="Name of the environment spec from anaconda-project.yml")
help="Name of the environment spec from conda-project.yml")

preset = subparsers.add_parser('init', help="Initialize a directory with default project configuration")
add_directory_arg(preset)
Expand All @@ -102,7 +102,7 @@ def add_env_spec_name_arg(preset, required):
metavar='COMMAND_NAME',
default=None,
nargs='?',
help="A command name from anaconda-project.yml")
help="A command name from conda-project.yml")
preset.add_argument('extra_args_for_command', metavar='EXTRA_ARGS_FOR_COMMAND', default=None, nargs=REMAINDER)
preset.set_defaults(main=run.main)

Expand Down Expand Up @@ -187,14 +187,14 @@ def add_env_spec_name_arg(preset, required):
preset.set_defaults(main=variable_commands.main_list)

preset = subparsers.add_parser('set-variable',
help="Set an environment variable value in anaconda-project-local.yml")
help="Set an environment variable value in conda-project-local.yml")
add_env_spec_arg(preset)
preset.add_argument('vars_and_values', metavar='VARS_AND_VALUES', default=None, nargs=REMAINDER)
add_directory_arg(preset)
preset.set_defaults(main=variable_commands.main_set)

preset = subparsers.add_parser('unset-variable',
help="Unset an environment variable value from anaconda-project-local.yml")
help="Unset an environment variable value from conda-project-local.yml")
add_env_spec_arg(preset)
add_directory_arg(preset)
preset.add_argument('vars_to_unset', metavar='VARS_TO_UNSET', default=None, nargs=REMAINDER)
Expand Down Expand Up @@ -403,4 +403,4 @@ def main():
Conda expects us to take no args and return an exit code.
"""
details = {'version': version}
return handle_bugs(_main_without_bug_handler, program_name='anaconda-project', details_dict=details)
return handle_bugs(_main_without_bug_handler, program_name='conda-project', details_dict=details)
5 changes: 4 additions & 1 deletion anaconda_project/project_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
import anaconda_project.internal.conda_api as conda_api

# these are in the order we'll use them if multiple are present
possible_project_file_names = ("anaconda-project.yml", "anaconda-project.yaml", "kapsel.yml", "kapsel.yaml")
possible_project_file_names = ('project.yml', 'project.yaml',
"conda-project.yml", "conda-project.yaml",
"anaconda-project.yml", "anaconda-project.yaml",
"kapsel.yml", "kapsel.yaml")

DEFAULT_PROJECT_FILENAME = possible_project_file_names[0]

Expand Down
10 changes: 6 additions & 4 deletions anaconda_project/project_lock_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,21 @@
from anaconda_project.yaml_file import YamlFile, _CommentedMap, _block_style_all_nodes

# these are in the order we'll use them if multiple are present
possible_project_lock_file_names = ("anaconda-project-lock.yml", "anaconda-project-lock.yaml")
possible_project_lock_file_names = ("project-lock.yml", 'project-lock.yaml',
"conda-project-lock.yml", "conda-project-lock.yaml",
"anaconda-project-lock.yml", "anaconda-project-lock.yaml")

DEFAULT_PROJECT_LOCK_FILENAME = possible_project_lock_file_names[0]


class ProjectLockFile(YamlFile):
"""Represents the ``anaconda-project-lock.yml`` file which describes locked package versions."""
"""Represents the ``project-lock.yml`` file which describes locked package versions."""

template = '''
# This is an Anaconda project lock file.
# This is a Conda project lock file.
# The lock file locks down exact versions of all your dependencies.
#
# In most cases, this file is automatically maintained by the `anaconda-project` command or GUI tools.
# In most cases, this file is automatically maintained by the `conda-project` command or GUI tools.
# It's best to keep this file in revision control (such as git or svn).
# The file is in YAML format, please see http://www.yaml.org/start.html for more.
#
Expand Down
4 changes: 2 additions & 2 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set data = load_setup_py_data() %}

package:
name: anaconda-project
name: conda-project
version: {{ data.get('version') }}

source:
Expand All @@ -12,7 +12,7 @@ build:
noarch: python
script: pip install . --no-deps --ignore-installed --no-cache-dir
entry_points:
- anaconda-project = anaconda_project.cli:main
- conda-project = anaconda_project.cli:main
script_env:
- COVERAGE_DIR

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import io

setuptools.setup(
name='anaconda-project',
name='conda-project',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
keywords=["conda anaconda project reproducible data science"],
Expand All @@ -26,7 +26,7 @@
zip_safe=False,
install_requires=['anaconda-client', 'requests', 'ruamel_yaml', 'tornado>=4.2', 'jinja2'],
entry_points={'console_scripts': [
'anaconda-project = anaconda_project.cli:main',
'conda-project = anaconda_project.cli:main',
]},
packages=setuptools.find_packages(exclude=['contrib', 'docs', 'tests*']),
include_package_data=True,
Expand Down