Skip to content

Commit

Permalink
Adicionando configuração de CI
Browse files Browse the repository at this point in the history
  • Loading branch information
helenocampos committed Aug 15, 2024
1 parent 485c87b commit 190bcb7
Show file tree
Hide file tree
Showing 56 changed files with 17,403 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI
on:
push:
branches:
- master
jobs:
test-full:
name: Run CI Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.8.18
uses: actions/setup-python@v4
with:
python-version: "3.8.18"
- name: Install dependencies
run: pip install pytest
- name: Run tests
run: pytest
Empty file added README.md
Empty file.
Binary file not shown.
Binary file not shown.
26 changes: 26 additions & 0 deletions astronomia_utils/astronomia_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
def forca_gravitacional(massa1, massa2, distancia):

"""
Calcula a força gravitacional entre dois corpos.
:param massa1: Massa do primeiro corpo (em kg).
:type massa1: float
:param massa2: Massa do segundo corpo (em kg).
:type massa2: float
:param distancia: Distância entre os centros dos dois corpos (em metros).
:type distancia: float
:returns: A força gravitacional calculada (em newtons).
:rtype: float
Notes
-----
.. math::
F = \\frac{G * (massa1 * massa2)}{distancia^2}
Examples
--------
>>> from astronomia_utils import forca_gravitacional
>>> forca_gravitacional(6e24, 7.2e22, 3.84e8)
1.9553613281249998e+20
"""
G = 6.67430e-11 # Constante gravitacional universal (em m^3/kg/s^2)
forca = (G * massa1 * massa2) / distancia**2
return forca
Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added docs/_build/doctrees/astronomia_utils.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file added docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/modules.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/test.doctree
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: c17f0032def5ca8e92dc96c9a165e814
tags: 645f666f9bcd5a90fca523b33c5a78b7
132 changes: 132 additions & 0 deletions docs/_build/html/_modules/astronomia_utils/astronomia_utils.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@

<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>astronomia_utils.astronomia_utils &#8212; Astronomia Utils August documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../_static/doctools.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />

<link rel="stylesheet" href="../../_static/custom.css" type="text/css" />


<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

</head><body>


<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">


<div class="body" role="main">

<h1>Source code for astronomia_utils.astronomia_utils</h1><div class="highlight"><pre>
<div class="viewcode-block" id="forca_gravitacional"><a class="viewcode-back" href="../../astronomia_utils.html#astronomia_utils.astronomia_utils.forca_gravitacional">[docs]</a><span></span><span class="k">def</span> <span class="nf">forca_gravitacional</span><span class="p">(</span><span class="n">massa1</span><span class="p">,</span> <span class="n">massa2</span><span class="p">,</span> <span class="n">distancia</span><span class="p">):</span>

<span class="w"> </span><span class="sd">&quot;&quot;&quot; </span>
<span class="sd"> Calcula a força gravitacional entre dois corpos.</span>
<span class="sd"> :param massa1: Massa do primeiro corpo (em kg).</span>
<span class="sd"> :type massa1: float</span>
<span class="sd"> :param massa2: Massa do segundo corpo (em kg).</span>
<span class="sd"> :type massa2: float</span>
<span class="sd"> :param distancia: Distância entre os centros dos dois corpos (em metros).</span>
<span class="sd"> :type distancia: float</span>

<span class="sd"> :returns: A força gravitacional calculada (em newtons).</span>
<span class="sd"> :rtype: float</span>

<span class="sd"> Notes</span>
<span class="sd"> -----</span>
<span class="sd"> .. math::</span>
<span class="sd"> F = \\frac{G * (massa1 * massa2)}{distancia^2} </span>

<span class="sd"> Examples</span>
<span class="sd"> --------</span>
<span class="sd"> &gt;&gt;&gt; from astronomia_utils import forca_gravitacional</span>
<span class="sd"> &gt;&gt;&gt; forca_gravitacional(6e24, 7.2e22, 3.84e8)</span>
<span class="sd"> 1.9553613281249998e+20</span>


<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">G</span> <span class="o">=</span> <span class="mf">6.67430e-11</span> <span class="c1"># Constante gravitacional universal (em m^3/kg/s^2)</span>
<span class="n">forca</span> <span class="o">=</span> <span class="p">(</span><span class="n">G</span> <span class="o">*</span> <span class="n">massa1</span> <span class="o">*</span> <span class="n">massa2</span><span class="p">)</span> <span class="o">/</span> <span class="n">distancia</span><span class="o">**</span><span class="mi">2</span>
<span class="k">return</span> <span class="n">forca</span></div>

<div class="viewcode-block" id="peso_na_superficie"><a class="viewcode-back" href="../../astronomia_utils.html#astronomia_utils.astronomia_utils.peso_na_superficie">[docs]</a><span class="k">def</span> <span class="nf">peso_na_superficie</span><span class="p">(</span><span class="n">massa</span><span class="p">,</span> <span class="n">gravidade</span><span class="p">):</span>
<span class="n">peso</span> <span class="o">=</span> <span class="n">massa</span> <span class="o">*</span> <span class="n">gravidade</span>
<span class="k">return</span> <span class="n">peso</span></div>
</pre></div>

</div>

</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../index.html">Astronomia Utils</a></h1>








<h3>Navigation</h3>

<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../../index.html">Documentation overview</a><ul>
<li><a href="../index.html">Module code</a><ul>
</ul></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>








</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2024, Marcela.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.0.2</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>

</div>




</body>
</html>
98 changes: 98 additions & 0 deletions docs/_build/html/_modules/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@

<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &#8212; Astronomia Utils August documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />

<link rel="stylesheet" href="../_static/custom.css" type="text/css" />


<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

</head><body>


<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">


<div class="body" role="main">

<h1>All modules for which code is available</h1>
<ul><li><a href="astronomia_utils/astronomia_utils.html">astronomia_utils.astronomia_utils</a></li>
<li><a href="test/test_astronomia_utils.html">test.test_astronomia_utils</a></li>
</ul>

</div>

</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../index.html">Astronomia Utils</a></h1>








<h3>Navigation</h3>

<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>








</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2024, Marcela.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.0.2</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>

</div>




</body>
</html>
Loading

0 comments on commit 190bcb7

Please sign in to comment.