Intelligent-Instruments-Lab / iil-dev

Development environment for working with IIL tools and repos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iil-dev

Development environment for working with Intelligent Instruments Lab tools and repos. Use this environment if you anticipate editing multiple Python packages, otherwise it might be simpler for you to pip install the individual package(s).

Each project is included as a git submodule. This means each project has its own separate git repo and history. You can also make commits to iil-dev which track which commit of each submodule is currently checked out. When you commit to iil-dev, you aren't committing your work on any of the projects -- you are committing a record of their current state in git.

So, always remember to commit your changes within each submodule. If you want to pin dev versions of several projects together, make a commit to iil-dev on your own branch. If you want to change this README or environment.yml, then commit to main of iil-dev.

Install

Clone with submodules:

git clone --recurse-submodules git@github.com:Intelligent-Instruments-Lab/iil-dev.git
cd iil-dev

Clone without submodules and then clone the submodules separately:

git clone git@github.com:Intelligent-Instruments-Lab/iil-dev.git
cd iil-dev
git submodule update --init --recursive

conda

We manage Python versions, non-python dependencies and environments with conda. If you don't have an anaconda/miniconda/miniforge python install already, download a miniforge installer and run it in a terminal (we recommend miniconda). Afterwards, verify with which python -- it should have miniforge in the path.

Now set up the conda Python environment (from within the iil-dev directory):

conda env create -f environment.yml
conda activate iil-dev-env

This will create a conda environment called iil-dev with the poetry tool installed.

Installing individual packages

Now that you have gotten this far, you can make with editable installs of the git submodules in this repo by running poetry install inside of each project, e.g.:

cd anguilla
git checkout main
poetry install

Updating dependencies

We use poetry to manage other dependencies. To add a new dependency to a project, cd into the project (e.g., anguilla, tolvera) and use poetry add, or edit pyproject.toml, then use poetry install.

Test

In a project directory, run pytest.

Release

If you are an owner of a project on PyPI, to make a release:

  1. within the project submodule, make a branch for the release, e.g. git checkout -b v0.1.2
  2. edit pyproject.toml to change any path dependencies to normal pypi dependencies, and update the version number
  3. use poetry build to make sure the project builds
  4. add your PyPI API key to poetry using poetry config pypi-token.pypi <token>
  5. double check the current version number and use poetry publish --build

Contact

Developed by the Intelligent Instruments Lab. Get in touch to collaborate:

iil.isFacebookInstagramX (Twitter)YouTubeDiscordGitHubLinkedInEmail

Funding

The Intelligent Instruments project (INTENT) is funded by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (Grant agreement No. 101001848).

About

Development environment for working with IIL tools and repos

License:MIT License