Skip to content

Commit

Permalink
update versions to make a little more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
julie-sullivan committed Jul 25, 2019
1 parent 8081981 commit b8f8114
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 67 deletions.
76 changes: 11 additions & 65 deletions docs/database/data-sources/versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ InterMine JARs are versioned

The JAR for each InterMine package is versioned. This version is set in the `build.gradle` for that package.

For example, the latest InterMine version is set in the `build.gradle <https://github.com/intermine/intermine/blob/dev/bio/sources/build.gradle#L24>`_ file for InterMine's bio-sources. If the version is set to be `2.3.4` in that file, for example, the JARs on Maven will be available for that version, e.g. "bio-source-uniprot-2.3.4.jar".

InterMine uses `semantic versioning <https://semver.org/>`_, which means:
For example, the latest InterMine version is set in the `build.gradle <https://github.com/intermine/intermine/blob/dev/bio/sources/build.gradle#L24>`_ file for InterMine's bio-sources. InterMine uses `semantic versioning <https://semver.org/>`_, which means:

MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards-compatible manner, and
PATCH version when you make backwards-compatible bug fixes.

For now, all InterMine JARs have the same version by default.

How do I specify which version JAR to generate for my own data sources?
How do I specify a version for my own data sources?
---------------------------------------------------------------------------------------------------

To specify the version for your mine's custom source, you would edit the `version` value in the `build.gradle` file in your `/bio-sources` directory. When you install your source, the JAR of the correct version will be created.
Expand All @@ -40,77 +36,27 @@ You will get an error if it can't find a JAR with this version. Note that this i

If no version is provided, the default InterMine version is used. For InterMine's bio sources, a global variable is set in the `gradle.properties` file in your mine.

Default InterMine Versions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: properties
# in your mine gradle.properties
systemProp.imVersion=3.1.+
systemProp.bioVersion=3.1.+
These are global variables used by the build system. If you do not specify a version in your project XML for a source, the `systemProp.bioVersion` value is used by default.

See FlyMine's `gradle.properties <https://github.com/intermine/flymine/blob/master/gradle.properties#L1-L2>`_ file for an example.

Which version should I use?
------------------------------------------------------------------

The plus sign is interpreted by Maven to mean "get the latest version." e.g. `3.1.+` will retrieve intermine-api-3.1.0.jar and `2.+` will retrieve `intermine-api-2.1.1.jar`. `

It will be up to you how strict you want to be with version numbers. You have several options:

OPTION 1: Get me the ABSOLUTE latest version always
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

That would look like this:
You can look in the maven directory to make sure the correct versioned JARs are being created.

.. code-block:: properties

# in your mine gradle.properties
systemProp.imVersion=+
systemProp.bioVersion=+

No. First, I don't think that would even work. Second, the MAJOR version changes are by definition not backwards compatible so this would break your code.

OPTION 2: Get me the latest updates automatically
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

That would look like this:

.. code-block:: properties

# in your mine gradle.properties
systemProp.imVersion=3.+
systemProp.bioVersion=3.+
.. code-block:: guess
This is the easiest option, and should be okay as the MINOR updates are backwards compatible. However, MINOR versions can introduce new features so this option isn't suitable for production mines.
# see your JARs in your maven directory
~/.m2/repository/org/intermine/bio-source-gtex $ ls
4.0.0 maven-metadata-local.xml
OPTION 3: Get me the latest patches
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
That would look like this:
Default InterMine Versions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: properties
# in your mine gradle.properties
systemProp.imVersion=3.1.+
systemProp.bioVersion=3.1.+
Default option. Includes all patches automatically but not new features. Recommended for dev mines.


OPTION 4: Only get me the exact version I specify
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

That would look like this:

.. code-block:: properties
These are global variables used by the build system. If you do not specify a version in your project XML for a source, the `systemProp.bioVersion` value is used by default.

# in your mine gradle.properties
systemProp.imVersion=3.1.0
systemProp.bioVersion=3.1.0
See FlyMine's `gradle.properties <https://github.com/intermine/flymine/blob/master/gradle.properties#L1-L2>`_ file for an example.

Safest option because you will be able to test on the exact code. Recommended for production mines.

.. index:: version, semantic versioning, JAR version, systemProp, imVersion, bioVersion
2 changes: 1 addition & 1 deletion docs/get-started/create-your-mine.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Create Your InterMine!
Create Your Own InterMine!
==============================

This guide will show you how to create a new InterMine. You will need all the dependencies listed in :doc:`/system-requirements/software/index`.
Expand Down
2 changes: 1 addition & 1 deletion docs/system-requirements/software/git.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ InterMine source code is available via `GitHub <https://github.com/intermine/int
Getting started
--------------------------------------------

See :doc:`/get-started/create-your-mine` for instructions on how to create a new InterMine.
See :doc:`/get-started/quick-start` or :doc:`/get-started/create-your-mine` for instructions on how to create a new InterMine.

Local Installation (for advanced users)
--------------------------------------------
Expand Down

0 comments on commit b8f8114

Please sign in to comment.