Olav Vahtras vahtras KTH Stockholm Professor of Theoretical Chemistry Software/Data Carpentry Instructor Co-editor of SciPy Lecture Notes

Scientific libraries

Testing with pytest

Testing

Software Carpentry bootcamp at Leiden Observatory

We also have that a mathematical interval [x, y) is more like a set of numbers and fundamentally different from a Python sequence of numbers where there is an implied order.

On Tue, Jan 4, 2022 at 11:02 AM Alex Ball ***@***.***> wrote:

According to the Wikipedia link (and this is indeed how I remember it) mathematical interval notation uses a comma rather than a colon for separating the limits. To make it clearer that this isn't Python, perhaps it would be better to have [start, stop) or, even better, avoid the monospace and write it [start, stop).

— Reply to this email directly, view it on GitHub https://github.com/swcarpentry/python-novice-gapminder/pull/570#issuecomment-1004672259, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLLJBOFK3ADZTJFY3YGXBTUULAVFANCNFSM5D3FQNDA . You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>

vinisalazar

comment created time in 15 days

I agree here, random.choice is the easiest to read, most intuitive solution, and should be included

Olav

On Tue, Jan 4, 2022 at 12:02 PM Alex Ball ***@***.***> wrote:

The challenge "Locating the right module http://swcarpentry.github.io/python-novice-gapminder/06-libraries/index.html#locating-the-right-module" has several solutions, but I think the most obvious one is missing.

The solutions given are:

print(bases[random.randrange(len(bases))])print(bases[random.randint(0, len(bases) - 1)]) # impliedprint(random.sample(bases, 1)[0])

with the postscript "[There are] also other functions you could use, but with more convoluted code as a result." What about this?

print(random.choice(bases))

This is, I would argue, the most keystroke-efficient solution and most intuitive to read; it certainly does not fall into the "more convoluted" category. Is the reason for missing it out because it answers exactly the use case in the challenge, and is therefore not applicable to adjacent challenges (e.g. picking more than one distinct character; doing something else with the index)?

— Reply to this email directly, view it on GitHub https://github.com/swcarpentry/python-novice-gapminder/issues/581, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLLJBPB7TALN5KLQ3R4PVTUULHUZANCNFSM5LHFQEZA . You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>

alex-ball

comment created time in 15 days

created repositoryvahtras/testaction1

created time in a month

PR merged vahtras/introduction

Bump jinja2 from 2.10.1 to 2.11.3 dependencies

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

• `@dependabot rebase` will rebase this PR
• `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
• `@dependabot merge` will merge this PR after your CI passes on it
• `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
• `@dependabot cancel merge` will cancel a previously requested merge and block automerging
• `@dependabot reopen` will reopen this PR if it is closed
• `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
• `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
• `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
• `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
• `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
• `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
• `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
• `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+1 -1

0 comment

1 changed file

dependabot[bot]

pr closed time in a month

push eventvahtras/introduction

Bump jinja2 from 2.10.1 to 2.11.3 Bumps [jinja2](https://github.com/pallets/jinja) from 2.10.1 to 2.11.3. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/2.10.1...2.11.3) Signed-off-by: dependabot[bot] <support@github.com>

commit sha 5b3996ba07c61221371575845da802b0c2400bb8

Merge pull request #2 from vahtras/dependabot/pip/jinja2-2.11.3 Bump jinja2 from 2.10.1 to 2.11.3

push time in a month

push eventvahtras/potsdam-testing

commit sha b822c2bba0c8f1d14671aa74e3ee6b70b1c1e6ff

Bump werkzeug from 0.10.1 to 0.15.3 Bumps [werkzeug](https://github.com/pallets/werkzeug) from 0.10.1 to 0.15.3. - [Release notes](https://github.com/pallets/werkzeug/releases) - [Changelog](https://github.com/pallets/werkzeug/blob/master/CHANGES.rst) - [Commits](https://github.com/pallets/werkzeug/compare/0.10.1...0.15.3) Signed-off-by: dependabot[bot] <support@github.com>

Merge pull request #3 from vahtras/dependabot/pip/werkzeug-0.15.3 Bump werkzeug from 0.10.1 to 0.15.3

push time in a month

PR merged vahtras/potsdam-testing

Bump werkzeug from 0.10.1 to 0.15.3 dependencies

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

• `@dependabot rebase` will rebase this PR
• `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
• `@dependabot merge` will merge this PR after your CI passes on it
• `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
• `@dependabot cancel merge` will cancel a previously requested merge and block automerging
• `@dependabot reopen` will reopen this PR if it is closed
• `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
• `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
• `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
• `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
• `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
• `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
• `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
• `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+1 -1

0 comment

1 changed file

dependabot[bot]

pr closed time in a month

push eventvahtras/potsdam-testing

commit sha 40c557419ff322efd88f23fcb153bcd3f32aa726

Bump flask from 0.10.1 to 1.0 Bumps [flask](https://github.com/pallets/flask) from 0.10.1 to 1.0. - [Release notes](https://github.com/pallets/flask/releases) - [Changelog](https://github.com/pallets/flask/blob/master/CHANGES.rst) - [Commits](https://github.com/pallets/flask/compare/0.10.1...1.0) Signed-off-by: dependabot[bot] <support@github.com>

commit sha 71fc27edff4d8e2cf0ab54b1df19e09dbb086fdd

Merge pull request #2 from vahtras/dependabot/pip/flask-1.0 Bump flask from 0.10.1 to 1.0

push time in a month

PR merged vahtras/potsdam-testing

Bump flask from 0.10.1 to 1.0 dependencies

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

• `@dependabot rebase` will rebase this PR
• `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
• `@dependabot merge` will merge this PR after your CI passes on it
• `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
• `@dependabot cancel merge` will cancel a previously requested merge and block automerging
• `@dependabot reopen` will reopen this PR if it is closed
• `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
• `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
• `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
• `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
• `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
• `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
• `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
• `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+1 -1

0 comment

1 changed file

dependabot[bot]

pr closed time in a month

push eventvahtras/potsdam-testing

commit sha c583d821a67f39488db9e4e06c9cae665f93f414

Bump jinja2 from 2.7.3 to 2.11.3 Bumps [jinja2](https://github.com/pallets/jinja) from 2.7.3 to 2.11.3. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/2.7.3...2.11.3) Signed-off-by: dependabot[bot] <support@github.com>

commit sha fdf02b3df56468bd89f8b0b75e73fa04755e2169

Merge pull request #1 from vahtras/dependabot/pip/jinja2-2.11.3 Bump jinja2 from 2.7.3 to 2.11.3

push time in a month

PR merged vahtras/potsdam-testing

Bump jinja2 from 2.7.3 to 2.11.3 dependencies

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

• `@dependabot rebase` will rebase this PR
• `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
• `@dependabot merge` will merge this PR after your CI passes on it
• `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
• `@dependabot cancel merge` will cancel a previously requested merge and block automerging
• `@dependabot reopen` will reopen this PR if it is closed
• `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
• `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
• `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
• `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
• `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
• `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
• `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
• `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+1 -1

0 comment

1 changed file

dependabot[bot]

pr closed time in a month

That makes sense to me

kschwenzfeier

comment created time in 2 months

create barnchvahtras/testpotsdam

created branch time in 3 months

push eventvahtras/fortran-binary

commit sha 932a9bc11441a934d3d377016bcc25fe871ff5d7

Bump py from 1.5.4 to 1.10.0 Bumps [py](https://github.com/pytest-dev/py) from 1.5.4 to 1.10.0. - [Release notes](https://github.com/pytest-dev/py/releases) - [Changelog](https://github.com/pytest-dev/py/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/py/compare/1.5.4...1.10.0) Signed-off-by: dependabot[bot] <support@github.com>

commit sha b6723a2908ce1324d065bb0a52d284111c5a9197

Merge pull request #2 from vahtras/dependabot/pip/py-1.10.0 Bump py from 1.5.4 to 1.10.0

push time in 3 months

PR merged vahtras/fortran-binary

Bump py from 1.5.4 to 1.10.0 dependencies

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

• `@dependabot rebase` will rebase this PR
• `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
• `@dependabot merge` will merge this PR after your CI passes on it
• `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
• `@dependabot cancel merge` will cancel a previously requested merge and block automerging
• `@dependabot reopen` will reopen this PR if it is closed
• `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
• `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
• `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
• `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
• `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
• `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
• `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
• `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+1 -1

0 comment

1 changed file

dependabot[bot]

pr closed time in 3 months

push eventvahtras/.dotfiles

commit sha a0aae56eeda5f2cdbe5ca2fdf4fa8ca0febd0df0

update

push time in 3 months

push eventbb3110/comppy21

commit sha 71c20d247d796901c167bebcc3d6dd6f93248070

final notebook

push time in 3 months

push eventbb3110/comppy21

commit sha 42cc4bcedb531b3be17d4dab41f63c240164c0dd

ignores some

push time in 3 months

push eventbb3110/comppy21

commit sha ed63cb9c9ecfaba6d2156de67d1a0188564bfb74

backup notes/sample codes

push time in 3 months

push eventbb3110/comppy21

commit sha dc02cc21ce63211798b733bc235a90f253c69648

add testing + leap year example

push time in 3 months

more