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

Automatic developer environment creation #470

Draft
wants to merge 54 commits into
base: master
Choose a base branch
from

Conversation

teald
Copy link
Member

@teald teald commented Dec 20, 2024

Summary

This PR creates a new, automated development environment for DRAGONS using nox. It works with venv and conda, following the current steps outlined in README.md + some quality of life checks.

It also introduces pre-commit hooks to the repository, which:

  • Format code (including MarkDown and Python files)
  • Check for large files being committed
  • Uniform file endings
  • Trim trailing whitespace
  • Other tidying things

Other changes of note

  • This PR serves as the initial formatting/lint of the entire codebase
    • These commits are labeled with chore([lint|format]): and are added to .git-blame-ignore-revs to preserve our commit history for, e.g., git blame
  • Adds new developer documentation outlining our development toolkit, requirements, and other important notes for those developing with DRAGONS
  • This is the start of the process for migrating testing automations from tox to nox
    • This adds native automation conda environment support, pure-python automation files, and better environment/build control and resolution without all the tox baggage
  • Some chores are folded in, specifically:
    • Moving archived files from the main repository into archived/ directory

TODO

  • Add developer shell instructions
    • README.md
    • Developer Documentation
  • Developer documentation
    • Add guide for making a branch conformant that is not yet using the formatting/linter

@teald teald self-assigned this Dec 20, 2024
@teald teald added enhancement Performance or usage improvement continuous integration Continuous integration issues test Test suite, regression and integration tests, Jenkins. documentation 📚 Improvements or additions to documentation dependencies Pull requests that update a dependency file labels Dec 20, 2024
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 87.17949% with 5 lines in your changes missing coverage. Please review.

Project coverage is 63.83%. Comparing base (a9c483d) to head (b027496).

Files with missing lines Patch % Lines
gemini_instruments/flamingos/adclass.py 0.00% 2 Missing ⚠️
gemini_instruments/igrins/adclass.py 0.00% 1 Missing ⚠️
geminidr/ghost/polyfit/polyspect.py 0.00% 1 Missing ⚠️
geminidr/gmos/lookups/bpmtab.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #470      +/-   ##
==========================================
- Coverage   63.88%   63.83%   -0.05%     
==========================================
  Files         314      314              
  Lines       38964    38985      +21     
==========================================
- Hits        24892    24887       -5     
- Misses      14072    14098      +26     
Flag Coverage Δ
f2 25.84% <41.02%> (-0.03%) ⬇️
ghost 30.55% <41.02%> (-0.03%) ⬇️
gmos 29.32% <38.46%> (-0.03%) ⬇️
gmosls 35.47% <38.46%> (-0.03%) ⬇️
gnirs 30.61% <41.02%> (-0.03%) ⬇️
gsaoi 17.32% <38.46%> (-0.02%) ⬇️
niri 26.03% <38.46%> (-0.03%) ⬇️
regression 32.09% <84.61%> (-0.03%) ⬇️
slow 50.23% <41.02%> (-0.04%) ⬇️
unit 46.80% <41.02%> (-0.04%) ⬇️
wavecal 24.63% <41.02%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

teald added 23 commits December 23, 2024 09:33
Taking this out, since it seems more of a liability than anything that
needs to be supported right now. Plus, it's probably better to have `nox
-s devenv` the same for everyone who uses it.
This adds a placeholder entry in the pyproject.toml, which will be
replaced with the dependency manager before merging.
teald added 29 commits December 23, 2024 09:33
These are default hooks that come with pre-commit.
Most changes are trailing lines. There are some changes to docstrings to
either add them (in cases where header comments were used) or rectify
non-conformant python code (e.g., tabbing issues).

REBASE: Deferred to master branch.
This session just run pre-commit, which should be handling all
linting/formatting/etc.
REBASE: Deferred to master branch
It's about to be deprecated, and it's useful to have tomllib around.
This is to provide all pythons to `nox`; if a user doesn't have a python
version installed, they cannot make an environment with the correct one.
Ensure environment exists before attempting removal, skip if it does
exist.
@teald teald force-pushed the feature/developer-environment branch from b32d74c to b027496 Compare December 23, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous integration Continuous integration issues dependencies Pull requests that update a dependency file documentation 📚 Improvements or additions to documentation enhancement Performance or usage improvement test Test suite, regression and integration tests, Jenkins.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant