Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency management workflow #3771

Merged
merged 93 commits into from
Mar 9, 2020
Merged

Conversation

csadorf
Copy link
Contributor

@csadorf csadorf commented Feb 19, 2020

Initial pass at starting to update the dependency workflow.

@csadorf csadorf requested a review from ltalirz February 19, 2020 17:58
@csadorf
Copy link
Contributor Author

csadorf commented Feb 20, 2020

@ltalirz I'm investigating the CI issues right now.

@ltalirz
Copy link
Member

ltalirz commented Feb 20, 2020

@csadorf I've started pinning down the postgres issue, see my post here #3762

The wrapt issue in pre-commit is easy to fix - just replace the dependency by wrapt~=1.11.1

@csadorf
Copy link
Contributor Author

csadorf commented Feb 20, 2020

Looks like all directly PR-related issues are resolved here. I'll wait for the postgres CI issue to be resolved upstream.

Copy link
Member

@ltalirz ltalirz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @csadorf !
CI tests are fixed now - I'm sure we can get this Pr through next week.

Until then one question from my side

.github/CODEOWNERS Outdated Show resolved Hide resolved
Copy link
Member

@ltalirz ltalirz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @csadorf - a few comments from my side.

Furthermore, I read AEP 002 in such a way that we should actually provide a working requirements.txt file, and I suggest we commit it to the aiida repository (perhaps something to discuss with @sphuber).
This will be important to ensure that we are still able to pip install aiida-core 1.1.0, say, in 2 years.

This should come with a CI test that installs aiida using the fixed requirements.txt.
Note: This also highlights the limitation of the pip freeze approach over others (like pipfile / ...), namely that there is no concept of the extra_requirements, i.e. we have to decide which of them to include (if any).

utils/dependency_management.py Outdated Show resolved Hide resolved
utils/dependency_management.py Outdated Show resolved Hide resolved
utils/dependency_management.py Outdated Show resolved Hide resolved
utils/dependency_management.py Outdated Show resolved Hide resolved
@sphuber
Copy link
Contributor

sphuber commented Mar 3, 2020

Is it really necessary to vendor toml?

@csadorf
Copy link
Contributor Author

csadorf commented Mar 3, 2020

Is it really necessary to vendor toml?

Of course not, but is there a strong reason against it?

@sphuber
Copy link
Contributor

sphuber commented Mar 3, 2020

Is it really necessary to vendor toml?

Of course not, but is there a strong reason against it?

Well it adds a lot of code to the repository that also has to then be maintained as well. Is this just necessary for the build system? If so, why can't this just be a dependency?

@csadorf
Copy link
Contributor Author

csadorf commented Mar 3, 2020

Is it really necessary to vendor toml?

Of course not, but is there a strong reason against it?

Well it adds a lot of code to the repository that also has to then be maintained as well. Is this just necessary for the build system? If so, why can't this just be a dependency?

It's a dependency of the dependency_management.py script. I will need to install it everywhere I want to use that script. It's what other build-related packages do as well (like setuptools, etc.).

I'll just remove it since this appears to be an issue.

@csadorf csadorf changed the title Misc/dependency management [WIP] Update dependency management workflow Mar 3, 2020
@csadorf csadorf force-pushed the misc/dependency-management branch 2 times, most recently from 8948662 to 060fde4 Compare March 4, 2020 17:31
@codecov-io
Copy link

codecov-io commented Mar 4, 2020

Codecov Report

Merging #3771 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #3771   +/-   ##
========================================
  Coverage    77.16%   77.16%           
========================================
  Files          458      458           
  Lines        33770    33770           
========================================
  Hits         26058    26058           
  Misses        7712     7712
Flag Coverage Δ
#django 69.2% <ø> (ø) ⬆️
#sqlalchemy 70.02% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 035fbba...75f609a. Read the comment docs.

@csadorf csadorf force-pushed the misc/dependency-management branch 3 times, most recently from 3d9bfb5 to 564ff22 Compare March 5, 2020 15:11
@csadorf csadorf force-pushed the misc/dependency-management branch from 89a8b3e to 0f0899a Compare March 9, 2020 16:23
@csadorf
Copy link
Contributor Author

csadorf commented Mar 9, 2020

The failing pre-commit jobs will be resolved with #3837 .

Copy link
Member

