Skip to content

Commit

Permalink
Merge pull request #25 from ericdill/handle-fully-qualified-channels
Browse files Browse the repository at this point in the history
Handle fully qualified channels
  • Loading branch information
parente authored Feb 7, 2017
2 parents e8d93c8 + 32ed8d9 commit 3337c24
Show file tree
Hide file tree
Showing 4 changed files with 302 additions and 159 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ language: python
python:
- 3.4
- 3.5
- 3.6

install:
- git clone https://github.com/ericdill/ci ~/scripts
- . ~/scripts/install-miniconda.sh
- conda install python=$TRAVIS_PYTHON_VERSION pip conda-build
- conda update --all
- pip install -r test-requirements.txt
- pip install codecov
- pip install -e .
Expand Down
45 changes: 26 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,28 +95,35 @@ whitelist:
## CLI
```
$ conda-mirror -h
['/home/edill/miniconda/bin/conda-mirror', '-h']
usage: conda-mirror [-h] --upstream-channel UPSTREAM_CHANNEL
--target-directory TARGET_DIRECTORY
[--temp-directory TEMP_DIRECTORY] --platform PLATFORM [-v]
[--config CONFIG] [--pdb]
usage: conda-mirror [-h] [--upstream-channel UPSTREAM_CHANNEL]
[--target-directory TARGET_DIRECTORY]
[--temp-directory TEMP_DIRECTORY] [--platform PLATFORM]
[-v] [--config CONFIG] [--pdb] [--version]

CLI interface for conda-mirror.py

optional arguments:
-h, --help show this help message and exit
--upstream-channel UPSTREAM_CHANNEL
The anaconda channel to mirror
The target channel to mirror. Can be a channel on
anaconda.org like "conda-forge" or a full qualified
channel like "https://repo.continuum.io/pkgs/free/"
--target-directory TARGET_DIRECTORY
The place where packages should be mirrored to
--temp-directory TEMP_DIRECTORY
Temporary download location for the packages
Temporary download location for the packages. Defaults
to a randomly selected temporary directory. Note that
you might need to specify a different location if your
default temp directory has less available space than
your mirroring target
--platform PLATFORM The OS platform(s) to mirror. one of: {'linux-64',
'linux-32','osx-64', 'win-32', 'win-64'}
-v, --verbose This basically turns on tqdm progress bars for
downloads
-v, --verbose logging defaults to error/exception only. Takes up to
three '-v' flags. '-v': warning. '-vv': info. '-vvv':
debug.
--config CONFIG Path to the yaml config file
--pdb Enable PDB debugging on exception
--version Print version and quit
```

## Testing
Expand All @@ -136,21 +143,21 @@ Requirement already satisfied: py>=1.4.29 in /home/edill/miniconda/lib/python3.5
### Run the tests, invoking with the `coverage` tool.

```
$ coverage run run_tests.py -x
sys.argv=['run_tests.py', '-x']
================================================================================== test session starts ===================================================================================
platform linux -- Python 3.5.2, pytest-3.0.4, py-1.4.31, pluggy-0.4.0 -- /home/edill/miniconda/bin/python
$ coverage run run_tests.py
sys.argv=['run_tests.py']
========================================= test session starts ==========================================
platform linux -- Python 3.5.3, pytest-3.0.6, py-1.4.31, pluggy-0.4.0 -- /home/edill/miniconda/bin/python
cachedir: .cache
rootdir: /home/edill/dev/maxpoint/conda-mirror, inifile:
plugins: xonsh-0.4.7, ordering-0.4
rootdir: /home/edill/dev/maxpoint/github/conda-mirror, inifile:
plugins: xonsh-0.5.2, ordering-0.4
collected 4 items
test/test_conda_mirror.py::test_match PASSED
test/test_conda_mirror.py::test_cli[anaconda-linux-64] PASSED
test/test_conda_mirror.py::test_cli[https://repo.continuum.io/pkgs/free-linux-64] PASSED
test/test_conda_mirror.py::test_cli[conda-forge-linux-64] PASSED
test/test_conda_mirror.py::test_handling_bad_package PASSED
=============================================================================== 4 passed in 15.66 seconds ================================================================================
======================================= 4 passed in 4.41 seconds =======================================
```

### Show the coverage statistics
Expand All @@ -160,9 +167,9 @@ $ coverage report -m
Name Stmts Miss Cover Missing
------------------------------------------------------------
conda_mirror/__init__.py 3 0 100%
conda_mirror/conda_mirror.py 210 16 92% 176, 219-221, 226-232, 244, 369, 413-414, 492
conda_mirror/conda_mirror.py 236 20 92% 203-205, 209-210, 214, 240, 249-254, 262-264, 303, 366, 497, 542-543, 629
------------------------------------------------------------
TOTAL 213 16 92%
TOTAL 239 20 92%
```

## Other
Expand Down
Loading

0 comments on commit 3337c24

Please sign in to comment.