Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
04054fa
Specify IC environment in new shell.nix file
jacg Jul 2, 2020
a8e03b3
Make git ignore nix-direnv caches
jacg Jul 2, 2020
10e1358
Switch travis to from manage.sh to Nix
jacg Jul 2, 2020
acc597a
Remove manage.sh and bash_manage.sh
jacg Jul 2, 2020
facc741
Add Nix documentation
jacg Jul 2, 2020
f2a745a
Add instruction for checking if Nix is installed
jacg Jul 2, 2020
1ffde26
Update main README for Nix
jacg Jul 2, 2020
0d09a40
Allow selection of python version in shell.nix
jacg Jul 2, 2020
f6d6c14
Turn pytest-instafail into a function
jacg Jul 3, 2020
920e484
Run Travis on py=38 as well as py=37
jacg Jul 3, 2020
e6ce833
Rename py-version -> py
jacg Jul 3, 2020
bc88802
Turn commit-id into a parameter
jacg Jul 3, 2020
0ce6745
Make home-manager create .config link to itself
jacg Jul 7, 2020
ec3c6d9
TODO: update download URL BEFORE this branch is merged
jacg Jul 7, 2020
6601590
Bump NixOS version to 20.09
jacg Dec 16, 2020
6859092
Add py=39 as allowed failure to Travis
jacg Dec 16, 2020
cffedfd
Bump default Python version 3.7 -> 3.8
jacg Dec 16, 2020
8c86cd4
Revert "Bump default Python version 3.7 -> 3.8"
jacg Dec 17, 2020
8fcf161
Revert "Bump NixOS version to 20.09"
jacg Dec 17, 2020
d800884
Revert "Add py=39 as allowed failure to Travis"
jacg Dec 17, 2020
2b1bd92
Fix Python version selection on Travis
jacg Dec 17, 2020
059aa9b
Pin nixos-20.09-compatible home-manager
jacg Dec 17, 2020
0f775f6
Add .envrc
jacg Dec 17, 2020
7f4f328
Enable Git LFS
jacg Dec 17, 2020
8ed9422
Bump nixpkgs hash
jacg Jan 19, 2021
758d273
Switch GitHub action from Conda to Nix
jacg Feb 9, 2021
d412f9e
Add macos-latest to GitHub Action
jacg Feb 9, 2021
b395bbe
Add python 3.8 to GitHub Action matrix
jacg Feb 9, 2021
66fd82d
Bump nixpkgs-commit-id
jacg Feb 9, 2021
3c74968
Stop setting HYPOTHESIS_PROFILE=travis-ci
jacg Feb 9, 2021
6bfca43
Specify nixpks in install-nix-action
jacg Feb 10, 2021
df01943
Disable Travis
jacg Feb 10, 2021
a83a56b
Replace deprecated check_less_precise
jacg Feb 10, 2021
632f281
Attempt and fail to replace mark.serial with mark.order
jacg Feb 11, 2021
eac1a09
Revert "Attempt and fail to replace mark.serial with mark.order"
jacg Feb 11, 2021
0065a54
Attempt and fail to replace mark.serial with mark.dependency
jacg Feb 11, 2021
3611f37
Revert "Attempt and fail to replace mark.serial with mark.dependency"
jacg Feb 11, 2021
8fdc3cd
Temporarily skip test which fails because of Pandas API change
jacg Feb 11, 2021
ddbf2ef
Bump default Python version 3.7 -> 3.8
jacg Feb 11, 2021
70c4bcb
Force pytest colours in nix-shell
jacg Feb 13, 2021
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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
22 changes: 8 additions & 14 deletions .github/workflows/test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,19 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7]
#platform: [ubuntu-18.04, macos-latest]
platform: [ubuntu-18.04]
python-version: [37, 38]
platform: [ubuntu-18.04, macos-latest]
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Get LFS files
run: git lfs pull
# - name: Fix Conda permissions on macOS
# run: sudo chown -R $UID $CONDA
# if: runner.os == 'macOS'
- name: Install IC
run: |
source $CONDA/etc/profile.d/conda.sh
source manage.sh work_in_python_version_no_tests ${{ matrix.python-version }}
run: nix-shell --argstr py ${{ matrix.python-version }}
- name: Run tests
run: |
source $CONDA/etc/profile.d/conda.sh
source manage.sh work_in_python_version_no_tests ${{ matrix.python-version }}
HYPOTHESIS_PROFILE=travis-ci bash manage.sh run_tests_par

run: nix-shell --argstr py ${{ matrix.python-version }} --run "PYTEST_ADDOPTS=--color=yes ic-test-par"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ miniconda.sh

# macOS
.DS_Store

# nix-direnv environment caching
.direnv
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

41 changes: 21 additions & 20 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,44 +1,45 @@
IC: Invisible Cities
==============================================

IC stands for Invisible Cities and also for Italo Calvino, the author of the master piece.
IC stands for Invisible Cities and also for Italo Calvino, the author of the master piece.

Quickstart guide
----------------

+ Make sure you have `git lfs` installed (https://git-lfs.github.com/)
+ Make sure that `Nix is installed <doc/nix/install-nix/README.md>`_ on your machine

+ Make sure that `home-manager is installed <doc/nix/home-manager/README.md>`_ for your user

+ Clone the repository

+ :code:`cd` into the `IC` directory
+ :code:`cd` into the `IC` directory you have just cloned

+ :code:`source manage.sh work_in_python_version 3.7`
+ :code:`direnv allow`

The last step will, if necessary, install conda and create an
appropriate conda environment, as well as setting environment
variables which are needed for the correct functioning of IC.
+ :code:`ic-test-par`

The installation steps will be skipped if conda and the required
environment are already available, so subsequent invocations of the
command should be much quicker than the first.
The last step launches an exhaustive set of IC tests. If these pass, you can be
confident that everything has been configured as it should.

You will need to perform the last two steps in every shell in which
you want to run IC.
The :code:`cd /path/to/IC` step is the only one you will have to repeat, on a
machine on which these steps have already been carried out, in order to resume
work on IC.

To check your progress when you are developing, you will want to
compile any Cython components that have changed and run the test
suite. This can be done with
To check your progress when you are developing, you will want to compile any
Cython components that have changed and run the test suite. This can be done
with

.. code-block::

source manage.sh compile_and_test_par
ic-compile && ic-test-par

If you check out a commit which requires an older set of dependencies,
the :code:`compile_and_test` commands will automatically switch to an
appropriate environment, creating it on the fly if necessary.
If you check out a commit which requires an older set of dependencies, Nix,
`home-manager` and `direnv` will together ensure that you automatically switch
to an appropriate environment, creating it on the fly if necessary, without you
having do do anything at all, other than maybe waiting for downloads of older
packages to complete.

:Travis CI: |travis|

.. |travis| image:: https://img.shields.io/travis/nextic/IC.png
:target: https://travis-ci.org/nextic/IC

90 changes: 0 additions & 90 deletions bash_manage.sh

This file was deleted.

Loading