@ltalirz ltalirz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, there is one small typo that should be corrected.
Apart from that, just some minor left-over comments from my previous review

- 'environment.yml'
- 'requirements*.txt'
- 'pyproject.toml'
- '.github/workflows/test-install.sh'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- '.github/workflows/test-install.sh'
- '.github/workflows/test-install.yml'

csadorf added 6 commits March 9, 2020 18:40
Since the environments only differ across python versions, not backends.
The recent update to Click (7.1) breaks our tests and this CI workflow,
because the help output formatting was slightly changed.

Until we have resolved other issues we should pin the Click version to
7.0.
@csadorf csadorf force-pushed the misc/dependency-management branch from 1011093 to 51ecd99 Compare March 9, 2020 17:41
@ltalirz ltalirz self-requested a review March 9, 2020 17:42
ltalirz
ltalirz previously approved these changes Mar 9, 2020
Copy link
Member

@ltalirz ltalirz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, let's go!

@csadorf
Copy link
Contributor Author

csadorf commented Mar 9, 2020

Alright, let's go!

@ltalirz I'll finalize and merge. 👍

@csadorf csadorf self-assigned this Mar 9, 2020
@csadorf
Copy link
Contributor Author

csadorf commented Mar 9, 2020

@ltalirz I am very sorry, I still needed to remove the trigger for running all workflows on this branch. I did not realize that we had automatic dismissal of review approvals enabled.

It appears that unfortunately the latest run is having some (unrelated?) issues. They can probably be addressed by simply restarting the workflows.

Please merge at your discretion; this is the proposed commit-message for the squashed merge:

Revise dependency management workflow in accordance with AEP 002.

  • Use .github/CODEOWNERS file to trigger reviews from
    dependency-manager team.
  • All jobs related to testing the installation of aiida-core with
    different tools (pip, conda) on different python versions and backends
    are moved into the dedicated 'install-tests' workflow.
  • The test jobs run as part of the continuous integration on every push
    are executed against pinned environments (e.g.
    'requirements/requirement-py-37.txt').
  • The 'install-tests' workflow is triggered for the 'master', 'develop',
    and release branches ('release/*') as well as branches related to
    dependency-management (prefixed with 'dm/'). In addition, the workflow
    is triggered nightly to ensure that changes within the Python ecosystem
    that break our toolchain and possibly even tests, are automatically
    detected within 24 hours.
  • A new 'update-requirements' workflow is run on release branches and
    automatically creates a pull request with revised versions of
    requirements files.
  • The issues caused by pymatgen's use of setup_requires and previously
    addressed by installing numpy prior to aiida by default, are now
    addressed by specifically checking the setuptools version for Python
    3.5 only. We fail the installation process with a descriptive message
    to the user in case that the installed setuptools version is
    insufficient.
  • All dependency-management related utility functions, such as
    generating and validating non-authoritive dependency specification files
    (e.g. 'environment.yml') are concentrated into the
    'util/dependency_management.py' scripting file.

The complete workflow is described in detail as part of the Dependency
Management page within the wiki.

@csadorf
Copy link
Contributor Author

csadorf commented Mar 9, 2020

@italirz looks like it's ready to merge.

@ltalirz ltalirz self-requested a review March 9, 2020 18:54
@ltalirz
Copy link
Member

ltalirz commented Mar 9, 2020

Ehm... what happened there?
Screenshot 2020-03-09 at 19 55 52

Looks like your PR is cursed ;-)

@ltalirz
Copy link
Member

ltalirz commented Mar 9, 2020

Ah, I see - was just the wrong default setting

@ltalirz ltalirz merged commit 7e99c06 into develop Mar 9, 2020
@ltalirz ltalirz mentioned this pull request Mar 9, 2020
@ltalirz
Copy link
Member

ltalirz commented Mar 9, 2020

Interesting - it seems like the new workflows are immediately applied on existing open PRs

Screenshot 2020-03-09 at 20 03 12

@csadorf
Copy link
Contributor Author

csadorf commented Mar 9, 2020

I think they're yellow, because I changed the expected tests. PR authors will need to either rebase or merge develop to trigger the execution of the new workflows.

@sphuber sphuber deleted the misc/dependency-management branch March 27, 2020 11:12
@csadorf csadorf mentioned this pull request Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test on all supported Python versions
4 participants