Skip to content

Update docs with working testing instructions - #3937

Merged
peterjc merged 2 commits into
biopython:masterfrom
npars:update-testing-docs
Oct 21, 2022
Merged

peterjc merged 2 commits into
biopython:masterfrom
npars:update-testing-docs

Conversation

@npars

@npars npars commented May 20, 2022

Copy link
Copy Markdown
Contributor
  • I hereby agree to dual licence this and any previous contributions under both
    the Biopython License Agreement AND the BSD 3-Clause License.

  • I have read the CONTRIBUTING.rst file, have run pre-commit
    locally, and understand that continuous integration checks will be used to
    confirm the Biopython unit tests and style checks pass with these changes.

  • I have added my name to the alphabetical contributors listings in the files
    NEWS.rst and CONTRIB.rst as part of this pull request, am listed
    already, or do not wish to be listed. (This acknowledgement is optional.)

- PR biopython#3912 introduced changes that broke the existing testing
  instructions
- Update testing instructions to work with latest test scripts
- Test instructions now work with setup.py script as well as through the
  Intellij test runner
@peterjc

peterjc commented May 23, 2022

Copy link
Copy Markdown
Member

Good point, this needs fixing. I recall some pip changes about in-place builds, which may or may not be relevant here...

@npars

npars commented May 23, 2022

Copy link
Copy Markdown
Contributor Author

@peterjc do you have a link available? I found this thread where it's mentioned that build_ext -i isn't available through pip yet. Not sure if anything has changed since then or if there's another way to get local tests working without needing to install every time.

@peterjc

peterjc commented May 23, 2022

Copy link
Copy Markdown
Member

I was hoping you knew - I'm familiar with pip install -e . but apparently that maps to python setup.py develop?

@npars

npars commented May 23, 2022

Copy link
Copy Markdown
Contributor Author

I can give that a shot and see if it allows the tests to resolve the compiled modules correctly

- Use pip instead of setup.py where possible
@npars

npars commented May 24, 2022 •

Copy link
Copy Markdown
Contributor Author

@peterjc Local tests are working with the pip install -e . command. It creates the *.so libraries in place in the source tree. Updated the instructions accordingly.

@peterjc

peterjc commented May 24, 2022

Copy link
Copy Markdown
Member

Any second opinions about suggesting pip install -e . prior to running our tests? I've not sat down to review the latest Python packaging documentation on this area...

e.g. @mdehoon or @JoaoRodrigues

@npars

npars commented Jun 20, 2022

Copy link
Copy Markdown
Contributor Author

Any update on this @peterjc / @mdehoon / @JoaoRodrigues ?

@peterjc

peterjc commented Jun 20, 2022

Copy link
Copy Markdown
Member

Would the sudo install version now be redundant?

@JoaoRodrigues

Copy link
Copy Markdown
Member

This look good to me! Completely forgot about the testing instructions, thanks for catching this @npars !

@JoaoRodrigues

JoaoRodrigues commented Jun 20, 2022 •

Copy link
Copy Markdown
Member

Would the sudo install version now be redundant?

Yes.

Also: for the installation from source, I'd actually leave the -e option out and simply do pip install ..

@peterjc

peterjc commented Oct 21, 2022

Copy link
Copy Markdown
Member

Revisiting following #4140.

@etal Doing pip install . would touch the default Python's files, and if that is the system Python that would need admin rights (i.e. sudo).

@peterjc

peterjc commented Oct 21, 2022

Copy link
Copy Markdown
Member

This is the current suggestion on the PR:

pip install -e .
python setup.py test
sudo python setup.py install

@idoerg's suggestion on #4140 is:

python setup.py build
sudo python setup.py install
cd Tests
python run_tests.py

Note with setups like conda being more common, it less likely nowadays that sudo would be needed anymore, as you wouldn't need to touch the system Python. Personally for example, I am using:

pip install -e .
python setup.py test

@npars

npars commented Oct 21, 2022

Copy link
Copy Markdown
Contributor Author

My opinion is to just merge this as is since it will get the instructions working. If someone has a better approach than the instructions can be updated again in a follow up PR.

@peterjc
peterjc merged commit 5ecd329 into biopython:master Oct 21, 2022
@idoerg

idoerg commented Oct 21, 2022 via email

Copy link
Copy Markdown
Contributor

@peterjc

peterjc commented Oct 21, 2022

Copy link
Copy Markdown
Member

Certainly if we had merged this months ago, we'd have saved Iddo some pain.

The current diversity of Python installations (and sudo or not) probably makes a one-size-fits-all set of install instructions harder than it was 20 years ago.

@peterjc

peterjc commented Oct 21, 2022 •

Copy link
Copy Markdown
Member

pip install . (with an optional -e for developer mode) means install the source code in the current directory ., which in this case is a copy via git of the latest code.

P.S. This is different from pip install biopython which would get the latest Biopython release from PyPI, and doesn't care what is in the current directory.

peterjc added a commit to peterjc/biopython that referenced this pull request Apr 6, 2023
Should have done this around the time of biopython#3937,
old method broke as a result of biopython#3912
peterjc added a commit that referenced this pull request Apr 23, 2023
Should have done this around the time of #3937,
old method broke as a result of #3912
peterjc added a commit to peterjc/biopython that referenced this pull request Feb 5, 2024
Original author Zheng Ruan and contributors tracked by
version control have agreed:

 - Adhemar Zerlotini (@azneto)
   biopython#1412 (comment)
 - Benjamin Vaisvil (@bvaisvil)
   biopython#1613
 - Carlos Pena (@carlosp420)
   biopython#898 (comment)
 - Chris Rands (@chris-rands)
   biopython#1301
 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Juse (@JuseTiZ)
   biopython#4556
 - Michiel de Hoon (@mdehoon)
   biopython#898 (comment)
 - Micky Yun Chan (@michiboo)
   biopython#1983
 - @morrme
   biopython#1172 (comment)
 - Neil P. (@npars)
   biopython#3937
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Sergio Valqui (@svalqui)
   biopython#1749
 - Sujan Dulal (@Dsujan)
   biopython#2430
 - Travis Wrightsman (@twrightsman)
   biopython#898 (comment)
 - Zheng Ruan (@zruan)
   biopython#898 (comment)
peterjc added a commit that referenced this pull request Feb 5, 2024
Original author Zheng Ruan and contributors tracked by
version control have agreed:

 - Adhemar Zerlotini (@azneto)
   #1412 (comment)
 - Benjamin Vaisvil (@bvaisvil)
   #1613
 - Carlos Pena (@carlosp420)
   #898 (comment)
 - Chris Rands (@chris-rands)
   #1301
 - Christian Brueffer (@cbrueffer)
   #898 (comment)
 - Juse (@JuseTiZ)
   #4556
 - Michiel de Hoon (@mdehoon)
   #898 (comment)
 - Micky Yun Chan (@michiboo)
   #1983
 - @morrme
   #1172 (comment)
 - Neil P. (@npars)
   #3937
 - Peter Cock (@peterjc)
   #898 (comment)
 - Sergio Valqui (@svalqui)
   #1749
 - Sujan Dulal (@Dsujan)
   #2430
 - Travis Wrightsman (@twrightsman)
   #898 (comment)
 - Zheng Ruan (@zruan)
   #898 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants