diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..eee99d45 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1 @@ +# Add hashes of linting commits here diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..ae992e33 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index e50702d5..eff7a268 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: os: [macOS-latest, ubuntu-latest, windows-latest] - python-version: [3.8, 3.11] # Check against oldest and newest versions + python-version: [3.9, 3.11] # Check against oldest and newest versions jax: ["", "_jax"] exclude: # Skip win + jax - jax: "_jax" @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout the code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Additional info about the build shell: bash @@ -45,12 +45,10 @@ jobs: ulimit -a - name: Setup Conda via Mamba - uses: mamba-org/provision-with-micromamba@main + uses: mamba-org/setup-micromamba@v1 with: environment-file: devtools/conda-envs/test_env${{ matrix.jax }}.yaml - environment-name: test - channels: conda-forge,defaults - extra-specs: | + create-args: >- python=${{ matrix.python-version }} - name: Install package @@ -86,7 +84,7 @@ jobs: python umbrella-sampling-advanced-fes.py - name: CodeCov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml @@ -98,21 +96,19 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8] + python-version: [3.9] env: PACKAGE: "pymbar" steps: - name: Checkout the code - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Setup Conda via Mamba - uses: mamba-org/provision-with-micromamba@main + uses: mamba-org/setup-micromamba@v1 with: environment-file: devtools/conda-envs/test_env.yaml - environment-name: test - channels: conda-forge,defaults - extra-specs: | + create-args: >- python=${{ matrix.python-version }} - name: Install linter and formatter diff --git a/.gitignore b/.gitignore index 6dd56bbc..7e1f13d4 100644 --- a/.gitignore +++ b/.gitignore @@ -148,3 +148,5 @@ docs/pymbar-docs docs/_build tools/hash_dict.pickle docs/examples/generated/ + +.DS_Store diff --git a/devtools/travis-ci/push-docs-to-s3.py b/devtools/travis-ci/push-docs-to-s3.py index 47830509..bc8cdece 100644 --- a/devtools/travis-ci/push-docs-to-s3.py +++ b/devtools/travis-ci/push-docs-to-s3.py @@ -14,35 +14,36 @@ import thermopyl.version -BUCKET_NAME = 'thermopyl.org' +BUCKET_NAME = "thermopyl.org" if not thermopyl.version.release: - PREFIX = 'latest' + PREFIX = "latest" else: PREFIX = thermopyl.version.short_version -if not any(d.project_name == 's3cmd' for d in pip.get_installed_distributions()): - raise ImportError('The s3cmd pacakge is required. try $ pip install s3cmd') +if not any(d.project_name == "s3cmd" for d in pip.get_installed_distributions()): + raise ImportError("The s3cmd pacakge is required. try $ pip install s3cmd") # The secret key is available as a secure environment variable # on travis-ci to push the build documentation to Amazon S3. -with tempfile.NamedTemporaryFile('w') as f: - f.write('''[default] +with tempfile.NamedTemporaryFile("w") as f: + f.write( + """[default] access_key = {AWS_ACCESS_KEY_ID} secret_key = {AWS_SECRET_ACCESS_KEY} -'''.format(**os.environ)) +""".format( + **os.environ + ) + ) f.flush() - template = ('s3cmd --guess-mime-type --config {config} ' - 'sync docs/_build/ s3://{bucket}/{prefix}/') - cmd = template.format( - config=f.name, - bucket=BUCKET_NAME, - prefix=PREFIX) + template = ( + "s3cmd --guess-mime-type --config {config} " "sync docs/_build/ s3://{bucket}/{prefix}/" + ) + cmd = template.format(config=f.name, bucket=BUCKET_NAME, prefix=PREFIX) return_val = subprocess.call(cmd.split()) # Sync index file. - template = ('s3cmd --guess-mime-type --config {config} ' - 'sync devtools/ci/index.html s3://{bucket}/') - cmd = template.format( - config=f.name, - bucket=BUCKET_NAME) + template = ( + "s3cmd --guess-mime-type --config {config} " "sync devtools/ci/index.html s3://{bucket}/" + ) + cmd = template.format(config=f.name, bucket=BUCKET_NAME) return_val = subprocess.call(cmd.split()) diff --git a/docs/conf.py b/docs/conf.py index 5fbe1a40..7d9820bd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -103,7 +103,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = 'en' +language = "en" # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -262,7 +262,13 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ("index", "pymbar.tex", "pymbar Documentation", pymbar.__maintainer__, "manual",), + ( + "index", + "pymbar.tex", + "pymbar Documentation", + pymbar.__maintainer__, + "manual", + ), ] # The name of an image file (relative to this directory) to place at the top of @@ -285,13 +291,21 @@ # If false, no module index is generated. # latex_domain_indices = True -bibtex_bibfiles = ['references.bib'] +bibtex_bibfiles = ["references.bib"] # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [("index", "pymbar", "pymbar Documentation", [pymbar.__maintainer__], 1,)] +man_pages = [ + ( + "index", + "pymbar", + "pymbar Documentation", + [pymbar.__maintainer__], + 1, + ) +] # If true, show URL addresses after external links. # man_show_urls = False @@ -325,4 +339,3 @@ # If true, do not generate a @detailmenu in the "Top" node's menu. # texinfo_no_detailmenu = False - diff --git a/pymbar/_version.py b/pymbar/_version.py index 817396aa..ed9db017 100644 --- a/pymbar/_version.py +++ b/pymbar/_version.py @@ -251,7 +251,15 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): # if there isn't one, this yields HEX[-dirty] (no NUM) describe_out, rc = run_command( GITS, - ["describe", "--tags", "--dirty", "--always", "--long", "--match", "%s*" % tag_prefix,], + [ + "describe", + "--tags", + "--dirty", + "--always", + "--long", + "--match", + "%s*" % tag_prefix, + ], cwd=root, ) # --long was added in git-1.5.5 @@ -294,7 +302,10 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): if verbose: fmt = "tag '%s' doesn't start with prefix '%s'" print(fmt % (full_tag, tag_prefix)) - pieces["error"] = "tag '%s' doesn't start with prefix '%s'" % (full_tag, tag_prefix,) + pieces["error"] = "tag '%s' doesn't start with prefix '%s'" % ( + full_tag, + tag_prefix, + ) return pieces pieces["closest-tag"] = full_tag[len(tag_prefix) :] diff --git a/setup.py b/setup.py index 2aae1945..4d922f6d 100644 --- a/setup.py +++ b/setup.py @@ -24,13 +24,12 @@ version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), python_requires=">=3.6", - install_requires=["numpy>=1.12", - "scipy", - "numexpr", - ], + install_requires=[ + "numpy>=1.12", + "scipy", + "numexpr", + ], extras_require={ - "jax": ["jaxlib;platform_system!='Windows'", - "jax;platform_system!='Windows'" - ], + "jax": ["jaxlib;platform_system!='Windows'", "jax;platform_system!='Windows'"], }, )