Skip to content

reformat bin/fresco.py #6

reformat bin/fresco.py

reformat bin/fresco.py #6

Triggered via push April 30, 2024 19:50
Status Success
Total duration 15s
Artifacts

lint.yml

on: push
Run linters
6s
Run linters
Fit to window
Zoom out
Zoom in

Annotations

6 errors and 1 warning
/home/runner/work/amuse-fresco/amuse-fresco/setup.py#L1
#!/usr/bin/env python3 from setuptools import setup -name = 'amuse-fresco' -author = 'Steven Rieder and Inti Pelupessy' -author_email = 'steven+fresco@rieder.nl' +name = "amuse-fresco" +author = "Steven Rieder and Inti Pelupessy" +author_email = "steven+fresco@rieder.nl" license_ = "Apache License 2.0" -url = 'https://github.com/rieder/fresco' +url = "https://github.com/rieder/fresco" install_requires = [ - 'wheel>=0.32', - 'amuse-framework>=2022.6.0', - 'scipy', - 'matplotlib', - 'astropy', + "wheel>=0.32", + "amuse-framework>=2022.6.0", + "scipy", + "matplotlib", + "astropy", ] setup_requires = [] -description = 'Make a realistic visualisation of a star cluster' +description = "Make a realistic visualisation of a star cluster" with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() long_description_content_type = "text/markdown" extensions = [] all_data_files = [] -packages = [ - 'amuse.plot.fresco' -] +packages = ["amuse.plot.fresco"] -package_dir = { - 'amuse.plot.fresco': 'src/amuse/plot/fresco' -} +package_dir = {"amuse.plot.fresco": "src/amuse/plot/fresco"} -package_data = { -} +package_data = {} classifiers = [ # Maturity of amuse-fresco "Development Status :: 4 - Beta", # Intended audience
/home/runner/work/amuse-fresco/amuse-fresco/setup.py#L50
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", - 'Topic :: Scientific/Engineering :: Astronomy', + "Topic :: Scientific/Engineering :: Astronomy", ] try: from src.amuse.plot.fresco.version import version + use_scm_version = False except ImportError: version = False - setup_requires += ['setuptools_scm',] + setup_requires += [ + "setuptools_scm", + ] use_scm_version = { "root": ".", "relative_to": __file__, "write_to": "src/amuse/plot/fresco/version.py", }
/home/runner/work/amuse-fresco/amuse-fresco/setup.py#L88
package_dir=package_dir, packages=packages, package_data=package_data, data_files=all_data_files, include_package_data=True, - python_requires='>=3.7, <4', + python_requires=">=3.7, <4", scripts=["bin/fresco.py"], )
/home/runner/work/amuse-fresco/amuse-fresco/src/amuse/plot/fresco/fieldstars.py#L1
# -*- coding: utf-8 -*- from __future__ import ( - print_function, - division, - ) + print_function, + division, +) import numpy as np from amuse.datamodel import Particles from amuse.units import units from amuse.ic.salpeter import new_salpeter_mass_distribution def new_field_stars( - N, - width=10 | units.parsec, - height=10 | units.parsec, - depth=100 | units.parsec, - massdistribution="salpeter", - agespread=3 | units.Gyr, - seed=1701, - ): + N, + width=10 | units.parsec, + height=10 | units.parsec, + depth=100 | units.parsec, + massdistribution="salpeter", + agespread=3 | units.Gyr, + seed=1701, +): np.random.seed(seed) stars = Particles(N) - stars.x = (np.random.random(N)-0.5) * width - stars.y = (np.random.random(N)-0.5) * height - stars.z = (np.random.random(N)-0.02) * depth + stars.x = (np.random.random(N) - 0.5) * width + stars.y = (np.random.random(N) - 0.5) * height + stars.z = (np.random.random(N) - 0.02) * depth if massdistribution == "salpeter": stars.mass = new_salpeter_mass_distribution(N) return stars
/home/runner/work/amuse-fresco/amuse-fresco/src/amuse/plot/fresco/filters.py#L123
lambda x: B_lambda(x, T), ).in_(units.W / units.m**2) print(fb) print( - (fb * (1.0 | units.RSun) ** 2 / (1.0 | units.AU) ** 2).in_( - units.W / units.m**2 - ) + (fb * (1.0 | units.RSun) ** 2 / (1.0 | units.AU) ** 2).in_(units.W / units.m**2) ) print( ( energy_flux2(5778.0 | units.K) * (1.0 | units.RSun) ** 2
/home/runner/work/amuse-fresco/amuse-fresco/src/amuse/plot/fresco/fresco.py#L52
def calculate_effective_temperature(luminosity, radius): temp = ( np.nan_to_num( ( - (luminosity / (constants.four_pi_stefan_boltzmann * radius**2)) - ** 0.25 + (luminosity / (constants.four_pi_stefan_boltzmann * radius**2)) ** 0.25 ).value_in(units.K) ) | units.K ) return temp
Run linters
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-python@v4, wearerequired/lint-action@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.