Skip to content

Commit

Permalink
fix outdated conda run --help
Browse files Browse the repository at this point in the history
Signed-off-by: Kale Franz <[email protected]>
  • Loading branch information
kalefranz committed Aug 20, 2018
1 parent 82b2b27 commit 30fd0b0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion conda/cli/conda_argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ def configure_parser_run(sub_parsers):
Example usage:
$ conda create -y -n my-python-2-env python=2
$ conda run -n my-python-2-env python -- --version
$ conda run -n my-python-2-env python --version
""")

epilog = dedent("""
Expand Down
2 changes: 1 addition & 1 deletion conda/models/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def record_id(self):
# the official record_id / uid until it gets namespace. Even then, we might
# make the format different. Probably something like
# channel_name/subdir:namespace:name-version-build_number-build_string
return "%s/%s::%s-%s-%s" % (self.channel.canonical_name, self.subdir,
return "%s/%s::%s-%s-%s" % (self.channel.name, self.subdir,
self.name, self.version, self.build)


Expand Down
7 changes: 4 additions & 3 deletions tests/data/build-index2-json.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import json
from os.path import dirname, join
from os.path import abspath, dirname, join

from conda.core.subdir_data import fetch_repodata_remote_request

DATA_DIR = abspath(join(dirname(__file__), "..", "..", "test-data", "repodata"))

def save_data_source(url, name):
raw_repodata_str = fetch_repodata_remote_request(url, None, None)
json.loads(raw_repodata_str)
with open(join(dirname(__file__), "repodata", name + ".json"), 'w') as fh:
with open(join(DATA_DIR, name + ".json"), 'w') as fh:
json.dump(json.loads(raw_repodata_str), fh, indent=2, sort_keys=True, separators=(',', ': '))


def read_data_source(name):
with open(join(dirname(__file__), "repodata", name + ".json")) as fh:
with open(join(DATA_DIR, name + ".json")) as fh:
return json.load(fh)


Expand Down
9 changes: 5 additions & 4 deletions tests/data/build-index4-json.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import json
from os.path import dirname, join
from os.path import abspath, dirname, join
from pprint import pprint

from conda.core.subdir_data import fetch_repodata_remote_request
from conda.common.compat import itervalues
from conda.core.subdir_data import fetch_repodata_remote_request

DATA_DIR = abspath(join(dirname(__file__), "..", "..", "test-data", "repodata"))

def save_data_source(url, name):
raw_repodata_str = fetch_repodata_remote_request(url, None, None)
json.loads(raw_repodata_str)
with open(join(dirname(__file__), "repodata", name + ".json"), 'w') as fh:
with open(join(DATA_DIR, name + ".json"), 'w') as fh:
json.dump(json.loads(raw_repodata_str), fh, indent=2, sort_keys=True, separators=(',', ': '))


def read_data_source(name):
with open(join(dirname(__file__), "repodata", name + ".json")) as fh:
with open(join(DATA_DIR, name + ".json")) as fh:
return json.load(fh)


Expand Down
7 changes: 4 additions & 3 deletions tests/data/build-index5-json.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import json
from os.path import dirname, join
from os.path import abspath, dirname, join
from pprint import pprint

from conda.core.subdir_data import fetch_repodata_remote_request

DATA_DIR = abspath(join(dirname(__file__), "..", "..", "test-data", "repodata"))

def save_data_source(url, name):
raw_repodata_str = fetch_repodata_remote_request(url, None, None)
json.loads(raw_repodata_str)
with open(join(dirname(__file__), "repodata", name + ".json"), 'w') as fh:
with open(join(DATA_DIR, name + ".json"), 'w') as fh:
json.dump(json.loads(raw_repodata_str), fh, indent=2, sort_keys=True, separators=(',', ': '))


def read_data_source(name):
with open(join(dirname(__file__), "repodata", name + ".json")) as fh:
with open(join(DATA_DIR, name + ".json")) as fh:
return json.load(fh)


Expand Down

0 comments on commit 30fd0b0

Please sign in to comment.